diff options
author | Roger Leigh <rleigh@debian.org> | 2005-07-02 10:12:46 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2008-10-26 16:11:51 +0000 |
commit | f1d9b10b49a94b8d37e127a715eda357c00f279d (patch) | |
tree | be8985e3b25a7ed5635a0d8564e68fd92d72e7c0 /debian/rules | |
parent | f2b4d3f834c0f7faa7233f894ba92c2b1da51e0f (diff) |
Imported Debian patch 4.3.99+cvs20050702-1
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 142 |
1 files changed, 51 insertions, 91 deletions
diff --git a/debian/rules b/debian/rules index 113bdc9..6761aae 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,8 @@ #!/usr/bin/make -f -# rules to package GIMP-Print -# $Id: rules,v 1.29.2.11 2003/01/24 00:08:33 rleigh Exp $ +# rules to package gutenprint +# $Id: rules,v 1.58 2005/06/26 17:06:59 rleigh Exp $ # -# Uncomment this to turn on verbose mode. +# Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. @@ -10,15 +10,9 @@ export DH_OPTIONS # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -DEB_BUILD_GNU_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) -DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM) - -ifneq (, $(filter $(DEB_BUILD_GNU_SYSTEM), kfreebsd-gnu knetbsd-gnu)) -DEB_BUILD_GNU_TYPE = $(DEB_BUILD_GNU_CPU)-gnu -DEB_HOST_GNU_TYPE = $(DEB_HOST_GNU_CPU)-gnu -endif +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g @@ -27,37 +21,42 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif -# Get upstream version, and define libgimpprint suffix -UPSTREAM_VERSION = $(shell dpkg-parsechangelog | grep ^Version | sed "s/.* //" | sed "s/-[^-]*$$//") +# Get upstream version, and define libgutenprint suffix +#UPSTREAM_VERSION = $(shell dpkg-parsechangelog | grep ^Version | sed "s/.* //" | sed "s/-[^-]*$$//") +UPSTREAM_VERSION = 5.0.0-rc1 +UPSTREAM_VERSION_COMPACT = $(shell echo '$(UPSTREAM_VERSION)' | sed "s/\(.*\..*\)\..*/\1/" #LIBRARY_VERSION = -$(UPSTREAM_VERSION) -LIBRARY_VERSION = 1 +LIBRARY_VERSION = 2 +LIBRARYUI_VERSION = 1 + +GENERATED_FILES = \ + debian/libgutenprint2.install autoconfigure: autoconfigure-stamp -autoconfigure-stamp: debian/control debian/libgimpprint-doc.doc-base debian/libgimpprint-doc.install +autoconfigure-stamp: debian/control $(GENERATED_FILES) dh_testdir - - cd debian; \ - for file in libgimpprint*; do \ - ln -sf $$file `echo $$file | sed -e 's/libgimpprint/libgimpprint$(LIBRARY_VERSION)/'`; \ - done - rm debian/libgimpprint$(LIBRARY_VERSION)*.in mkdir debian/build; \ cd debian/build; \ - ../../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-static --enable-shared --without-gimp --with-cups --with-ijs --with-foomatic --with-foomatic3 --disable-test --without-translated-ppds --disable-cups-level3-ps - # Create cups-genppdupdate manual page - cd debian/build; \ - CONFIG_HEADERS= CONFIG_FILES=debian/cups-genppdupdate.8 ./config.status; \ - mv debian/cups-genppdupdate.8 ..; \ - rmdir debian - + ../../configure --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr --mandir=\$${prefix}/share/man \ + --disable-static --enable-shared --disable-rpath \ + --with-modules=dlopen \ + --enable-libgutenprintui --enable-libgutenprintui2 \ + --without-gimp --with-gimp2 --with-cups --with-ijs \ + --with-foomatic --with-foomatic3 \ + --disable-test \ + --enable-cups-level3-ppds --disable-translated-ppds \ + --disable-cups-level3-ps --disable-static-genppd touch autoconfigure-stamp + build: build-stamp debian/control build-stamp: autoconfigure-stamp dh_testdir cd debian/build; \ - $(MAKE); + $(MAKE) touch build-stamp @@ -72,13 +71,10 @@ clean: debian/control cp -f /usr/share/misc/config.guess scripts/config.guess rm -rf debian/build debian/install - rm -rf debian/libgimpprint-doc.doc-base debian/libgimpprint-doc.install - rm -rf debian/libgimpprint$(LIBRARY_VERSION).files - rm -rf debian/libgimpprint$(LIBRARY_VERSION).postinst - rm -f debian/cups-genppdupdate.8 -$(MAKE) distclean - rm -rf $(CURDIR)/debian/libgimpprint$(LIBRARY_VERSION)* + rm -f $(GENERATED_FILES) + dh_clean install: DH_OPTIONS= @@ -95,21 +91,11 @@ install: build debian/control # Build architecture-independent files here. -binary-indep: build install ChangeLog +binary-indep: build install dh_testdir -i dh_testroot -i -# dh_installdebconf -i dh_installdocs -i - cd debian/libgimpprint$(LIBRARY_VERSION)-doc/usr/share/doc/libgimpprint$(LIBRARY_VERSION)-doc/html; \ - if test ! -f gimpprint.html; then \ - ln -s gimpprint_toc.html gimpprint.html; \ - fi - cd debian/gimpprint-doc/usr/share/doc/gimpprint-doc/html; \ - if test ! -f index.html; then \ - ln -s book1.html index.html; \ - fi dh_installexamples -i - dh_installinfo -plibgimpprint$(LIBRARY_VERSION)-doc debian/install/usr/share/info/* dh_installchangelogs -i NEWS dh_link -i dh_compress -i @@ -120,67 +106,41 @@ binary-indep: build install ChangeLog dh_builddeb -i # Build architecture-dependent files here. -binary-arch: build install ChangeLog +binary-arch: build install dh_testdir -a dh_testroot -a dh_installdocs -a - cp src/cups/README debian/cupsys-driver-gimpprint/usr/share/doc/cupsys-driver-gimpprint/README.cups + cp src/cups/README debian/cupsys-driver-gutenprint/usr/share/doc/cupsys-driver-gutenprint/README.cups + mv debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppd.8 debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppd.5.0.8 + mv debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppdconfig.8 debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppdconfig.5.0.8 + mv debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppdupdate.8 debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppdupdate.5.0.8 + mv debian/ijsgutenprint/usr/share/man/man1/ijsgutenprint.1 debian/ijsgutenprint/usr/share/man/man1/ijsgutenprint.5.0.1 + ln -s ./ijsgutenprint.5.0.1.gz debian/ijsgutenprint/usr/share/man/man1/ijsgutenprint.1.gz + ln -s debian/ijsgutenprint/usr/bin/ijsgutenprint.5.0 debian/ijsgutenprint/usr/bin/ijsgutenprint dh_installexamples -a dh_installchangelogs -a NEWS dh_strip -a dh_link -a dh_compress -a dh_fixperms -a - dh_makeshlibs -a -V +# Strip DT_RPATH from CUPS binaries. + find debian/cupsys-driver-gutenprint/usr/lib -type f -perm +0111 -print0 | xargs -0 chrpath --delete + chrpath --delete debian/cupsys-driver-gutenprint/usr/sbin/cups-genppd.5.0 + dh_makeshlibs -a -V -X usr/lib/gutenprint dh_installdeb -a - dh_shlibdeps -a -l`pwd`/debian/libgimpprint$(LIBRARY_VERSION)/usr/lib + dh_shlibdeps -a -X usr/lib/gutenprint -l$(CURDIR)/debian/libgutenprint$(LIBRARY_VERSION)/usr/lib:$(CURDIR)/debian/libgutenprintui1-$(LIBRARYUI_VERSION)/usr/lib:$(CURDIR)/debian/libgutenprintui2-$(LIBRARYUI_VERSION)/usr/lib dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch -# Make sure ChangeLog is up-to-date. -ChangeLog: changelog-stamp -changelog-stamp: build - $(MAKE) ChangeLog - -SEDPATTERN = -e "s/\#UPSTREAM_VERSION\#/$(UPSTREAM_VERSION)/g" -e "s/\#LIBRARY_VERSION\#/$(LIBRARY_VERSION)/g" - -# Make sure debian/control is up-to-date. -debian/control: debian/changelog debian/control.in - sed $(SEDPATTERN) <debian/control.in >debian/control - -# Make sure debian/libgimpprint-doc.doc-base is up-to-date. -debian/libgimpprint-doc.doc-base: debian/changelog debian/libgimpprint-doc.doc-base.in - sed $(SEDPATTERN) <debian/libgimpprint-doc.doc-base.in >debian/libgimpprint-doc.doc-base - -# Make sure debian/libgimpprint-doc.install is up-to-date. -debian/libgimpprint-doc.install: debian/changelog debian/libgimpprint-doc.install.in - sed $(SEDPATTERN) <debian/libgimpprint-doc.install.in >debian/libgimpprint-doc.install - - -# Make sure that configure is up-to-date. -configure: configure.in scripts/install-sh - if test -f configure.in; then \ - if test -f autogen.sh; then \ - export NOCONFIGURE=TRUE; \ - /bin/sh autogen.sh; \ - fi \ - fi - -configure.in: configure.in.in - if test -f configure.in.in; then \ - if test -f autogen.sh; then \ - NOCONFIGURE=TRUE /bin/sh autogen.sh; \ - fi \ - fi +SEDPATTERN = -e "s/\#UPSTREAM_VERSION\#/$(UPSTREAM_VERSION)/g" -e "s/\#LIBRARY_VERSION\#/$(LIBRARY_VERSION)/g" -e "s/\#LIBRARYUI_VERSION\#/$(LIBRARYUI_VERSION)/g" -scripts/install-sh: - if test -f autogen.sh; then \ - NOCONFIGURE=TRUE /bin/sh autogen.sh; \ - fi +debian/control: debian/control.in debian/changelog debian/rules + sed $(SEDPATTERN) <$< >$@ -configure.in.in: +debian/libgutenprint2.install: debian/libgutenprint2.install.in debian/changelog + sed $(SEDPATTERN) <$< >$@ -.PHONY: build clean binary-indep binary-arch binary install autoconfigure NEWS +.PHONY: build clean binary-indep binary-arch binary install autoconfigure |