[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Packaging non-library Haskell



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I would like to package all my haskell libraries and utilites as Debian 
packages.  Libraries, it turns out, are very easy these days, with 
cabal-debian and hlibrary.mk doing all the heavy listing.

Unfortunately, for non-libraries the situation is not yet as nice.

So I set about to make the situation more nice, and got this far:

#!/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/ \
		\( ! -name "*_p.a" ! -name "*.p_hi" \) \
		-exec install -Dm 755 '{}' ../$(notdir $@)/'{}' ';'
	echo "$(notdir $@)"
	pwd
	dh_haskell_provides -p$(notdir $@)
	dh_haskell_depends -p$(notdir $@)
	dh_haskell_shlibdeps -p$(notdir $@)

This debian/rules file, combined with the already reasonable output of 
cabal-debian, very nearly works.  The only issue left is those last three 
lines: the scripts assume a libghc-*-* structure, which obviously is not the 
right way to name non-library packages, and so getting the dependencies 
fails with an error and the package is not built.

I could, of course, add the dependencies by hand, but that wouldn't be 
awesome, would it?

So, my big questions are:

1) Are you guys at all interested in non-library packages if I want to 
	continue with this?
2) Should I change hlibrary.mk and dh_haskell_*, or should I add new 
	scripts?
3) What is the policy on library packages that also have binaries?  
	Currently the haskell-devscripts ignore any such binaries, but isn't it 
normal to have a lib-*-bin package for those cases?  Should that be 
supported?

- -- 
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJPihJDAAoJENEcKRHOUZzeb4QP/i56bhuv2jGacE+IMPD+Gmwx
50NPu5yeBoXe7klqbk+mJCMCq1+iz/eA9xrUhvx5GYJ7uK3/4W7CVFPkiFydAse6
krSwUsoCHXA1941TBwZP7uS5QQPGxNpR+lu4CMNkUHX1VCaBysQVNUO3YPrBLokg
Xvz16jco40Qg7HKfjEMhRsxWkmigbEhfO9BGFmS7UQpIv58TNOaLZ+oQ3/WLEnIE
/Lc6BPA3D/2mtFNNXbuAyofoWIh8BLkw4a/VzoUWJQOGDncG/CqPGKuIT5iTY5y/
sS1fJ2/Q0a/CFlfpJkwoeMgLC5BREFjVNg0lW+CohitB9h8q3ToIYcAdXJEZHEnZ
hFov3BxmxohG9BMClFRZ23B8rO9mX/9eiyuzw1z6R3mqM6Z7ooCLfc10vPpZncQa
KA30VOP731QJRoq0ySzXfkToyEIFTQBbwKM5gJvTXqzltYozaeXm4LrQGP4I/LU/
gguS1ejnkDeVUNR8wtTnMu2JNOO3F2VDPshLKb58l50V6OG5fxnBadZBHx77J8NY
NViyN/uZ2Q3oJz43Prc0r8UcGCPoQ5u7OCmQAohPW0IxfPIISiSrgK5vrRd+/Ngd
ngz9MPowNw8pRgjVvqEsd9s0hetmvzW30cB/JdGdoMUQQzl4frbuioGKEIgE7VuK
39Dl+aqdtbud+zuX6V6D
=MluY
-----END PGP SIGNATURE-----


Reply to: