#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 by Joey Hess.
#
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# DBS setup (See also: dbs(7))
TAR_DIR = pnm2ppa-1.12
include /usr/share/dbs/dbs-build.mk
ifeq (,$(DEB_BUILD_GNU_TYPE))
include /usr/share/dbs/dpkg-arch.mk
endif
CFLAGS=-DLANG_EN -O2 -Wall
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
configure: configure-stamp
configure-stamp: $(patched)
dh_testdir
# Add here commands to configure the package.
sed -e "s/@TAR_DIR@/$(TAR_DIR)/" debian/pnm2ppa.install.in \
> debian/pnm2ppa.install
sed -e "s/@TAR_DIR@/$(TAR_DIR)/" debian/pnm2ppa.examples.in \
> debian/pnm2ppa.examples
touch configure-stamp
build-arch: configure-stamp build-arch-stamp
build-arch-stamp: $(patched)
dh_testdir
# Add here command to compile/build the package.
cd $(BUILD_TREE) && $(MAKE)
touch build-arch-stamp
build: build-arch
clean:
dh_testdir
dh_testroot
-rm -f build-arch-stamp configure-stamp
# DBS -- remove the source and stamp dirs
-rm -rf $(STAMP_DIR) $(SOURCE_DIR)
# clean up generated control files
-rm -f debian/pnm2ppa.install debian/pnm2ppa.examples
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
dh_clean -k
# Add here commands to install the package into debian/pnm2ppa.
cd $(BUILD_TREE) && \
$(MAKE) -e install \
BINDIR=$(CURDIR)/debian/tmp/usr/bin \
CONFDIR=$(CURDIR)/debian/tmp/etc \
MANDIR=$(CURDIR)/debian/tmp/usr/share/man/man1
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdebconf -a
dh_installdirs -a
dh_install -a
dh_installdocs -a
dh_installexamples -a
dh_installman -a
dh_installchangelogs -a build-tree/$(TAR_DIR)/Changelog
dh_strip -a
dh_link -a
dh_compress -a
dh_fixperms -a -Xupdate-magicfilter
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-arch
.PHONY: build clean binary-arch binary install configure