[PATCH 10/11] Enable package to be built under debian lenny
Nick Andrew
nick at nick-andrew.net
Sun Jun 22 14:48:39 UTC 2008
- Change install directory to debian/tmp
- Add necessary *.install and *.examples files
Signed-off-by: Nick Andrew <nick at nick-andrew.net>
---
utils/debian/mogilefs-utils.examples | 1 +
utils/debian/mogilefs-utils.install | 4 ++++
utils/debian/rules | 10 +++++-----
3 files changed, 10 insertions(+), 5 deletions(-)
create mode 100644 utils/debian/mogilefs-utils.examples
create mode 100644 utils/debian/mogilefs-utils.install
diff --git a/utils/debian/mogilefs-utils.examples b/utils/debian/mogilefs-utils.examples
new file mode 100644
index 0000000..2fa5c25
--- /dev/null
+++ b/utils/debian/mogilefs-utils.examples
@@ -0,0 +1 @@
+conf/mogtool.conf
diff --git a/utils/debian/mogilefs-utils.install b/utils/debian/mogilefs-utils.install
new file mode 100644
index 0000000..bdafef2
--- /dev/null
+++ b/utils/debian/mogilefs-utils.install
@@ -0,0 +1,4 @@
+usr/bin /usr
+usr/share/man/man1 /usr/share/man
+usr/share/man/man3 /usr/share/man
+usr/share/perl5 /usr/share
diff --git a/utils/debian/rules b/utils/debian/rules
index 517ba0a..af0d53e 100755
--- a/utils/debian/rules
+++ b/utils/debian/rules
@@ -8,8 +8,7 @@
# This is the debhelper compatibility version to use.
# export DH_COMPAT=4
-PACKAGE=`pwd | sed -e "s/.*\/\\(.*\\)-.*/\\1/"`
-SHAREDIR=$(CURDIR)/debian/$(PACKAGE)/usr/share/$(PACKAGE)
+SHAREDIR=debian/tmp
build:
dh_testdir
@@ -29,15 +28,14 @@ install:
dh_clean -k
dh_installdirs
- $(MAKE) PREFIX=$(CURDIR)/debian/$(PACKAGE)/usr OPTIMIZE="-O2 -g -Wall" test install
+ $(MAKE) PREFIX=$(SHAREDIR)/usr OPTIMIZE="-O2 -g -Wall" test install
# No tests, so we smoke test like this:
perl -c mogtool
install -d $(SHAREDIR)
- install -m 644 conf/mogtool.conf $(SHAREDIR)/mogtool.conf.default
- -find $(CURDIR)/debian -type d | xargs rmdir -p --ignore-fail-on-non-empty
+ -find $(SHAREDIR) -type d | xargs rmdir -p --ignore-fail-on-non-empty
binary-arch:;
binary-indep: build install
@@ -46,6 +44,8 @@ binary-indep: build install
dh_installdocs
dh_installman
dh_installchangelogs
+ dh_install --sourcedir=$(SHAREDIR) --fail-missing
+ dh_installexamples
dh_link
dh_strip
dh_compress
More information about the mogilefs
mailing list