summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2009-04-01 10:19:05 +0200
committerReinhard Tartler <siretart@tauware.de>2009-04-01 10:19:05 +0200
commit7e25d493cc56b3b7467c441edb5136c798fcdb76 (patch)
tree2ff5c9d4a5a6cc50836ff050c751ba3dfb4e700c /debian
parent8009c234c33c30ddd16ea66e81b09890a5b72ccf (diff)
factor out distribution agnostic cleanup commands in debian/clean.sh
this file could potentially be included upstream
Diffstat (limited to 'debian')
-rw-r--r--debian/clean.sh53
-rwxr-xr-xdebian/rules49
2 files changed, 54 insertions, 48 deletions
diff --git a/debian/clean.sh b/debian/clean.sh
new file mode 100644
index 00000000..3994c629
--- /dev/null
+++ b/debian/clean.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# small script to cleanup the intermediate build results. The boxbackup
+# upstream build environment seem to not include any mechanism to clean
+# the build tree up.
+#
+# in order to avoid cluttering the package build scripts, this is
+# factored out as a seperate, distribution agnostic cleanup script.
+
+rm -fr aclocal.m4 configure
+rm -fr contrib/*/bbackupd contrib/*/bbstored
+rm -fr lib/common/BoxConfig.h.in test/bbackupd/testfiles/bbackupd.conf
+
+# generated files for removal
+rm -vf ExceptionCodes.txt infrastructure/BoxPlatform.pm
+rm -vf lib/common/BoxConfig.h runtest.pl
+rm -vf infrastructure/makebuildenv.pl
+rm -vf infrastructure/makedistribution.pl
+rm -vf infrastructure/makeparcels.pl
+rm -vf lib/common/makeexception.pl
+rm -vf lib/common/BoxPortsAndFiles.h
+rm -vf lib/raidfile/raidfile-config
+rm -vf lib/server/makeprotocol.pl
+rm -vf test/backupstorefix/testfiles/testbackupstorefix.pl
+rm -vf test/bbackupd/testfiles/extcheck1.pl
+rm -vf test/bbackupd/testfiles/extcheck2.pl
+rm -vf test/bbackupd/testfiles/notifyscript.pl
+rm -vf test/bbackupd/testfiles/syncallowscript.pl
+rm -vf bin/bbackupd/bbackupd-config
+rm -vf bin/bbackupquery/makedocumentation.pl
+rm -vf bin/bbstored/bbstored-certs
+rm -vf bin/bbstored/bbstored-config
+rm -vf contrib/solaris/bbackupd-manifest.xml
+rm -vf contrib/solaris/bbackupd-smf-method
+rm -vf contrib/solaris/bbstored-manifest.xml
+rm -vf contrib/solaris/bbstored-smf-method
+rm -vf documentation/ExceptionCodes.xml
+rm -vf documentation/manpage.links
+rm -vf documentation/manpage.refs
+
+find . -name '*.o' | xargs --no-run-if-empty rm
+find . -name '*.a' | xargs --no-run-if-empty rm
+find . -name 'autogen_*' | xargs --no-run-if-empty rm
+find . -name '_*' | xargs --no-run-if-empty rm
+find . -name 'test-*.log' | xargs --no-run-if-empty rm
+find . -name 'Makefile' | xargs --no-run-if-empty rm
+
+# the test scripts do strange things here
+# (directories without write permissions)
+[ ! -d debug ] || chmod -R +rw debug/
+rm -vfr release/ debug/ local/ parcels/
+
+rm -vf documentation/instguide.pdf documentation/adminguide.pdf
diff --git a/debian/rules b/debian/rules
index bed3422f..1b748320 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,34 +46,6 @@ documentation/instguide.pdf:
documentation/adminguide.pdf: documentation/ExceptionCodes.xml
cd documentation && docbook2pdf adminguide.xml
-# generated files for removal
-GENERATED_FILES = ExceptionCodes.txt infrastructure/BoxPlatform.pm
-GENERATED_FILES += lib/common/BoxConfig.h runtest.pl
-GENERATED_FILES += infrastructure/makebuildenv.pl
-GENERATED_FILES += infrastructure/makedistribution.pl
-GENERATED_FILES += infrastructure/makeparcels.pl
-GENERATED_FILES += lib/common/makeexception.pl
-GENERATED_FILES += lib/common/BoxPortsAndFiles.h
-GENERATED_FILES += lib/raidfile/raidfile-config
-GENERATED_FILES += lib/server/makeprotocol.pl
-GENERATED_FILES += test/backupstorefix/testfiles/testbackupstorefix.pl
-GENERATED_FILES += test/bbackupd/testfiles/extcheck1.pl
-GENERATED_FILES += test/bbackupd/testfiles/extcheck2.pl
-GENERATED_FILES += test/bbackupd/testfiles/notifyscript.pl
-GENERATED_FILES += test/bbackupd/testfiles/syncallowscript.pl
-GENERATED_FILES += bin/bbackupd/bbackupd-config
-GENERATED_FILES += bin/bbackupquery/makedocumentation.pl
-GENERATED_FILES += bin/bbstored/bbstored-certs
-GENERATED_FILES += bin/bbstored/bbstored-config
-GENERATED_FILES += contrib/solaris/bbackupd-manifest.xml
-GENERATED_FILES += contrib/solaris/bbackupd-smf-method
-GENERATED_FILES += contrib/solaris/bbstored-manifest.xml
-GENERATED_FILES += contrib/solaris/bbstored-smf-method
-GENERATED_FILES += documentation/ExceptionCodes.xml
-GENERATED_FILES += documentation/manpage.links
-GENERATED_FILES += documentation/manpage.refs
-
-
build: build-stamp documentation/instguide.pdf documentation/adminguide.pdf
clean: clean-real unpatch
@@ -83,28 +55,9 @@ clean-real:
dh_clean build-stamp configure-stamp
echo "USE_SVN_VERSION\nboxbackup" > VERSION.txt
[ ! -f Makefile ] || make clean
-
- rm -fr aclocal.m4 configure
- rm -fr contrib/*/bbackupd contrib/*/bbstored
- rm -fr lib/common/BoxConfig.h.in test/bbackupd/testfiles/bbackupd.conf
-
- find . -name '*.o' | xargs --no-run-if-empty rm
- find . -name '*.a' | xargs --no-run-if-empty rm
- find . -name 'autogen_*' | xargs --no-run-if-empty rm
- find . -name '_*' | xargs --no-run-if-empty rm
- find . -name 'test-*.log' | xargs --no-run-if-empty rm
- find . -name 'Makefile' | xargs --no-run-if-empty rm
-
- # the test scripts do strange things here
- # (directories without write permissions)
- [ ! -d debug ] || chmod -R +rw debug/
- rm -fr release/ debug/ local/ parcels/
-
+ sh debian/clean.sh
dh_clean config.log config.status
dh_clean config.sub config.guess
- dh_clean documentation/instguide.pdf documentation/adminguide.pdf
-
- dh_clean $(GENERATED_FILES)
install: DH_OPTIONS=
install: build