File: rules

package info (click to toggle)
libsquish 1.15-4
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 768 kB
  • sloc: cpp: 2,728; makefile: 67
file content (27 lines) | stat: -rwxr-xr-x 765 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
#!/usr/bin/make -f
#export DH_VERBOSE = 1

# see ENVIRONMENT in dpkg-buildflags(1)
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export PREFIX=/usr
export INSTALL_DIR=debian/tmp/usr
export LIB_PATH=lib/$(DEB_HOST_MULTIARCH)

PKG_VERSION=$(shell dpkg-parsechangelog -S version | cut -d- -f1)

%:
	dh $@ 

# Fixup version number in doxygen docs and pkgconfig
override_dh_clean:
	-mv Doxyfile.orig Doxyfile
	-mv libsquish.pc.in.orig libsquish.pc.in
	dh_clean
override_dh_auto_build:
	cp Doxyfile Doxyfile.orig
	cp libsquish.pc.in libsquish.pc.in.orig
	sed -r -i -e 's/^(PROJECT_NUMBER         = ).*$$/\1$(PKG_VERSION)/' Doxyfile
	sed -r -i -e 's/^(Version: ).*$$/\1$(PKG_VERSION)/' libsquish.pc.in
	dh_auto_build