1#!/usr/bin/make -f 2# Sample debian/rules that uses debhelper. 3# GNU copyright 1997 by Joey Hess. 4# 5# This version is for a hypothetical package that builds an 6# architecture-dependant package, as well as an architecture-independent 7# package. 8 9# Uncomment this to turn on verbose mode. 10# export DH_VERBOSE=1 11 12DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) 13 14configure: configure-stamp 15configure-stamp: 16 dh_testdir 17 # Add here commands to configure the package. 18 CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --bindir=/usr/bin --prefix=/usr --mandir=\$${prefix}/share/man 19 touch configure-stamp 20 21build: configure-stamp build-stamp 22build-stamp: 23 dh_testdir 24 25 # Add here commands to compile the package. 26 PREFIX=/usr MANDIR=/usr/share/man $(MAKE) -e 27 28 touch build-stamp 29 30clean: 31 dh_testdir 32 dh_testroot 33 34 # Add here commands to clean up after the build process. 35 -$(MAKE) distclean 36 37 rm -f build-stamp configure-stamp debian/substvars 38 39 dh_clean 40 41install: DH_OPTIONS= 42install: build 43 dh_testdir 44 dh_testroot 45 dh_clean 46 dh_installdirs 47 48 # Add here commands to install the package into debian/tmp 49 $(MAKE) -e install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr 50 51 dh_install --autodest --sourcedir=debian/tmp 52 53 dh_installman 54 55# Build architecture-independent files here. 56# Pass -i to all debhelper commands in this target to reduce clutter. 57binary-indep: build install 58# nothing to do here 59 60# Build architecture-dependent files here. 61binary-arch: build install 62 dh_testdir -a 63 dh_testroot -a 64 dh_installdocs -a 65 dh_installexamples -a 66 dh_installmenu -a 67 dh_installchangelogs ChangeLog -a 68 dh_strip -a 69 dh_link -a 70 dh_compress -a -X archive -X .c -X .h 71 dh_fixperms -a 72 dh_makeshlibs -V -v 73 dh_installdeb -a 74ifeq ($(DEB_HOST_ARCH_OS),kfreebsd) 75 echo kfreebsd:Depends=libcam-dev >>debian/libsgutils2-dev.substvars 76endif 77 dh_shlibdeps -ldebian/tmp/usr/lib -L libsgutils2 78 dh_gencontrol -a 79 dh_md5sums -a 80 dh_builddeb -a 81 82binary: binary-indep binary-arch 83.PHONY: build clean binary-indep binary-arch binary install configure 84