[Pkg-haskell-commits] darcs: ghc: Make /usr/lib/ghc layout a bit more standard

mail at joachim-breitner.de mail at joachim-breitner.de
Wed Feb 5 10:49:40 UTC 2014


Tue Feb  4 23:24:34 UTC 2014  mail at joachim-breitner.de
  * Make /usr/lib/ghc layout a bit more standard

    M ./rules -18 +16

Tue Feb  4 23:24:34 UTC 2014  mail at joachim-breitner.de
  * Make /usr/lib/ghc layout a bit more standard
diff -rN -u old-ghc/rules new-ghc/rules
--- old-ghc/rules	2014-02-05 10:49:40.221531230 +0000
+++ new-ghc/rules	2014-02-05 10:49:40.241531230 +0000
@@ -89,8 +89,7 @@
 	# We can't do this with a configure flag in 6.8.1 as libdir is not
 	# defined at the point at which we := it
 	echo 'ghclibdir := $${libdir}/ghc' >> mk/build.mk
-	echo 'bindir  := $${ghclibdir}/bin' >> mk/build.mk
-	echo 'ghclibexecdir := $${ghclibdir}/lib' >> mk/build.mk
+	echo 'bindir  := /usr/bin' >> mk/build.mk
 	# docdir doesn't have a configure flag, and unfortunately
 	# we also need to explicitly define all of its dependents as they
 	# are set with :=
@@ -139,7 +138,11 @@
 		../../../inplace/bin/ghc-stage2 --make Setup.lhs; \
 		./Setup configure --prefix=/usr --with-compiler=../../../inplace/bin/ghc-stage2 \
 			--package-db=../../../inplace/lib/package.conf.d/ \
-			--htmldir=/usr/share/doc/ghc-haddock/html/ ; \
+			--htmldir=/usr/share/doc/ghc-haddock/html/ \
+			--datadir=/usr/share \
+			--datasubdir=haddock \
+			--libdir=/usr/lib \
+			--libsubdir=haddock  ; \
 		./Setup build
 
 	touch $@
@@ -161,9 +164,9 @@
 
 	# Generate lintian overrides
 	mkdir -p debian/tmp/usr/share/lintian/overrides
-	echo "ghc binary: extra-license-file `cd debian/tmp && echo usr/lib/ghc-*/Cabal-*/Distribution/License.hi`" >> debian/tmp/usr/share/lintian/overrides/ghc
-	echo "ghc: extra-license-file `cl debian/tmp && echo usr/lib/ghc-*/Cabal-*/Distribution/License.dyn_hi`" >> debian/tmp/usr/share/lintian/overrides/ghc
-	echo "ghc-prof binary: extra-license-file `cd debian/tmp && echo usr/lib/ghc-*/Cabal-*/Distribution/License.p_hi`" >> debian/tmp/usr/share/lintian/overrides/ghc-prof
+	echo "ghc binary: extra-license-file `cd debian/tmp && echo usr/lib/ghc/Cabal-*/Distribution/License.hi`" >> debian/tmp/usr/share/lintian/overrides/ghc
+	echo "ghc: extra-license-file `cd debian/tmp && echo usr/lib/ghc/Cabal-*/Distribution/License.dyn_hi`" >> debian/tmp/usr/share/lintian/overrides/ghc
+	echo "ghc-prof binary: extra-license-file `cd debian/tmp && echo usr/lib/ghc/Cabal-*/Distribution/License.p_hi`" >> debian/tmp/usr/share/lintian/overrides/ghc-prof
 
 	# Sort out the package.conf files
 	mkdir -p debian/tmp/var/lib/ghc
@@ -176,26 +179,20 @@
 	sed -ri 's,^haddock-interfaces: /.*?/libraries/,haddock-interfaces: /usr/lib/ghc-doc/haddock/,' debian/tmp/var/lib/ghc/package.conf.d/*.conf
 
 	# Remove haddock as built within the ghc tree
-	rm -f debian/tmp/usr/lib/ghc/bin/haddock \
-	      debian/tmp/usr/lib/ghc/bin/haddock-$(ProjectVersion) \
+	rm -f debian/tmp/usr/bin/haddock \
+	      debian/tmp/usr/bin/haddock-$(ProjectVersion) \
 	      debian/tmp/usr/lib/ghc/lib/haddock
 	rm -rf debian/tmp/usr/lib/ghc/html
 
 	# Sort out the binaries
-	mkdir -p debian/tmp/usr/bin
 	if inplace/bin/ghc-stage2 --info | grep '"Have interpreter","NO"'; then \
-	    cd debian/tmp/usr/lib/ghc ;rm -f bin/ghci* bin/runghc* bin/runhaskell*; \
+	    cd debian/tmp/usr/bin ;rm -f ghci* runghc* runhaskell*; \
 	fi
-	cd debian/tmp/usr/lib/ghc/bin && \
-	    for f in *; \
-	    do ln -s /usr/lib/ghc/bin/$$f \
-	             ../../../bin/$${f}; \
-	    done
-	sed -i 's,topdir="/usr/lib,topdir="/var/lib,' debian/tmp/usr/lib/ghc/bin/ghc-pkg-$(ProjectVersion)
+	sed -i 's,topdir="/usr/lib,topdir="/var/lib,' debian/tmp/usr/bin/ghc-pkg-$(ProjectVersion)
 	cd debian/haddock-build/haddock; ./Setup copy --dest=../../tmp
 
 	# Check if we have a ghci binary
-	if test -e debian/tmp/usr/lib/ghc/bin/ghci-$(ProjectVersion); then \
+	if test -e debian/tmp/usr/bin/ghci-$(ProjectVersion); then \
 	    echo 'ghci=ghc-ghci' >> debian/ghc.substvars ; fi
 
 	# Add haddock substvars
@@ -254,7 +251,7 @@
 	echo debian/tmp/usr/share/lintian/overrides/ghc-prof >> debian/ghc-prof.install
 	# haddock
 	echo usr/bin/haddock				 > debian/ghc-haddock.install
-	find debian/tmp/usr/share/haddock-* $(FILES)	 >> debian/ghc-haddock.install
+	find debian/tmp/usr/share/haddock $(FILES)	 >> debian/ghc-haddock.install
 	# ghc-doc
 ifeq (YES,$(BUILD_HADDOCK_DOCS))
 	mkdir -p debian/tmp/$(DEB_HOOGLE_TXT_DIR)
@@ -310,6 +307,7 @@
 	rm -f utils/ghc-pwd/dist-boot/ghc-pwd
 
 	rm -f libraries/haskeline/a.out
+	rm -rf utils/ghctags/dist-install
 	
 	dh_autoreconf_clean
 	dh_clean




More information about the Pkg-haskell-commits mailing list