[Pkg-cups-devel] r607 - in cupsys/branches/cups-1.2-ubuntu: . debian

Martin Pitt mpitt at alioth.debian.org
Fri Oct 5 06:49:38 UTC 2007


Author: mpitt
Date: Fri Oct  5 06:49:38 2007
New Revision: 607

Log:
* Revert previous approach to symlinking of documentation directories, and
  do it in a way that's more in line with the existing code in
  debian/rules.
* debian/cupsys.docs: Remove duplicate files (LP: #149106).
* Make libcupsys2 replace the broken version of cupsys to help out people
  who used dpkg --force-overwrite wrongly.
* Fix dh_compress arguments to cope with moved examples.
* debian/cupsys.preinst, debian/cupsys-common.preinst: Remove old
  directories before unpack, since dpkg won't replace directories with
  symlinks.

Added:
   cupsys/branches/cups-1.2-ubuntu/debian/cupsys-common.preinst
Modified:
   cupsys/branches/cups-1.2-ubuntu/   (props changed)
   cupsys/branches/cups-1.2-ubuntu/debian/changelog
   cupsys/branches/cups-1.2-ubuntu/debian/control
   cupsys/branches/cups-1.2-ubuntu/debian/cupsys-bsd.postinst
   cupsys/branches/cups-1.2-ubuntu/debian/cupsys.docs
   cupsys/branches/cups-1.2-ubuntu/debian/cupsys.preinst
   cupsys/branches/cups-1.2-ubuntu/debian/rules

Modified: cupsys/branches/cups-1.2-ubuntu/debian/changelog
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/changelog	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/changelog	Fri Oct  5 06:49:38 2007
@@ -1,3 +1,18 @@
+cupsys (1.3.2-1ubuntu5) gutsy; urgency=low
+
+  * Revert previous approach to symlinking of documentation directories, and
+    do it in a way that's more in line with the existing code in
+    debian/rules.
+  * debian/cupsys.docs: Remove duplicate files (LP: #149106).
+  * Make libcupsys2 replace the broken version of cupsys to help out people
+    who used dpkg --force-overwrite wrongly.
+  * Fix dh_compress arguments to cope with moved examples.
+  * debian/cupsys.preinst, debian/cupsys-common.preinst: Remove old
+    directories before unpack, since dpkg won't replace directories with
+    symlinks.
+
+ -- Colin Watson <cjwatson at ubuntu.com>  Fri, 05 Oct 2007 02:46:34 +0100
+
 cupsys (1.3.2-1ubuntu4) gutsy; urgency=low
 
   * cupsys-common: Depend on libcupsys2.

Modified: cupsys/branches/cups-1.2-ubuntu/debian/control
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/control	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/control	Fri Oct  5 06:49:38 2007
@@ -13,7 +13,7 @@
 Architecture: any
 Depends: ${shlibs:Depends}
 Suggests: cupsys-common
-Replaces: cupsys-client (<= 1.1.10-2)
+Replaces: cupsys-client (<= 1.1.10-2), cupsys (= 1.3.2-1ubuntu4)
 Conflicts: gs-esp (<< 7.05.6-2), cupsys-driver-gimpprint (<< 4.2.5-3), cupsys (<< 1.2.1)
 Description: Common UNIX Printing System(tm) - libs
  The Common UNIX Printing System (or CUPS(tm)) is a printing system and 

Modified: cupsys/branches/cups-1.2-ubuntu/debian/cupsys-bsd.postinst
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/cupsys-bsd.postinst	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/cupsys-bsd.postinst	Fri Oct  5 06:49:38 2007
@@ -31,7 +31,7 @@
 	# Set documentation symlinks
 	if [ -d /usr/share/doc/cupsys ]; then
 	    if [ ! -e /usr/share/doc/cupsys-bsd ]; then
-		ln -sf cupsys /usr/share/doc/cupsys-bsd
+		ln -sf libcupsys2 /usr/share/doc/cupsys-bsd
 	    fi
 	fi
 

Added: cupsys/branches/cups-1.2-ubuntu/debian/cupsys-common.preinst
==============================================================================
--- (empty file)
+++ cupsys/branches/cups-1.2-ubuntu/debian/cupsys-common.preinst	Fri Oct  5 06:49:38 2007
@@ -0,0 +1,40 @@
+#! /bin/sh
+# preinst script for cupsys-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+
+case "$1" in
+    install)
+    ;;
+
+    upgrade)
+	if [ ! -L /usr/share/doc/cupsys-common ]; then
+	    rm -rf /usr/share/doc/cupsys-common
+	fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Modified: cupsys/branches/cups-1.2-ubuntu/debian/cupsys.docs
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/cupsys.docs	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/cupsys.docs	Fri Oct  5 06:49:38 2007
@@ -1,3 +1 @@
-CREDITS.txt
-README.txt
 debian/HOWTO_BUGREPORT.txt

Modified: cupsys/branches/cups-1.2-ubuntu/debian/cupsys.preinst
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/cupsys.preinst	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/cupsys.preinst	Fri Oct  5 06:49:38 2007
@@ -16,6 +16,10 @@
     ;;
 
     upgrade)
+	if [ ! -L /usr/share/doc/cupsys ]; then
+	    rm -rf /usr/share/doc/cupsys
+	fi
+
 	if [ -e /var/lib/cups/ppd -a ! -L /var/lib/cups/ppd -a ! -e /etc/cups/ppd ]; then
 	    echo -n "Moving printer definition files..."
 	    mkdir -p /etc/cups/ppd || true

Modified: cupsys/branches/cups-1.2-ubuntu/debian/rules
==============================================================================
--- cupsys/branches/cups-1.2-ubuntu/debian/rules	(original)
+++ cupsys/branches/cups-1.2-ubuntu/debian/rules	Fri Oct  5 06:49:38 2007
@@ -23,7 +23,7 @@
 DEB_INSTALL_CHANGELOGS_ALL := CHANGES.txt
 DEB_DH_INSTALLINIT_ARGS := -u'multiuser 19'
 DEB_DH_FIXPERMS_ARGS := -Xusr/lib/cups/backend-available
-DEB_DH_COMPRESS_ARGS := -Xusr/share/doc/cupsys/examples/scripting
+DEB_DH_COMPRESS_ARGS := -Xusr/share/doc/libcupsys2/examples/scripting
 DEB_DH_INSTALL_SOURCEDIR := debian/tmp
 LDFLAGS := -Wl,--as-needed
 
@@ -37,7 +37,15 @@
 	dh_movefiles -p$(cdbs_curpkg)
 
 binary-post-install/cupsys::
-	(cd $(DEB_DESTDIR)/../cupsys/usr/share/doc/cupsys && ln -sf ../../cups/doc-root online-docs)
+	# Just the documentation is enough; NEWS, changelogs, and copyright
+	# come via the symlink.
+	rm -f debian/cupsys/usr/share/doc/cupsys/NEWS*
+	rm -f debian/cupsys/usr/share/doc/cupsys/changelog*
+	rm -f debian/cupsys/usr/share/doc/cupsys/copyright
+	mv debian/cupsys/usr/share/doc/cupsys debian/cupsys/usr/share/doc/libcupsys2
+	ln -s libcupsys2 debian/cupsys/usr/share/doc/cupsys
+
+	(cd $(DEB_DESTDIR)/../cupsys/usr/share/doc/libcupsys2 && ln -sf ../../cups/doc-root online-docs)
 	install -m 755 debian/local/browsing_status debian/local/enable_browsing debian/local/sharing_status debian/local/enable_sharing $(DEB_DESTDIR)/../cupsys/usr/share/cups
 
 	# Install PPDs into /usr/share/ppd/cups-included/<Manufacturer>, see
@@ -60,6 +68,9 @@
 	# install AppArmor profile
 	install -D -m 644 debian/local/apparmor-profile $(DEB_DESTDIR)/../cupsys/etc/apparmor.d/usr.sbin.cupsd
 
+binary-post-install/libcupsimage2::
+	rm -r debian/libcupsimage2/usr/share/doc/libcupsimage2
+	ln -s libcupsys2 debian/libcupsimage2/usr/share/doc/libcupsimage2
 binary-post-install/libcupsimage2-dev::
 	rm -r debian/libcupsimage2-dev/usr/share/doc/libcupsimage2-dev
 	ln -s libcupsimage2 debian/libcupsimage2-dev/usr/share/doc/libcupsimage2-dev
@@ -72,27 +83,6 @@
 binary-post-install/cupsys-client::
 	rm -r debian/cupsys-client/usr/share/doc/cupsys-client
 	ln -s libcupsys2 debian/cupsys-client/usr/share/doc/cupsys-client
-
-common-binary-predeb-arch::
-	t=libcupsys2; \
-	for p in $$(dh_listpackages -a -N$$t); do \
-	  rm -rf debian/$$p/usr/share/doc/$$p; \
-	  ln -s $$t debian/$$p/usr/share/doc/$$p; \
-	  if [ -f debian/$$p.docs ]; then \
-	    mkdir -p debian/$$p/usr/share/doc/$$t; \
-	    cp -a $$(eval echo $$(cat debian/$$p.docs)) debian/$$p/usr/share/doc/$$t/; \
-	    dh_compress -p$$p; \
-	  fi; \
-	done
-
-common-binary-predeb-indep::
-	t=libcupsys2; \
-	for p in $$(dh_listpackages -i -N$$t); do \
-	  rm -rf debian/$$p/usr/share/doc/$$p; \
-	  ln -s $$t debian/$$p/usr/share/doc/$$p; \
-	  if [ -f debian/$$p.docs ]; then \
-	    mkdir -p debian/$$p/usr/share/doc/$$t; \
-	    cp -a $$(eval echo $$(cat debian/$$p.docs)) debian/$$p/usr/share/doc/$$t/; \
-	    dh_compress -p$$p; \
-	  fi; \
-	done
+binary-post-install/cupsys-common::
+	rm -r debian/cupsys-common/usr/share/doc/cupsys-common
+	ln -s libcupsys2 debian/cupsys-common/usr/share/doc/cupsys-common



More information about the Pkg-cups-devel mailing list