[sawfish: 24/42] merged debian packaging scripts from Ian Zimmermann



commit e1a098d965f469bc2ba902bae1abdd9da6332d13
Author: Christopher Roy Bratusek <nano tuxfamily org>
Date:   Wed Apr 13 21:13:02 2011 +0200

    merged debian packaging scripts from Ian Zimmermann

 debian/rules           |   85 ++++++++++++++++++++++++++++++++----------------
 debian/sawfish.install |   10 +-----
 2 files changed, 58 insertions(+), 37 deletions(-)
---
diff --git a/debian/rules b/debian/rules
index bd71e69..4900acb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,17 +1,6 @@
 #!/usr/bin/make -f
 
-export DH_VERBOSE=1
-
-version = $(shell sed -n 's/version="\(.*\)"/\1/p' configure.in | head -n 1)
-
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-  confflags += --build $(DEB_HOST_GNU_TYPE)
-else
-  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-endif
+version := $(shell sed -n 's/version="\(.*\)"/\1/p' configure.in | head -n 1)
 
 CFLAGS += -Wall -g -fno-strict-aliasing
 
@@ -21,27 +10,67 @@ else
 	CFLAGS += -O2
 endif
 
+LC_ALL=
+LINGUAS=
+LANG=
+export LC_ALL LINGUAS LANG
+
+DEB_CONFIGURE_USER_FLAGS = --with-readline
+
+lisp_source_extras = debian/tmp/usr/share/sawfish/*/lisp -name "*.jl" \
+	\! -name "*autoload*" \! -name "*custom-defaults*"
+
+data_extras = debian/tmp/usr/share/sawfish/*/lisp -name "*.jlc" \! -name "*main*"
+
+data_extradirs = debian/tmp/usr/share/sawfish/$(version)/sounds \
+	debian/tmp/usr/share/sawfish/$(version)/themes \
+	debian/tmp/usr/share/xsessions \
+	debian/tmp/usr/include
+
+dh_install_auto = xargs dh_install --autodest
+
+dh_install_data = dh_install -psawfish-data --autodest
+
 %:
-	dh $@
+	dh $@ --with autotools-dev --with autoreconf
+
+override_dh_auto_configure:
+	env CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" dh_auto_configure -- $(DEB_CONFIGURE_USER_FLAGS)
+
+override_dh_auto_install:
+	dh_auto_install
+	$(CURDIR)/debian/edit-la-files debian/tmp
+	find $(lisp_source_extras) | $(dh_install_auto) -psawfish-lisp-source
+	find $(data_extras) | $(dh_install_auto) -psawfish-data
+	dh_install -psawfish-data sawfish.el usr/share/emacs/site-lisp/sawfish
+	for d in $(data_extradirs) ; do dh_install -psawfish-data --autodest $$d ; done
+
+override_dh_installdocs:
+	dh_installdocs --link-doc=sawfish-data
+	dh_installdocs -psawfish-data  FAQ NEWS README TODO OPTIONS KEYBINDINGS USERDOC debian/README.*
 
-override_dh_install:
-	dh_testdir
-	dh_testroot
-	dh_installdirs
+override_dh_installchangelogs:
+	dh_installchangelogs -psawfish-data
 
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+override_dh_installman:
+	dh_installman -psawfish man/*.1
 
-	find debian -type d -name info | xargs rm -rf
+override_dh_strip:
+	dh_strip -a --dbg-package=sawfish-dbg
 
-	[ ! -f debian/sawfish-lisp-source.install ] || rm debian/sawfish-lisp-source.install
-	find debian/tmp/usr/share/sawfish/*/lisp -name \*.jl | \
-	 cut -d/ -f3- | grep -v 'autoload\|custom-defaults' > debian/sawfish-lisp-source.install
+override_dh_shlibdeps:
+	dh_shlibdeps -- --warnings=2
 
-	cp debian/sawfish-data.install.in debian/sawfish-data.install
-	find debian/tmp/usr/share/sawfish/*/lisp -name \*.jlc | \
-	 cut -d/ -f3- | grep -v 'cfg/main' >> debian/sawfish-data.install
+# Get rid of rpath
+	# SET -E; \
+	#  TMPFILE=`MKTEMP`; \
+	#  SED "S/^REP_LIBS=\(.*\)-WL,--RPATH -WL,[^ ]* \(.*\)$$/REP_LIBS=\1 \2/" MAKEDEFS >$$TMPFILE ;\
+	#  MV $$TMPFILE MAKEDEFS
 
-	dh_install --fail-missing
+# Remove info files installed by Makefile. dh_installinfo will do it again without creating info.dir
+	# find debian -type d -name info | xargs rm -rf
 
-	chmod a+x debian/sawfish/usr/share/sawfish/$(version)/lisp/sawfish/cfg/main.jlc
-	chmod a+x debian/sawfish-lisp-source/usr/share/sawfish/$(version)/lisp/sawfish/cfg/main.jl
+# These are scripts. (Actually, they are /usr/bin/sawfish-config before and after compiling)
+# Should that be a symlink?
+	# chmod a+x debian/sawfish/usr/share/sawfish/$(version)/lisp/sawfish/cfg/main.jlc
+	# chmod a+x debian/sawfish-lisp-source/usr/share/sawfish/$(version)/lisp/sawfish/cfg/main.jl
diff --git a/debian/sawfish.install b/debian/sawfish.install
index a13fbc9..527b78f 100644
--- a/debian/sawfish.install
+++ b/debian/sawfish.install
@@ -1,10 +1,2 @@
-sawfish.el   usr/share/emacs/site-lisp/sawfish
-usr/share/applications/sawfish.desktop
-usr/share/gnome/wm-properties/sawfish-wm.desktop
-usr/share/kde4/apps/ksmserver/windowmanagers/sawfish.desktop
-usr/share/sawfish/sawfish.png
-usr/share/xsessions/sawfish.desktop
-usr/share/sawfish/*/lisp/sawfish/cfg/main.jlc
-usr/include/sawfish/
-usr/lib
 usr/bin
+usr/lib



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