#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
patch: patch-stamp
patch-stamp:
dh_testdir
dpatch apply-all
touch patch-stamp
configure: configure-stamp
configure-stamp: patch
dh_testdir
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Make the PPDs newer than the ppd/po/* and ppd/samsung.drv files
# so that make does not rebuild them (would require cupsddk)
touch ppd/*.ppd
$(MAKE) CFLAGS="$(CFLAGS)"
# Remove PPDs for Samsung CLP-300 and CLP-600, these printers are
# known to not work with this release of the driver
rm -f ppd/clp[36]00*.ppd*
touch build-stamp
unpatch:
dh_testdir
dpatch deapply-all
rm -rf debian/patched
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp patch-stamp
-$(MAKE) clean
rm -f src/rastertospl2
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# "make install" does neither support "PREFIX" nor "DESTDIR". so
# we install the files manually
# $(MAKE) install
dh_install
# Build architecture-dependent files here.
binary-arch: build 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