Codebase list splix / debian/2.0.0+svn315-1 debian / rules
debian/2.0.0+svn315-1

Tree @debian/2.0.0+svn315-1 (Download .tar.gz)

rules @debian/2.0.0+svn315-1raw · 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

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

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"