Package list splix / 9fc3aa4 debian / rules
9fc3aa4

Tree @9fc3aa4 (Download .tar.gz)

rules @9fc3aa4raw · history · blame

#!/usr/bin/make -f

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

derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes") || echo "no")

configure: configure-stamp
configure-stamp:
	dh_testdir
	touch configure-stamp

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
	dh_testdir
	$(MAKE) V=1 drv
	$(MAKE) V=1 DRV_ONLY=1 rastertoqpdl_LIBS="-lcupsimage -lcups -lpthread -ljbig" pstoqpdl_LIBS="-lcupsimage -lcups -ljbig"
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	$(MAKE) V=1 cleanppd
	$(MAKE) V=1 clean DRV_ONLY=1 
	dh_clean optimized/pstoqpdl optimized/rastertoqpdl optimized/src/* debug/src/* .defs.mk

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) V=1 DESTDIR=$(CURDIR)/debian/printer-driver-splix CUPSPPD=/usr/share/ppd/splix DRV_ONLY=1 install
	install -D --mode=644 debian/splix.ppd-updater $(CURDIR)/debian/printer-driver-splix/usr/share/cups/ppd-updaters/splix.ppd-updater
ifeq ($(derives_from_ubuntu),yes)
	# Install Apport hook on Ubuntu and derivatives
	install -D -m 644 debian/local/apport-hook.py $(CURDIR)/debian/printer-driver-splix/usr/share/apport/package-hooks/source_splix.py
endif

binary-indep: 
	dh_testdir -i
	dh_testroot -i
	dh_installchangelogs -i ChangeLog
	dh_installdocs -i
	dh_installexamples -i
	dh_installman -i
	dh_strip -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: install
	dh_testdir -a
	dh_testroot -a
	dh_installchangelogs -a ChangeLog
	dh_installdocs -a
	dh_installexamples -a
	dh_installman -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure get-orig-source

# Adapted from http://wiki.debian.org/SandroTosi/Svn_get-orig-source
PACKAGE = splix
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
get-orig-source:
	rm -rf get-orig-source $(TARBALL)
	mkdir get-orig-source
	svn export -r $(SVN_REVISION) svn://svn.code.sf.net/p/splix/code/splix \
	get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
	GZIP='--best --no-name' tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
	rm -rf get-orig-source
	echo "  "$(TARBALL)" created; move it to the right destination to build the package"