
On 2010/10/15 Magnus Therning
Taking it one step further:
• Replace archhaskell/habs with a single version-controlled file containing tuples of
. • Make use of bauerbill's already existing support for hackage. (I don't know anything about the internals of bauerbill, but it might need some extending to closer match what cabal2arch does.)
I pushed several additions to the archlinux library, and wrote a small script that sketches this part of the procedure. First some comments : * raw Cabal files from 00-index.tar.gz cannot be converted right away to PKGBUILDs, thay must first go through a configuration procedure, which is implemented in Cabal2Arch: I copied the relevant code to the function Distribution.Archlinux.CabalTranslation.preprocessCabal * I added a module Distribution.ArchLinux.HackageTranslation which gives two main functions: - getCabalsFromTarball turns a tarball (ByteString) to a list on GenericPackageDescription - getSpecifiedCabalsFromTarball takes a [String] as additional argument to extract only several items The [String] argument is a set of lines like in the attached PKGLIST file. GenericPackageDescription variables can be fed to preprocessCabal and cabal2pkg to produce PKGBUILD See the attached script for an example. -- Rémy.