Codebase list pnm2ppa / df8fd31 debian / rules
df8fd31

Tree @df8fd31 (Download .tar.gz)

rules @df8fd31raw · history · blame

#!/usr/bin/make -f
# This file is public domain software, originally written by Joey Hess. 

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
export DH_COMPAT=3

CFLAGS=-DLANG_EN -O2 -Wall
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS+=-g
endif

build: build-stamp
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	$(MAKE) CFLAGS="$(CFLAGS)"

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	$(MAKE) clean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs usr/bin etc usr/share/man/man1

	# Add here commands to install the package into debian/<packagename>
	$(MAKE) install INSTALLDIR=`pwd`/debian/pnm2ppa/usr/bin \
			CONFDIR=`pwd`/debian/pnm2ppa/etc \
			MANDIR=`pwd`/debian/pnm2ppa/usr/share/man/man1
	rm -r debian/pnm2ppa/etc
	cp -a debian/etc debian/pnm2ppa
	set -e; \
	cd debian/pnm2ppa/etc/magicfilter; \
	chmod 755 *; \
	for m in 1000 720 820; do \
	  ln -s pnm2ppa-$$m-bw-filter pbm2ppa-$$m-filter; \
	  ln -s pnm2ppa-$$m-bw-eco-filter pbm2ppa-draft-$$m-filter; \
	done

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf	
	dh_installdocs docs lpd pdq
	cd debian/pnm2ppa/usr/share/doc/pnm2ppa/docs/en && rm LICENSE *.1
	dh_installexamples sample_scripts/* *.ps
	perl -pi -e 'print "#!/bin/sh -e\n" if $$. == 1; close ARGV if eof;' \
	     debian/pnm2ppa/usr/share/doc/pnm2ppa/examples/lpr*
	dh_installmenu
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
	dh_installcron
	dh_installman
	dh_installinfo
#	dh_undocumented calibrate_ppa.1
	dh_installchangelogs Changelog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install