[Git][haskell-team/DHG_packages][master] 3 commits: ghc: Separate the binary-all/binary-any builds
Ilias Tsitsimpis (@iliastsi)
gitlab at salsa.debian.org
Fri Jul 15 19:58:29 BST 2022
Ilias Tsitsimpis pushed to branch master at Debian Haskell Group / DHG_packages
Commits:
24191e97 by Ilias Tsitsimpis at 2022-07-09T13:41:46+03:00
ghc: Separate the binary-all/binary-any builds
- - - - -
fc377867 by Ilias Tsitsimpis at 2022-07-15T21:19:26+03:00
Run debian/provided_substvars for arch-all builds
- - - - -
0ca5e912 by Ilias Tsitsimpis at 2022-07-15T21:19:26+03:00
Upload to unstable
- - - - -
5 changed files:
- p/ghc/debian/changelog
- + p/ghc/debian/patches/separate-docs
- p/ghc/debian/patches/series
- p/ghc/debian/provided_substvars
- p/ghc/debian/rules
Changes:
=====================================
p/ghc/debian/changelog
=====================================
@@ -1,8 +1,9 @@
-ghc (9.0.2-3) UNRELEASED; urgency=medium
+ghc (9.0.2-3) unstable; urgency=medium
* Declare compliance with Debian policy 4.6.1
+ * Separate the binary-all/binary-any builds (Closes: #1014066)
- -- Ilias Tsitsimpis <iliastsi at debian.org> Tue, 28 Jun 2022 15:31:59 +0300
+ -- Ilias Tsitsimpis <iliastsi at debian.org> Fri, 15 Jul 2022 17:03:35 +0300
ghc (9.0.2-2) unstable; urgency=medium
=====================================
p/ghc/debian/patches/separate-docs
=====================================
@@ -0,0 +1,61 @@
+Index: b/ghc.mk
+===================================================================
+--- a/ghc.mk
++++ b/ghc.mk
+@@ -802,7 +802,7 @@ endif
+ ifeq "$(HADDOCK_DOCS)" "YES"
+ libraries/dist-haddock/index.html: $(haddock_INPLACE) $(ALL_HADDOCK_FILES)
+ ifeq "$(phase)" "final"
+-$(eval $(call all-target,library_doc_index,libraries/dist-haddock/index.html))
++docs: libraries/dist-haddock/index.html
+ endif
+ INSTALL_LIBRARY_DOCS += libraries/dist-haddock/*
+ endif
+@@ -844,9 +844,9 @@ libraries/ghc-prim/dist-install/build/au
+
+ install: install_libs install_packages install_libexecs \
+ install_bins install_libexec_scripts
+-ifeq "$(HADDOCK_DOCS)" "YES"
+-install: install_docs
+-endif
++# ifeq "$(HADDOCK_DOCS)" "YES"
++# install: install_docs
++# endif
+
+ define installLibsTo
+ # $1 = libraries to install
+Index: b/rules/haddock.mk
+===================================================================
+--- a/rules/haddock.mk
++++ b/rules/haddock.mk
+@@ -34,7 +34,7 @@ endif
+ haddock: html_$1
+
+ ifeq "$$(HADDOCK_DOCS)" "YES"
+-$(call all-target,$1_$2_haddock,html_$1)
++docs: html_$1
+ endif
+
+ .PHONY: html_$1
+Index: b/rules/sphinx.mk
+===================================================================
+--- a/rules/sphinx.mk
++++ b/rules/sphinx.mk
+@@ -30,7 +30,7 @@ $(call all-target,$1,)
+ .PHONY: html_$1
+ ifeq "$$(phase)" "final"
+ ifeq "$$(BUILD_SPHINX_HTML)" "YES"
+-$(call all-target,$1,html_$1)
++docs: html_$1
+ INSTALL_HTML_DOC_DIRS += $1/build-html/$2
+ endif
+ endif
+@@ -47,7 +47,7 @@ endif
+ .PHONY: pdf_$1
+ ifeq "$$(phase)" "final"
+ ifeq "$$(BUILD_SPHINX_PDF)" "YES"
+-$(call all-target,$1,pdf_$1)
++docs: pdf_$1
+ INSTALL_DOCS += $1/$2.pdf
+ endif
+ endif
=====================================
p/ghc/debian/patches/series
=====================================
@@ -12,3 +12,4 @@ latomic-subword
latomic-64bit
78db231ffdf8385662812781c1d09c630cfad313.patch
ddd2591c5ca395e39ea36855e5b7e0a3464b7ad8.patch
+separate-docs
=====================================
p/ghc/debian/provided_substvars
=====================================
@@ -27,7 +27,7 @@ while (<PKG>) {
close PKG;
my $buf;
-open DEV, '>debian/ghc.substvars';
+open DEV, '>>debian/ghc.substvars';
$buf = "provided-devs=";
foreach (sort @pkgs) {$buf .= "libghc-$_-dev (= $pkgver{$_}), ";}
$buf =~ s#(.*), #$1#;
@@ -41,7 +41,7 @@ $buf =~ s#(.*), #$1#;
print DEV $buf."\n";
close DEV;
-open PROF, '>debian/ghc-prof.substvars';
+open PROF, '>>debian/ghc-prof.substvars';
print PROF 'provided-profs=';
$buf = "";
foreach (@pkgs) {$buf .= "libghc-$_-prof (= $pkgver{$_}), ";}
@@ -49,7 +49,7 @@ $buf =~ s#(.*), #$1#;
print PROF $buf."\n";
close PROF;
-open DOC, '>debian/ghc-doc.substvars';
+open DOC, '>>debian/ghc-doc.substvars';
print DOC 'provided-docs=';
$buf = "";
foreach (@pkgs) {$buf .= "libghc-$_-doc (= $pkgver{$_}), ";}
=====================================
p/ghc/debian/rules
=====================================
@@ -68,7 +68,6 @@ else
dh $@
endif
-
override_dh_autoreconf:
dh_autoreconf perl -- boot
@@ -160,8 +159,9 @@ endif
$(EXTRA_CONFIGURE_FLAGS) \
--with-system-libffi --libdir=/usr/lib
-override_dh_auto_build:
- dh_auto_build
+override_dh_auto_build-indep:
+ # Building docs needs a full build
+ dh_auto_build -i -- all docs
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
@@ -184,13 +184,10 @@ endif
FILES = \( -type f -o -type l \)
PROF_FILE = \( -name "*.p_*" -o -name "lib*_p.a" \)
-override_dh_auto_install:
+override_dh_auto_install-arch:
# See https://bugs.debian.org/944493 for why we use --no-parallel.
dh_auto_install --no-parallel
- # Delete all the library LICENSE files
- rm -f debian/tmp/usr/share/doc/ghc-doc/html/libraries/*/LICENSE
-
# Remove the haddock.t files, they really should not be in the released
# package (upstream #10410)
find debian/tmp -name \*.haddock.t -delete
@@ -202,13 +199,14 @@ override_dh_auto_install:
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
- # Old directories for symlink-workaround. Remove once all libraries use new path
- mv debian/tmp/usr/lib/ghc/package.conf.d \
- debian/tmp/var/lib/ghc/
- rm debian/tmp/var/lib/ghc/package.conf.d/package.cache
- chmod +x debian/provided_substvars
- debian/provided_substvars
+ if ! test -d debian/tmp/var/lib/ghc/package.conf.d ; then \
+ mkdir -p debian/tmp/var/lib/ghc ;\
+ mv debian/tmp/usr/lib/ghc/package.conf.d debian/tmp/var/lib/ghc/ ;\
+ rm debian/tmp/var/lib/ghc/package.conf.d/package.cache ;\
+ fi
+ rm -rf debian/tmp/usr/lib/ghc/package.conf.d
+
+ # Modify the ghc-doc path in package conf files
sed -ri 's,/usr/share/doc/ghc-doc/html/libraries/(.*)\.haddock,/usr/lib/ghc-doc/haddock/ghc/\1.haddock,' debian/tmp/var/lib/ghc/package.conf.d/*.conf
# Sort out the binaries
@@ -216,24 +214,6 @@ override_dh_auto_install:
cd debian/tmp/usr/bin ;rm -f ghci* runghc* runhaskell*; \
fi
- # Check if we have a ghci binary
- if test -e debian/tmp/usr/bin/ghci-$(ProjectVersion); then \
- echo 'ghci=ghc-ghci' >> debian/ghc.substvars ; fi
-ifeq (NO,$(BUILD_CROSS))
- # Add haddock substvars
- echo "haddock:Depends=haddock-interface-$$(debian/tmp/usr/lib/ghc/bin/haddock --interface-version)" >> debian/ghc-doc.substvars
- echo "haddock:Provides=haddock-interface-$$(debian/tmp/usr/lib/ghc/bin/haddock --interface-version)" >> debian/ghc.substvars
- mkdir -p debian/tmp/usr/lib/ghc-doc
- cp debian/gen_contents_index debian/tmp/usr/lib/ghc-doc/
- chmod +x debian/tmp/usr/lib/ghc-doc/gen_contents_index
- mkdir debian/tmp/usr/lib/ghc-doc/haddock
- mkdir debian/tmp/usr/lib/ghc-doc/haddock/ghc/
- for f in `find debian/tmp/usr/share/doc/ghc-doc/html/libraries/ -maxdepth 1 -mindepth 1 -type d`; do \
- mkdir debian/tmp/usr/lib/ghc-doc/haddock/ghc/`basename $$f` ; \
- mv $$f/*.haddock debian/tmp/usr/lib/ghc-doc/haddock/ghc/`basename $$f` ; done
- cd debian/tmp/usr/share/doc/ghc-doc/html/libraries/; ln -s ghc-$(ProjectVersion) ghc
- install -Dm 644 debian/index.html debian/tmp/usr/share/doc/ghc-doc/index.html
-
# manpages
echo ".so man1/ghc.1" > debian/tmp/usr/share/man/man1/ghc-$(ProjectVersion).1
if test -e debian/tmp/usr/bin/ghci-$(ProjectVersion); then \
@@ -246,7 +226,6 @@ ifeq (NO,$(BUILD_CROSS))
cp debian/haddock.man debian/tmp/usr/share/man/man1/haddock.1
find debian/tmp/usr/share/man $(FILES) >> debian/ghc.install
-endif
# ####################
# Now all the files are sorted, create the package filelists
@@ -256,20 +235,52 @@ endif
find debian/tmp/usr/lib/ghc $(FILES) ! $(PROF_FILE) >> debian/ghc.install
find debian/tmp/var >> debian/ghc.install
echo debian/tmp/usr/share/lintian/overrides/ghc >> debian/ghc.install
+ rm -f debian/ghc.links
+ # Old directories for symlink-workaround. Remove once all libraries use new path
+ echo "/var/lib/ghc/package.conf.d /usr/lib/ghc/package.conf.d" >> debian/ghc.links
# ghc-prof
find debian/tmp/usr/lib $(FILES) $(PROF_FILE) > debian/ghc-prof.install
echo debian/tmp/usr/share/lintian/overrides/ghc-prof >> debian/ghc-prof.install
+
+ sed -i s,^debian/tmp,, debian/*.install debian/*.links
+
+override_dh_auto_install-indep:
+ # We need to run the 'install' target as well here,
+ # so we install package.conf files and generate 'Provides' from them.
+ dh_auto_install --no-parallel -- install install_docs
+
+ # Delete all the library LICENSE files
+ rm -f debian/tmp/usr/share/doc/ghc-doc/html/libraries/*/LICENSE
+
+ # Sort out the package.conf files
+ # We need this in order to run dh_haskell_provides afterwards
+ if ! test -d debian/tmp/var/lib/ghc/package.conf.d ; then \
+ mkdir -p debian/tmp/var/lib/ghc ;\
+ mv debian/tmp/usr/lib/ghc/package.conf.d debian/tmp/var/lib/ghc/ ;\
+ rm debian/tmp/var/lib/ghc/package.conf.d/package.cache ;\
+ fi
+ rm -rf debian/tmp/usr/lib/ghc/package.conf.d
+
+ # Install haddock files
+ mkdir -p debian/tmp/usr/lib/ghc-doc
+ cp debian/gen_contents_index debian/tmp/usr/lib/ghc-doc/
+ chmod +x debian/tmp/usr/lib/ghc-doc/gen_contents_index
+ mkdir debian/tmp/usr/lib/ghc-doc/haddock
+ mkdir debian/tmp/usr/lib/ghc-doc/haddock/ghc/
+ for f in `find debian/tmp/usr/share/doc/ghc-doc/html/libraries/ -maxdepth 1 -mindepth 1 -type d`; do \
+ mkdir debian/tmp/usr/lib/ghc-doc/haddock/ghc/`basename $$f` ; \
+ mv $$f/*.haddock debian/tmp/usr/lib/ghc-doc/haddock/ghc/`basename $$f` ; done
+ cd debian/tmp/usr/share/doc/ghc-doc/html/libraries/; ln -s ghc-$(ProjectVersion) ghc
+ install -Dm 644 debian/index.html debian/tmp/usr/share/doc/ghc-doc/index.html
+
# ghc-doc
-ifeq (NO,$(BUILD_CROSS))
mkdir -p debian/tmp/$(DEB_HOOGLE_TXT_DIR)
find debian/tmp/usr/share/doc/ghc-doc/html/libraries/*/ -name "*.txt" \
-printf "%p $(DEB_HOOGLE_TXT_DIR)/%f\n" >> debian/ghc-doc.links
find debian/tmp/usr/share/doc/ghc-doc $(FILES) > debian/ghc-doc.install
find debian/tmp/usr/lib/ghc-doc $(FILES) >> debian/ghc-doc.install
+
sed -i s,^debian/tmp,, debian/*.install debian/*.links
-endif
- rm -f debian/ghc.links
- echo "/var/lib/ghc/package.conf.d /usr/lib/ghc/package.conf.d" >> debian/ghc.links
override_dh_auto_clean:
dh_auto_clean
@@ -309,9 +320,20 @@ override_dh_auto_clean:
override_dh_compress:
dh_compress -X.haddock -X.txt
-override_dh_installdeb:
+override_dh_gencontrol:
+ # Generate substvars
+ chmod +x debian/provided_substvars
+ debian/provided_substvars
+ # Check if we have a ghci binary
+ if test -e debian/tmp/usr/bin/ghci-$(ProjectVersion); then \
+ echo 'ghci=ghc-ghci' >> debian/ghc.substvars ; fi
+ # Add haddock substvars
+ifeq (NO,$(BUILD_CROSS))
+ echo "haddock:Provides=haddock-interface-$$(debian/tmp/usr/lib/ghc/bin/haddock --interface-version)" >> debian/ghc.substvars
+ echo "haddock:Depends=haddock-interface-$$(debian/tmp/usr/lib/ghc/bin/haddock --interface-version)" >> debian/ghc-doc.substvars
+endif
dh_haskell_provides
- dh_installdeb
+ dh_gencontrol
override_dh_shlibdeps:
dh_shlibdeps -XlibHS
@@ -319,9 +341,6 @@ override_dh_shlibdeps:
# we do not want shlibs files there, neither postrm scripts
override_dh_makeshlibs:
-# we have ghc-testsuite for this, empty override
-override_dh_auto_test:
-
#GHC has no meaningful debugging symbols, so we don't ship a -dbgsym
#package.
override_dh_strip:
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/4759cbb6e5da55fae52437621c1aa5f26b320804...0ca5e912baf002195fbd99782d461d39bd2dfbc8
--
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/4759cbb6e5da55fae52437621c1aa5f26b320804...0ca5e912baf002195fbd99782d461d39bd2dfbc8
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20220715/28f15106/attachment-0001.htm>
More information about the Pkg-haskell-commits
mailing list