Hi,
Am Sonntag, den 15.04.2012, 07:38 -0500 schrieb Stephen Paul Weber:
> Somebody signing messages as Joachim Breitner wrote:
> >there are more examples, with varying levels of sensibility. hledger
> >(which access debian/tmp-inst-ghc) is a pretty good example.
>
> I will take a look at that.
>
> >The real solution is to beef up hlibrary.mk to automatically do that;
> >see http://lists.debian.org/debian-haskell/2012/03/msg00047.html for a
> >sketch of a specificatoin. Stephen, if you are interested in doing that
> >(which would answer your question 2), that would be great!
>
> Ok, I should look at the cabal copy thing, especially if it supports data
> files :)
actually, accessing tmp-inst-ghc is as good as that, as that is the
result of "cabal copy"; some of my rules files call cabal copy a second
time, but this can be avoided.
> It seems like any specific 'bar' package would need custom install rules and
> such anyway, so probably all hlibrary needs to do is detect if there is a
> package being built by the same name as some binary, and not install the
> binary into foo if there is?
From my experience, I expect that we can do even without custom install
rules in most cases.
> #!/usr/bin/make -f
> include /usr/share/cdbs/1/rules/debhelper.mk
> include /usr/share/cdbs/1/class/hlibrary.mk
>
> build/$(CABAL_PACKAGE):: build-ghc-stamp
>
> install/$(CABAL_PACKAGE):: debian/tmp-inst-ghc
> cd debian/tmp-inst-ghc ; find usr/bin/ \
> -exec install -Dm 755 '{}' ../$(notdir $@)/'{}' ';'
>
> Which is sucessfully building and packaging my (admittedly simple) smtp2mta
> package.
It is a start. If course, you should not install any library files (see
the find parameter sets in hlibrary.mk). I guess there are 5 classes of
files in tmp-ghc-inst that hlibrary needs to shove in the right
packages.
* Library files
* Prof files
* Doc files
* Binaries
* Rest (which ought to be data)
If hlibrary makes sensible guesses for the intended package for each of
these 5 classes, and if the guesses are overridable, no custom custom
install rules should be required.
Greetings,
Joachim
--
Joachim "nomeata" Breitner
Debian Developer
nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata
Attachment:
signature.asc
Description: This is a digitally signed message part