From d01709b34097fd8a66d8f0b4c0ec9a39d4732e4c Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Thu, 17 Jan 2013 02:34:46 +0100 Subject: [PATCH] Debian package: Switch to a dh style debian/rules --- debian/changelog | 1 + debian/rules | 115 +++++++++++-------------------------------------------- 2 files changed, 24 insertions(+), 92 deletions(-) rewrite debian/rules (66%) diff --git a/debian/changelog b/debian/changelog index 32632c9..e188942 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ conkeror (1.0~~pre+git130117-1) UNRELEASED; urgency=low - Use more debhelper magic, no more manual cp, ln, or mkdir. - Remove unnecessary comments and blank lines. - Add some blank lines to gather related lines together in blocks. + - Finally switch to a dh style debian/rules. -- Axel Beckert Thu, 17 Jan 2013 01:42:48 +0100 diff --git a/debian/rules b/debian/rules dissimilarity index 66% index 0ec514f..738fe24 100755 --- a/debian/rules +++ b/debian/rules @@ -1,92 +1,23 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - -# Generating a xulrunner build id and other strings -DEBIAN_VERSION := $(shell echo -n `head -1 debian/changelog | sed -e 's/^.*(\(.*\)).*$$/\\1/'`) -BUILDID := $(shell echo -n `whoami`@`hostname`)_$(shell date +%s) -USC = $(CURDIR)/debian/conkeror/usr/share/conkeror - -configure: configure-stamp -configure-stamp: - dh_testdir - touch $@ - -build: build-arch build-indep -build-arch: build-arch-stamp -build-arch-stamp: configure-stamp - dh_auto_build - touch $@ - -build-indep: build-indep-stamp -build-indep-stamp: configure-stamp - touch $@ - -clean: - dh_testdir - dh_testroot - dh_auto_clean - dh_clean - -install: install-indep install-arch -install-indep: - dh_testdir - dh_testroot - dh_prep -i - dh_installdirs -i - dh_install -i - - # Add generated Build ID and Debian version to version output - sed -e 's/BuildID=git/BuildID=${BUILDID}/;s/^Version=\(.*\)$$/Version=\1 (Debian-${DEBIAN_VERSION})/' \ - -i $(USC)/application.ini - - # Use Debian version for M-x version output - sed -e 's/Version=\(.*\)/Version=\1 (Debian-${DEBIAN_VERSION})/' \ - -i $(USC)/components/application.js - -install-arch: - dh_testdir - dh_testroot - dh_prep -s - dh_installdirs -s - dh_link -s - dh_install -s - -# Must not depend on anything. This is to be called by -# binary-arch/binary-indep in another 'make' thread. -binary-common: - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs -# dh_installexamples - dh_installmenu -# dh_installemacsen - dh_installman - dh_bugfiles - dh_lintian - dh_link - dh_strip - dh_compress - dh_fixperms - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -# Build architecture independant packages using the common target. -binary-indep: build-indep install-indep - $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common - -# Build architecture dependant packages using the common target. -binary-arch: build-arch install-arch - $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common - -binary: binary-arch binary-indep -.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure +#!/usr/bin/make -f +# -*- makefile -*- +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# Generating a xulrunner build id and other strings +DEBIAN_VERSION := $(shell echo -n `head -1 debian/changelog | sed -e 's/^.*(\(.*\)).*$$/\\1/'`) +BUILDID := $(shell echo -n `whoami`@`hostname`)_$(shell date +%s) +USC = $(CURDIR)/debian/conkeror/usr/share/conkeror + +%: + dh $@ + +override_dh_install-indep: + dh_install -i + + # Add generated Build ID and Debian version to version output + sed -e 's/BuildID=git/BuildID=${BUILDID}/;s/^Version=\(.*\)$$/Version=\1 (Debian-${DEBIAN_VERSION})/' \ + -i $(USC)/application.ini + + # Use Debian version for M-x version output + sed -e 's/Version=\(.*\)/Version=\1 (Debian-${DEBIAN_VERSION})/' \ + -i $(USC)/components/application.js -- 2.11.4.GIT