[Haskell-cafe] porting Haskell to Mageia
Yaakov M Nemoy
loupgaroublond at gmail.com
Thu May 22 06:06:43 UTC 2014
I don’t know a lot about Mageia packaging so i can’t help you with specifics there, but i can tell you a bit about how packaging is (or was) done in Fedora when i helped put together the packaging guidelines.
In RPM packages there is a mapping between source code to a main package and zero or more subpackages. Usually there is just one source tarball and sometimes a few patches. You write a single SPEC file for the whole thing that runs all the step to build the code into binaries. This, of course, needs the build dependencies to be installed. For GHC, you want to install the monolithic bootstrapper so you can use it to build a new GHC package. Then the SPEC file has steps to configure the package int he build environment, build and compile the code, and finally install the code to a temporary build directory managed by RPM. If you stop here, you will have a new monolithic package, just like the bootstrapper.
The magic happens in the %files section. For each sub package you want, you declare a separate %files section and then list the files that belong in that package. If you want to split each library into a separate package, you need to know which files fall under which library. For Haskell libraries in Fedora, we used split each package into code, documentation and profiling code. Nowadays, it is split into two parts, code and development headers for dynamic linked libraries. We also built macros for RPM to help automated this process.
I imagine there is a similar packaging process for Mageia Linux. You can learn more about the Fedora side starting with this link below. I no longer maintain packages in Fedora, but I believe some of the current maintainers are on this list (hi!) and will correct my mistakes. If you would like further clarification, please don’t hesitate to ask.
Yaakov M Nemoy
On May 21, 2014, at 11.51, Roelof Wobben <r.wobben at home.nl> wrote:
> I like to port Haskell to mageia linux.
> Now I found out that someone has already made a bootstrap package.
> Now my question is how can I use that one so I can make the full package like fedora has.
> So a lot of small packages instead of one big package.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe