summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Bourg <ebourg@apache.org>2015-10-08 09:06:49 +0200
committerEmmanuel Bourg <ebourg@apache.org>2015-10-08 09:06:49 +0200
commitaf04237130f6d1d1fce386034b59d313403b0b67 (patch)
tree8896ccd0eb38a9f66fc7e6022e14022eb9e70f90
parente3c6cb9ea6525405f5c145789fd88c7f344e6e1a (diff)
downloadjava-common-af04237130f6d1d1fce386034b59d313403b0b67.tar.gz
Simplified debian/rules using the dh sequencer
-rw-r--r--debian/changelog1
-rwxr-xr-xdebian/rules97
2 files changed, 24 insertions, 74 deletions
diff --git a/debian/changelog b/debian/changelog
index e1a2298..4401830 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,7 @@ java-common (0.54) UNRELEASED; urgency=medium
* Removed the not implemented --test option from update-java-alternatives
(Closes: #800024)
* Converted debian/copyright to the Copyright Format 1.0
+ * Simplified debian/rules using the dh sequencer
-- Emmanuel Bourg <ebourg@apache.org> Tue, 22 Sep 2015 09:23:34 +0200
diff --git a/debian/rules b/debian/rules
index 04d7750..3095fdd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,4 @@
#!/usr/bin/make -f
-# Made with the aid of dh_make, by Craig Small
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
-# Some lines taken from debmake, by Cristoph Lameter.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
@@ -79,63 +76,33 @@ jre_provides = $(call mk_cslist,$(provides),runtime)
jhl_provides = $(call mk_cslist,$(provides),runtime-headless)
jdk_provides = $(call mk_cslist,$(provides),sdk)
-build: build-arch
-build-arch:
- # Do nothing :)
-build-indep: build-stamp
-build-stamp:
- dh_testdir
+%:
+ dh $@
- touch build-stamp
+override_dh_link:
+ dh_link
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp install-stamp
+ # Link /usr/lib/jvm/default-java to the default JRE
+ dh_link -pdefault-jre-headless usr/lib/jvm/$(jvmdir) usr/lib/jvm/default-java
- dh_clean
-
-install-indep: install-stamp
-install-stamp: build-indep
- dh_testdir
- dh_testroot
- dh_prep -i
- dh_installdirs -i
+ # Link to the JDK documentation
+ dh_link -pdefault-jdk-doc /usr/share/doc/$(p_doc)/api usr/share/doc/default-jre-headless/api
+ dh_link -pdefault-jdk-doc /usr/share/doc/$(p_doc)/api usr/share/doc/default-jdk-doc/api
+override_dh_installdocs:
dh_installdocs -i
- touch install-stamp
-
-install-arch: build-arch
- dh_testdir
- dh_testroot
- dh_prep -a
-
+ # Install the changelog and copyright once in default-jre-headless and use links for the other packages
+ dh_installdocs -pdefault-jdk-doc
+ dh_installdocs -pdefault-jre-headless
+ dh_link -pdefault-jre /usr/share/doc/default-jre-headless /usr/share/doc/default-jre
+ dh_link -pdefault-jdk /usr/share/doc/default-jre /usr/share/doc/default-jdk
+ dh_link -pgcj-native-helper /usr/share/doc/default-jdk /usr/share/doc/gcj-native-helper
-binary-arch: install-arch
+override_dh_gencontrol:
+ dh_gencontrol -i
ifneq (,$(p_jre))
- dh_testdir -a
- dh_testroot -a
- dh_install -a
- dh_installdocs -pdefault-jre-headless
- dh_installdocs -pdefault-jdk-doc
- dh_installchangelogs -pdefault-jre-headless
- dh_installchangelogs -pdefault-jdk-doc
- dh_link -pdefault-jre-headless \
- usr/lib/jvm/$(jvmdir) usr/lib/jvm/default-java
- for p in default-jre-headless default-jre default-jdk gcj-native-helper; do \
- [ -z "$$t" ] && t=$$p && continue; \
- mkdir -p debian/$$p/usr/share/doc; \
- ln -sf $$t debian/$$p/usr/share/doc/$$p; \
- t=$$p; \
- done
- dh_link -pdefault-jdk-doc /usr/share/doc/$(p_doc)/api usr/share/doc/default-jre-headless/api
- dh_link -pdefault-jdk-doc /usr/share/doc/$(p_doc)/api usr/share/doc/default-jdk-doc/api
- dh_lintian -a
- dh_compress -a
- dh_fixperms -a
- dh_installdeb -a
dh_gencontrol -a -- \
-v$(dversion) \
'-Vjre=$(p_jre)' \
@@ -148,29 +115,11 @@ ifneq (,$(p_jre))
'-Vjdk:version=$(v_jdk)' \
'-Vjre:provides=$(jre_provides)' \
'-Vjhl:provides=$(jhl_provides)' \
- '-Vjdk:provides=$(jdk_provides)' \
-
- dh_md5sums -a
- dh_builddeb -a
+ '-Vjdk:provides=$(jdk_provides)'
endif
-# Build architecture-independent files here.
-binary-indep: build-indep install-indep
- dh_testdir -i
- dh_testroot -i
- dh_install -i
- dh_installexamples -i
- dh_installmenu -i
- dh_installman -i
- dh_installchangelogs -i
- dh_link -i
- dh_lintian -i
- dh_compress -i
- dh_fixperms -i
- dh_installdeb -i
- dh_gencontrol -i
- dh_md5sums -i
+override_dh_builddeb:
dh_builddeb -i
-
-binary: binary-indep binary-arch
-.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure
+ifneq (,$(p_jre))
+ dh_builddeb -a
+endif