File: rules

package info (click to toggle)
libmsnumpress 1.0.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 236 kB
  • sloc: cpp: 1,161; xml: 80; makefile: 24
file content (38 lines) | stat: -rwxr-xr-x 1,450 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
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
#export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

SOVER = 1
RELVER = $(SOVER).0.0

%:
	dh $@

override_dh_auto_clean:
	cd src/main/cpp && \
		rm -f *.o *.so*
	rm -rf debian/build
	rm -f debian/libmsnumpress.3

override_dh_auto_configure:
	docbook-to-man debian/libmsnumpress.xml >debian/libmsnumpress.3

phony: manpage
manpage:
	docbook-to-man debian/libmsnumpress.xml > debian/libmsnumpress.3

# The $(CFLAGS) and $(LDFLAGS) are required below to account 
# for the hardening flags as set above.
override_dh_auto_build: manpage
	cd src/main/cpp && g++ $(CFLAGS) -shared -fPIC -g -c MSNumpress.cpp -o MSNumpress.o && g++ $(LDFLAGS) -shared -fPIC -g -o libmsnumpress.so.$(RELVER) -Wl,-z,relro -Wl,-soname,libmsnumpress.so.$(SOVER) MSNumpress.o && ln -sf libmsnumpress.so.$(RELVER) libmsnumpress.so.$(SOVER) && ln -sf libmsnumpress.so.$(SOVER) libmsnumpress.so
	mkdir -p debian/build && doxygen debian/Doxyfile
	find debian/build/doxygen/html -name "*.md5" | xargs rm -f
	find debian/build/doxygen/html -name "*.map" | xargs rm -f
	rm -f debian/build/doxygen/html/jquery.js

override_dh_makeshlibs:
	dh_makeshlibs -a
	dpkg-gensymbols -plibmsnumpress1 -esrc/main/cpp/libmsnumpress.so.$(RELVER) -v$(RELVER) -Odebian/libmsnumpress1/DEBIAN/symbols