summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorGravatar bencollins 2003-07-13 01:40:37 +0000
committerGravatar bencollins 2003-07-13 01:40:37 +0000
commitf2f611bb614a0787def0dd2d46a4d46373909505 (patch)
tree7ef7c22ee8ebddf4165996ba2eae6e15936543e4 /debian/rules
parentOk, the Debian package was way out of sync with upstream (diff)
Update Debian files.
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@120 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to '')
-rwxr-xr-xdebian/rules70
1 files changed, 45 insertions, 25 deletions
diff --git a/debian/rules b/debian/rules
index f0aaab0..93120c1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,36 +1,48 @@
#!/usr/bin/make -f
-export DH_COMPAT=3
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-majorname = $(shell grep library_names src/libraw1394.la | cut -d"'" -f 2 | cut -d" " -f 2)
-fullversionname = $(shell grep library_names src/libraw1394.la | cut -d"'" -f 2 | cut -d" " -f 1)
+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS ?= -O2 -Wall -g
+else
+CFLAGS ?= -O0 -Wall -g
+endif
+
+export DEB_HOST_GNU_TYPE DEB_BUILD_GNU_TYPE CFLAGS
-major = 5
-libraw = libraw1394-$(major)
-# maintainer files for the so package (of the name $(libraw))
-somaint = postinst config templates
+majorname = $(shell grep library_names src/libraw1394.la \
+ | cut -d"'" -f 2 | cut -d" " -f 2)
+fullversionname = $(shell grep library_names src/libraw1394.la \
+ | cut -d"'" -f 2 | cut -d" " -f 1)
+major = $(shell echo $(majorname) | cut -d"." -f 3)
+
+libraw = libraw1394-$(major)
+source-version = $(shell dpkg-parsechangelog | grep ^Version | cut -d" " -f 2)
+autoclean-files:
+ echo $@ >$@
build: build-stamp
build-stamp:
dh_testdir
- ./configure --prefix=/usr --mandir=\$${prefix}/share/man
+ ./configure $(confflags) --prefix=/usr --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info
$(MAKE)
- $(MAKE) -C doc libraw1394.pdf
-
touch build-stamp
-clean:
+clean: autoclean-files
dh_testdir
dh_testroot
- rm -f build-stamp $(somaint:%=debian/$(libraw).%)
+ rm -f build-stamp
-$(MAKE) distclean
dh_clean
+ xargs <autoclean-files rm -f
install: build
dh_testdir
@@ -38,39 +50,47 @@ install: build
dh_clean -k
dh_installdirs
- $(MAKE) install prefix=`pwd`/debian/tmp/usr
+ $(MAKE) install DESTDIR=`pwd`/debian/tmp
binary-indep: build install
# Nothing to do here
-binary-arch: build install
+binary-arch: build install autoclean-files
dh_testdir
dh_testroot
- for i in $(somaint); do \
- ln -sf libraw1394.$$i.in debian/$(libraw).$$i; \
- done
-
dh_movefiles -p$(libraw) \
usr/lib/$(majorname) \
usr/lib/$(fullversionname)
dh_movefiles -plibraw1394-dev \
- usr/lib \
- usr/bin \
+ usr/bin/testlibraw \
usr/include/libraw1394 \
- usr/share/aclocal/libraw1394.m4
+ usr/lib \
+ usr/share/aclocal \
+ usr/share/man
+
+ echo >>autoclean-files \
+ debian/substvars \
+ debian/shlibs.local
+
+ echo "soversion=$(major)" >>debian/substvars
+
+ for i in postinst templates config; do \
+ echo >>autoclean-files debian/$(libraw).$$i; \
+ cp debian/libraw1394.$$i.in debian/$(libraw).$$i; \
+ done
- dh_installman
dh_installdocs
dh_installchangelogs
- dh_installdebconf
dh_strip
dh_compress
+ dh_link
dh_fixperms
- dh_makeshlibs -V
+ dh_makeshlibs
+ dh_installdebconf
dh_installdeb
- LD_PRELOAD='' dh_shlibdeps -v -ldebian/$(libraw)/usr/lib
+ dh_shlibdeps -L $(libraw) -l debian/$(libraw)/usr/lib
dh_gencontrol
dh_md5sums
dh_builddeb