File: rules

package info (click to toggle)
praat 6.0.23-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 48,052 kB
  • ctags: 68,291
  • sloc: cpp: 360,925; ansic: 231,683; makefile: 765; python: 363
file content (75 lines) | stat: -rwxr-xr-x 2,362 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules for the Praat

DEBDIR = $(CURDIR)/debian
INSTDIR = $(DEBDIR)/praat

PIXDIR = usr/share/pixmaps
SVGDIR = usr/share/icons/hicolor/scalable/apps
BINDIR = usr/bin
APPDIR = usr/share/applications

SUBSTCMD = sed 's:@BINDIR@:$(BINDIR):g;s:@PIXDIR@:$(PIXDIR):g;	\
                s:@SVGDIR@:$(SVGDIR):g;s:@APPDIR@:$(APPDIR):g'

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

get-upstream-changelog:
	# Get upstream changelog (in HTML format) and replace some characters
	# for correct display in the final ASCII file
	( cd debian ;							    \
	  wget -N http://www.fon.hum.uva.nl/praat/manual/What_s_new_.html ; \
	  perl -pi -e "s/ˈ/'/g;s/ˌ/,/g;" What_s_new_.html )

clean:
	dh clean
	# Fix the lacking cleaning command for the main/ directory
	[ ! -f makefile.defs ] || make -C main clean
	rm -f makefile.defs $(DEBDIR)/praat.dirs			\
		 $(DEBDIR)/praat.install 				\
		 sendpraat praat.1 sendpraat.1 praat-open-files.1

override_dh_auto_clean:
	touch makefile.defs
	dh_auto_clean

override_dh_auto_configure:
	# Generate the debhelper files
	for i in dirs install ; do 				\
		$(SUBSTCMD) < $(DEBDIR)/$$i.in > $(DEBDIR)/praat.$$i ;	\
	done
	# Get rid of the
	# dpkg-shlibdeps: warning: dependency on lib??? could be avoided if "debian/praat/usr/bin/praat" were not uselessly linked against it (they use none of its symbols).
	# warnings and useless dependencies
	sed 's/^LIBS = /& -Wl,--as-needed /'	\
		makefiles/makefile.defs.linux.pulse > makefile.defs
	# Add hardening flags
	cat debian/mk-vars-hardening >> makefile.defs

%.1: $(DEBDIR)/%.dbk $(DEBDIR)/manpage.xsl
	# Generate the man page from the DocBook source
	xmlto -m $(DEBDIR)/manpage.xsl man $<

sendpraat: sys/sendpraat.c
	# Build the sendpraat program
	$(CC) $(shell dpkg-buildflags --get CPPFLAGS)		\
		$(shell dpkg-buildflags --get CFLAGS)		\
		$(shell dpkg-buildflags --get LDFLAGS)		\
		-Wl,--as-needed -std=gnu99 -DSTAND_ALONE -DUNIX	\
		-o sendpraat sys/sendpraat.c			\
		$(shell pkg-config --cflags --libs gtk+-2.0)

override_dh_auto_build: sendpraat praat.1 sendpraat.1 praat-open-files.1
	dh_auto_build

override_dh_auto_install:
	# Install the upstream changelog
	dh_installchangelogs debian/What_s_new_.html
	dh_auto_install -- INSTALL=

get-orig-source:
	uscan --verbose --force-download --repack-compression xz