2000-09-09 22:10:08 -04:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2003-07-12 21:40:37 -04:00
|
|
|
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
|
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
2000-09-09 22:10:08 -04:00
|
|
|
|
2003-07-12 21:40:37 -04:00
|
|
|
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
|
2000-09-09 22:10:08 -04:00
|
|
|
|
|
|
|
|
2003-07-12 21:40:37 -04:00
|
|
|
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)
|
2001-08-01 08:30:48 -04:00
|
|
|
|
2003-07-12 21:40:37 -04:00
|
|
|
autoclean-files:
|
|
|
|
echo $@ >$@
|
2000-11-23 17:55:47 -05:00
|
|
|
|
2000-09-09 22:10:08 -04:00
|
|
|
build: build-stamp
|
|
|
|
build-stamp:
|
|
|
|
dh_testdir
|
|
|
|
|
2003-07-12 21:40:37 -04:00
|
|
|
./configure $(confflags) --prefix=/usr --mandir=\$${prefix}/share/man \
|
|
|
|
--infodir=\$${prefix}/share/info
|
2000-09-09 22:10:08 -04:00
|
|
|
$(MAKE)
|
2003-07-12 21:45:05 -04:00
|
|
|
$(MAKE) -C doc libraw1394.pdf
|
2000-09-09 22:10:08 -04:00
|
|
|
|
|
|
|
touch build-stamp
|
|
|
|
|
2003-07-12 21:40:37 -04:00
|
|
|
clean: autoclean-files
|
2000-09-09 22:10:08 -04:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2003-07-12 21:40:37 -04:00
|
|
|
rm -f build-stamp
|
2000-09-09 22:10:08 -04:00
|
|
|
|
|
|
|
-$(MAKE) distclean
|
|
|
|
|
|
|
|
dh_clean
|
2003-07-12 21:40:37 -04:00
|
|
|
xargs <autoclean-files rm -f
|
2000-09-09 22:10:08 -04:00
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
|
2003-07-12 21:40:37 -04:00
|
|
|
$(MAKE) install DESTDIR=`pwd`/debian/tmp
|
2000-09-09 22:10:08 -04:00
|
|
|
|
|
|
|
binary-indep: build install
|
|
|
|
# Nothing to do here
|
|
|
|
|
2003-07-12 21:40:37 -04:00
|
|
|
binary-arch: build install autoclean-files
|
2000-09-09 22:10:08 -04:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
|
2000-12-11 19:28:06 -05:00
|
|
|
dh_movefiles -p$(libraw) \
|
2000-09-09 22:10:08 -04:00
|
|
|
usr/lib/$(majorname) \
|
|
|
|
usr/lib/$(fullversionname)
|
|
|
|
|
2001-08-01 08:30:48 -04:00
|
|
|
dh_movefiles -plibraw1394-dev \
|
2003-07-12 21:40:37 -04:00
|
|
|
usr/bin/testlibraw \
|
2001-08-01 08:30:48 -04:00
|
|
|
usr/include/libraw1394 \
|
2003-07-12 21:40:37 -04:00
|
|
|
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
|
2001-08-01 08:30:48 -04:00
|
|
|
|
2001-05-24 18:10:45 -04:00
|
|
|
dh_installdocs
|
2000-09-09 22:10:08 -04:00
|
|
|
dh_installchangelogs
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
2003-07-12 21:40:37 -04:00
|
|
|
dh_link
|
2000-09-09 22:10:08 -04:00
|
|
|
dh_fixperms
|
2003-07-12 21:40:37 -04:00
|
|
|
dh_makeshlibs
|
|
|
|
dh_installdebconf
|
2000-09-09 22:10:08 -04:00
|
|
|
dh_installdeb
|
2003-07-12 21:40:37 -04:00
|
|
|
dh_shlibdeps -L $(libraw) -l debian/$(libraw)/usr/lib
|
2000-09-09 22:10:08 -04:00
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|