#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS=hardening=+all export DH_ALWAYS_EXCLUDE=CVS ifeq ($(shell dpkg --print-architecture), x32) CFLAGS += -fPIC CXXFLAGS += -fPIC endif DPKG_EXPORT_BUILDFLAGS = 1 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) include /usr/share/dpkg/buildflags.mk VER_DATE = $(shell date --utc --date="$$(dpkg-parsechangelog -SDate)" '+%Y-%m-%d') ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) DEBUG_FLAGS += -g endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build-arch: configure-stamp build-arch-stamp build-arch-stamp: dh_testdir # Add here commands to compile the package. $(MAKE) clean dh_auto_build -- all PREFIX=/usr DEBUG_FLAGS="$(DEBUG_FLAGS)" VER_DATE="$(VER_DATE)" touch build-arch-stamp build-indep: configure-stamp build-indep-stamp build-indep-stamp: dh_testdir # Nothing to do here. touch build-indep-stamp build: build-arch build-indep clean: dh_testdir dh_testroot rm -f build-arch-stamp build-indep-stamp configure-stamp $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs -A # tuxpaint: # - Note: install-icon is called here even though it seems # it belongs in tuxpaint-data as it is needed for the menu # icon. $(MAKE) install-bin install-gnome install-kde install-icon \ install-importscript install-default-config install-bash-completion \ PREFIX=$(CURDIR)/debian/tuxpaint/usr \ CONFDIR=$(CURDIR)/debian/tuxpaint/etc/tuxpaint \ GNOME_PREFIX=$(CURDIR)/debian/tuxpaint/usr \ KDE_PREFIX=$(CURDIR)/debian/tuxpaint/usr/share/applnk \ X11_ICON_PREFIX=$(CURDIR)/debian/tuxpaint/usr/share/pixmaps/ \ COMPLETIONDIR=$(CURDIR)/debian/tuxpaint/usr/share/bash-completion/completions $(MAKE) install-magic-plugins \ PREFIX=$(CURDIR)/debian/tuxpaint-plugins-default/usr $(MAKE) install-magic-plugin-dev \ PREFIX=$(CURDIR)/debian/tuxpaint-dev/usr # tuxpaint-data: $(MAKE) install-data install-doc install-gettext install-kde-icons \ install-example-stamps install-example-starters install-example-templates \ install-im install-osk \ PREFIX=$(CURDIR)/debian/tuxpaint-data/usr \ KDE_ICON_PREFIX=$(CURDIR)/debian/tuxpaint-data/usr/share/icons \ GNOME_PREFIX=$(CURDIR)/debian/tuxpaint-data/usr \ DOC_PREFIX=$(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data # Cleanup after install-data, as we will symlink these fonts # to the ones provided by ttf-freefont and other font packages: rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/*.ttf rm -rf $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/*_docs/ rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/ar.ttf rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/el.ttf rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/ka.ttf rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/ko.ttf rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/ta.ttf rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/te.ttf rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/th.ttf rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/fonts/locale/zh_TW.ttf # Cleanup after install-doc, removing extra changelog, license and install files. rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/CHANGES* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/COPYING* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/INSTALL* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/dejavu* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/*/COP* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/*/INSTAL* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/*/GNU* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/*/GPL* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/*/gpl* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/*/LICEN* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/de/ANBRINGEN* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/de/KOPIE* rm -f $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/sr/ojl* find $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data -name Makefile -exec rm -f {} \; rm -rf $(CURDIR)/debian/tuxpaint-data/usr/share/doc/tuxpaint-data/magic-docs/src # We already have an opendesktop-compliant desktop file, so this # one for KDE is redundant. rm -rf $(CURDIR)/debian/tuxpaint/usr/share/applnk # Build architecture-independent files here. binary-indep: build install dh_testdir -i dh_testroot -i dh_installdocs -i dh_installchangelogs -i dh_installmenu -i dh_installman -p tuxpaint-dev src/manpage/tp-magic-config.1 dh_link -i dh_compress -i dh_fixperms -i # remove unnecessary executable permission chmod 644 $(CURDIR)/debian/tuxpaint-data/usr/share/tuxpaint/starters/skyline-sf-dusk-back.jpeg dh_llxsrcinstall dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i # Build architecture-dependent files here. binary-arch: build install dh_testdir -a dh_testroot -a dh_installdocs -a dh_installchangelogs -a docs/CHANGES.txt dh_installmenu -a dh_installcron -a dh_installman -a src/manpage/tuxpaint.1 src/manpage/tuxpaint-import.1 dh_icons -a dh_link -a dh_strip -a dh_compress -a dh_fixperms -a dh_llxsrcinstall 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