Maintainer: Don Armstrong <don@debian.org>
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
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
#!/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
--- /dev/null
+version=3
+http://search.cpan.org/CPAN/authors/id/L/LE/LEGART/ Apache-Gallery-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$