From f2f611bb614a0787def0dd2d46a4d46373909505 Mon Sep 17 00:00:00 2001 From: bencollins Date: Sun, 13 Jul 2003 01:40:37 +0000 Subject: [PATCH] Update Debian files. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@120 53a565d1-3bb7-0310-b661-cf11e63c67ab --- debian/compat | 1 + debian/libraw1394.config.in | 11 ++++++ debian/libraw1394.templates.in | 16 ++++++++ debian/rules | 70 ++++++++++++++++++++++------------ 4 files changed, 73 insertions(+), 25 deletions(-) create mode 100644 debian/compat create mode 100644 debian/libraw1394.config.in create mode 100644 debian/libraw1394.templates.in diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/libraw1394.config.in b/debian/libraw1394.config.in new file mode 100644 index 0000000..e253348 --- /dev/null +++ b/debian/libraw1394.config.in @@ -0,0 +1,11 @@ +#!/bin/sh -e + +. /usr/share/debconf/confmodule +db_version 2.0 + +if [ "$1" = "configure" ]; then + if [ ! -c /dev/.devfsd -a ! -c /dev/raw1394 ]; then + db_input low libraw1394/device_node || true + db_go + fi +fi diff --git a/debian/libraw1394.templates.in b/debian/libraw1394.templates.in new file mode 100644 index 0000000..9d45a99 --- /dev/null +++ b/debian/libraw1394.templates.in @@ -0,0 +1,16 @@ +Template: libraw1394/device_node +Type: note +Description: Check that /dev/raw1394 permissions are appropriate for you. + The device file /dev/raw1394 will be created for libraw1394. This library is + used by applications to access FireWire devices. + . + The default access permissions allows only users in the "disk" group. This + restrictive setting was chosen since raw1394 allows almost full access to the + FireWire bus and all connected devices are accessible, which may include hard + disks. + . + If you don't intend to connect sensitive devices and e.g. only want to get + video streams out of a camera, you can relax the permissions. If you don't + have malicious users on your system, you can allow access for all users with + this command (executed as the root user): + chmod 666 /dev/raw1394 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 + + +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) -major = 5 libraw = libraw1394-$(major) +source-version = $(shell dpkg-parsechangelog | grep ^Version | cut -d" " -f 2) -# maintainer files for the so package (of the name $(libraw)) -somaint = postinst config templates - +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 \ + 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