File: rules

package info (click to toggle)
libmsnumpress 1.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 228 kB
  • sloc: cpp: 1,161; xml: 80; makefile: 25
file content (39 lines) | stat: -rwxr-xr-x 1,118 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
#!/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
-include /usr/share/dpkg/buildtools.mk

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 && $(CXX) $(CFLAGS) -shared -fPIC -g -c MSNumpress.cpp -o MSNumpress.o && \
		$(CXX) $(LDFLAGS) -shared -fPIC -g -o libmsnumpress.so.$(RELVER) \
		-Wl,-z,relro -Wl,-soname,libmsnumpress.so.$(SOVER) MSNumpress.o

	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