| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
# debian/rules for the Praat |
| 4 |
|
| 5 |
DEBDIR = $(CURDIR)/debian |
| 6 |
DOCSDIR = $(DEBDIR)/praat-doc/usr/share/doc/praat/docs |
| 7 |
|
| 8 |
include /usr/share/dpkg/architecture.mk |
| 9 |
-include /usr/share/dpkg/buildtools.mk |
| 10 |
PKG_CONFIG ?= pkg-config |
| 11 |
|
| 12 |
export PREFIX = /usr |
| 13 |
export USE_SYS_ZLIB = yes |
| 14 |
|
| 15 |
ifneq (,$(filter $(DEB_HOST_ARCH), i386)) |
| 16 |
export DEB_CXXFLAGS_MAINT_APPEND=-ffloat-store |
| 17 |
endif |
| 18 |
|
| 19 |
ifneq (,$(filter $(DEB_HOST_ARCH), armel)) |
| 20 |
export DEB_LDFLAGS_MAINT_APPEND=-latomic |
| 21 |
endif |
| 22 |
|
| 23 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 24 |
|
| 25 |
%: |
| 26 |
dh $@ |
| 27 |
|
| 28 |
%.1: $(DEBDIR)/%.md |
| 29 |
# Generate the man page from the Markdown source |
| 30 |
pandoc --standalone --to man $< -o $@ |
| 31 |
|
| 32 |
execute_before_dh_installman: praat.1 praat-launch.1 |
| 33 |
|
| 34 |
execute_after_dh_installchangelogs: |
| 35 |
# Build and install the upstream changelog |
| 36 |
sed -n '/^R"~~~(/,/^)~~~"/{/^R"~~~(/!{/^)~~~"/!p}}' fon/manual_whatsnew.cpp > debian/what-is-new |
| 37 |
dh_installchangelogs debian/what-is-new |
| 38 |
|
| 39 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 40 |
override_dh_auto_test: |
| 41 |
PRAAT=$(CURDIR)/praat debian/tests/run-tests |
| 42 |
endif |
| 43 |
|
| 44 |
execute_after_dh_installdeb-indep: |
| 45 |
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 46 |
# Remove extra license file |
| 47 |
rm $(DOCSDIR)/LICENSE.txt |
| 48 |
# Remove duplicated file (identical to index.html) |
| 49 |
rm $(DOCSDIR)/Welcome.html $(DOCSDIR)/praat.html |
| 50 |
endif |