| 1 |
#!/usr/bin/make -f |
| 2 |
# |
| 3 |
# Uncomment this to turn on verbose mode. |
| 4 |
#export DH_VERBOSE=1 |
| 5 |
|
| 6 |
# If set to a true value then MakeMaker's prompt function will |
| 7 |
# always return the default without waiting for user input. |
| 8 |
export PERL_MM_USE_DEFAULT=1 |
| 9 |
|
| 10 |
PACKAGE=$(shell dh_listpackages) |
| 11 |
|
| 12 |
ifndef PERL |
| 13 |
PERL = /usr/bin/perl |
| 14 |
endif |
| 15 |
|
| 16 |
TMP =$(CURDIR)/debian/$(PACKAGE) |
| 17 |
|
| 18 |
# Allow disabling build optimation by setting noopt in |
| 19 |
# $DEB_BUILD_OPTIONS |
| 20 |
CFLAGS = -Wall -g |
| 21 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 22 |
CFLAGS += -O0 |
| 23 |
else |
| 24 |
CFLAGS += -O2 |
| 25 |
endif |
| 26 |
|
| 27 |
build: build-stamp |
| 28 |
build-stamp: |
| 29 |
dh_testdir |
| 30 |
|
| 31 |
# Add commands to compile the package here |
| 32 |
$(PERL) Makefile.PL INSTALLDIRS=vendor |
| 33 |
$(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" |
| 34 |
|
| 35 |
touch build-stamp |
| 36 |
|
| 37 |
clean: |
| 38 |
dh_testdir |
| 39 |
dh_testroot |
| 40 |
|
| 41 |
# Add commands to clean up after the build process here |
| 42 |
[ ! -f Makefile ] || $(MAKE) realclean |
| 43 |
|
| 44 |
dh_clean build-stamp install-stamp |
| 45 |
|
| 46 |
install: build install-stamp |
| 47 |
install-stamp: |
| 48 |
dh_testdir |
| 49 |
dh_testroot |
| 50 |
dh_clean -k |
| 51 |
|
| 52 |
# Add commands to install the package into debian/$PACKAGE_NAME here |
| 53 |
$(MAKE) test |
| 54 |
$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr |
| 55 |
|
| 56 |
# As this is a architecture dependent package, we are not |
| 57 |
# supposed to install stuff to /usr/share. MakeMaker creates |
| 58 |
# the dirs, we delete them from the deb: |
| 59 |
rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5 |
| 60 |
|
| 61 |
touch install-stamp |
| 62 |
|
| 63 |
# Build architecture-independent files here. |
| 64 |
binary-indep: build install |
| 65 |
# We have nothing to do by default. |
| 66 |
|
| 67 |
# Build architecture-dependent files here. |
| 68 |
binary-arch: build install |
| 69 |
dh_testdir |
| 70 |
dh_testroot |
| 71 |
dh_installdocs README TODO resources/sounds/README resources/fonts/README |
| 72 |
dh_installexamples |
| 73 |
# dh_installmenu |
| 74 |
# dh_installcron |
| 75 |
# dh_installman |
| 76 |
dh_installchangelogs Changes |
| 77 |
dh_link |
| 78 |
dh_strip |
| 79 |
dh_compress |
| 80 |
dh_fixperms |
| 81 |
dh_makeshlibs |
| 82 |
dh_installdeb |
| 83 |
dh_perl |
| 84 |
dh_shlibdeps |
| 85 |
dh_gencontrol |
| 86 |
dh_md5sums |
| 87 |
dh_builddeb |
| 88 |
|
| 89 |
source diff: |
| 90 |
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false |
| 91 |
|
| 92 |
binary: binary-indep binary-arch |
| 93 |
.PHONY: build clean binary-indep binary-arch binary |