From 4ce831d591d44c6137d885a44d0ac7d19a09539d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 26 Nov 2011 23:38:49 +0000 Subject: [PATCH] fixup for 1.0.2 release; use dh 8, mark conffiles git-svn-id: file:///srv/don_svn/deb_pkgs/libapache-gallery-perl/trunk@633 8f7917da-ec0b-0410-a553-b9b0e350d17e --- debian/compat | 1 + debian/control | 17 +++++--- debian/cron.daily | 14 +++---- debian/rules | 95 ++++++++++---------------------------------- debian/source/format | 1 + debian/watch | 2 + 6 files changed, 43 insertions(+), 87 deletions(-) create mode 100644 debian/compat create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control index 43dbaf1..307ca59 100644 --- a/debian/control +++ b/debian/control @@ -2,15 +2,20 @@ Source: libapache-gallery-perl Maintainer: Don Armstrong Priority: optional Section: perl -Build-Depends-Indep: perl (>= 5.6.0-17), libmodule-build-perl, sharutils -Build-Depends: debhelper (>= 3.0.5) -Standards-Version: 3.7.2 +Build-Depends-Indep: perl, libmodule-build-perl, sharutils, + libapache2-mod-perl2 (>=2.0) | libapache-request-perl, + libimage-size-perl, libimage-info-perl, libtemplate-perl, + libimage-imlib2-perl, libtext-template-perl +Build-Depends: debhelper (>= 8) +Standards-Version: 3.9.2 Package: libapache-gallery-perl Architecture: all -Priority: optional -Depends: ${perl:Depends}, libapache2-mod-perl2 (>= 2.0) | libapache-request-perl, libimage-size-perl, libimage-info-perl, libtemplate-perl, libimage-imlib2-perl, libtext-template-perl -Description: Apache module to create galleries on-the-fly +Depends: ${perl:Depends}, ${misc:Depends}, libapache2-mod-perl2 (>= + 2.0) | libapache-request-perl, libimage-size-perl, + libimage-info-perl, libtemplate-perl, libimage-imlib2-perl, + libtext-template-perl +Description: Apache module to create image galleries on-the-fly This package contains a Perl module for Apache to create galleries. . The images just need to be copied into a directory where Apache will pick diff --git a/debian/cron.daily b/debian/cron.daily index f196666..0fe36db 100644 --- a/debian/cron.daily +++ b/debian/cron.daily @@ -6,18 +6,18 @@ set -e -cachedir=/var/tmp/Apache-Gallery -user=www-data +cachedir="/var/cache/www" +user="www-data" -if [ -d $cachedir ]; then +if [ -d "$cachedir" ]; then # remove old files start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \ - --oknodo --chuid $user -- -c \ - "find $cachedir -type f -atime +6 -print0 | xargs -r0 rm -f" + --oknodo --chuid "$user" -- -c \ + "find '$cachedir' -type f -atime +6 -delete" # remove empty directories start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \ - --oknodo --chuid $user -- -c \ - "find $cachedir -depth -type d -print0 | \ + --oknodo --chuid "$user" -- -c \ + "find '$cachedir' -depth -type d -print0 | \ xargs -r0 rmdir --ignore-fail-on-non-empty" fi diff --git a/debian/rules b/debian/rules index f8d4830..0e848ef 100755 --- a/debian/rules +++ b/debian/rules @@ -1,79 +1,26 @@ #!/usr/bin/make -f -#export DH_VERBOSE=1 - -export DH_COMPAT := 4 - -PERL ?= /usr/bin/perl - -b := $(shell pwd)/debian/libapache-gallery-perl - -arrange: arrange-stamp -arrange-stamp: install - dh_testdir - touch arrange-stamp - -binary: binary-stamp -binary-stamp: binary-indep binary-arch - dh_testdir - touch binary-stamp - -binary-arch: binary-arch-stamp -binary-arch-stamp: arrange - dh_testdir - touch binary-arch-stamp - -binary-indep: binary-indep-stamp -binary-indep-stamp: arrange - dh_testdir - dh_testroot - dh_installman - dh_installdocs README - dh_installchangelogs Changes - dh_installcron - dh_fixperms - dh_installdeb - dh_perl - dh_compress - dh_gencontrol - dh_md5sums - dh_builddeb - touch binary-indep-stamp - -build: build-stamp -build-stamp: config - dh_testdir - $(MAKE) - touch build-stamp - -clean: - dh_testdir - dh_testroot - -$(MAKE) clean - if [ -e Makefile ]; then $(MAKE) -i distclean; fi - dh_clean arrange-stamp binary-stamp binary-arch-stamp binary-indep-stamp build-stamp config-stamp install-stamp - rm -f htdocs/text-text.png htdocs/text-html.png - rm -rf debian/libapache-gallery-perl - rm -rf Makefile.old - -config: config-stamp -config-stamp: - dh_testdir - $(PERL) Makefile.PL INSTALLDIRS=vendor - # deal with uuencoded icons +%: + dh $@ + +# it is necessary to set MOD_PERL_API_VERSION to 2 to avoid trying to +# use modperl 1 +override_dh_auto_test: + MOD_PERL_API_VERSION=2 dh_auto_test; + +# install templates and icons +override_dh_auto_install: + dh_auto_install; + cp -r templates/* debian/libapache-gallery-perl/usr/share/libapache-gallery-perl/templates/.; + cp -r htdocs/* debian/libapache-gallery-perl/usr/share/libapache-gallery-perl/icons/.; + +# put the missing icons in place +override_dh_auto_configure: + dh_auto_configure; uudecode -o htdocs/text-txt.png debian/text-text.png.uuencode uudecode -o htdocs/text-html.png debian/text-html.png.uuencode - touch config-stamp - -install: install-stamp -install-stamp: build - dh_testdir - dh_clean -k - dh_installdirs - $(MAKE) - $(MAKE) install PREFIX=$(CURDIR)/debian/libapache-gallery-perl/usr - cp -r $(CURDIR)/templates/* $(CURDIR)/debian/libapache-gallery-perl/usr/share/libapache-gallery-perl/templates - cp -r $(CURDIR)/htdocs/* $(CURDIR)/debian/libapache-gallery-perl/usr/share/libapache-gallery-perl/icons - touch install-stamp -.PHONY: binary binary-arch binary-indep clean +# remove the missing icons on clean +override_dh_auto_clean: + dh_auto_clean; + rm -f htdocs/text-text.png htdocs/text-html.png diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..940ccd5 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://search.cpan.org/CPAN/authors/id/L/LE/LEGART/ Apache-Gallery-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ -- 2.39.2