[arch-haskell] ghc 7.4.1 in a temporary repo

Magnus Therning magnus at therning.org
Tue Feb 14 13:01:05 CET 2012


On Tue, Feb 14, 2012 at 10:50, Adrien Haxaire <adrien at haxaire.org> wrote:
> On Mon, 13 Feb 2012 16:04:58 +0100, Magnus Therning wrote:
>>
>>
>> It is certainly doable, though it may take a bit of time.
>>
>> First you need a development version of `cblrepo`, check out commit
>> 4364ed0ab546fafbff59163d59c6bf94d8298dd4 on the branch called
>> `devo/ghc74` [1].  That version of `cblrepo` is compilable using the
>> packages currently in [haskell], but it generates PKGBUILDs usable
>> with GHC 7.4.1.
>>
>> Check out the sources I used for [ghc74]
>>
>>    $ git clone git clone http://www.kiwilight.com/~magnus/ah-ghc74.git
>>
>> Now you can use the `makeahpkg` script as usual to first build GHC
>> itself, then the dev-version of cblrepo to generate the PKGBUILDs, in
>> order to finally build the entire [ghc74] repo for yourself.
>>
>> Let me know if you run into any troubles.
>>
>> /M
>>
>> [1]: http://is.gd/NyCWxL
>
> Hello,
>
> Thanks for the explanation. I think I miss some experience building a repo
> for Arch, so here is what I did yesterday.
>
> I cloned the sources you used for [ghc74] with git clone
> http://www.kiwilight.com/~magnus/ah-ghc74.git. Then cd ah-ghc74, then
> makeahpkg. It created a fake root directory inside ah-ghc74, called
> something with 686 (I don't remember the exact name).

That's a chroot, you should makeahpkg to build everything, including
ghc, to make sure your own system doesn't contaminate the built
packages.

> Then I cloned cblrepo: git clone https://github.com/magthe/cblrepo.git, cd
> cblrepo, git checkout -b 4364ed0ab546fafbff59163d59c6bf94d8298dd4, then
> cabal install. Seemed to work.
>
> Went back to ah-ghc74, cd ghc, makepkg -s. It built ghc-7.4.1. I forgot to
> remove the profiling options in my ghc settings, meaning that it built it
> twice :) So I guess I have to do it again tonight, without the profiling
> options. It tokk 4 hours in total.
>
> Now I don't know what is the next step. Is it 'cblrepo add -d ghc,7.4.1'
> then 'cblrepo pkgbuild ghc', or only the latter?

No, what you need to do now is use cblrepo to create the source
packages, then you use makeahpkg to build them.

Start with cleaning up your ah-ghc74 directory (you can use `git
clean` for that) and make sure you have `cblrepo` in your path.  Then
the following steps ought to do the job:

    $ cd ah-ghc74
    $ cblrepo build $(cblrepo list | cut -f1 -d\ ) > ,,build-order
    $ cblrepo pkgbuild $(cat ,,build-order)
    $ ./makeahpkg -x -- ghc $(cat ,,build-order)

> If you have some links on how to do it, I'll be glad to look at it and learn
> how to do it.

There's a README that comes with cblrepo, that's a good place to
start, then there's also a README for HABS (http://is.gd/7b8ICP).

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4
email: magnus at therning.org   jabber: magnus at therning.org
twitter: magthe               http://therning.org/magnus



More information about the arch-haskell mailing list