File: rules

package info (click to toggle)
libmstoolkit 77.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,164 kB
  • ctags: 2,746
  • sloc: cpp: 8,738; ansic: 3,443; makefile: 84; sh: 24
file content (48 lines) | stat: -rwxr-xr-x 1,128 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1


DEBIAN_DIR = $(CURDIR)/debian
BUILD_DIR = $(CURDIR)

LIB_PACKAGE = libmstoolkit77
VERSION = 77.0.0
LIB_VERSION = $(VERSION)

# This is the only method that actually worked...
# Combined with the CFLAGS += <new flags> in the Makefile.
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

%:
	dh $@

override_dh_auto_clean:
	make clean
	rm -f libmstoolkit.3

manpage:
	docbook-to-man debian/libmstoolkit.sgml > debian/libmstoolkit.3

override_dh_auto_build: manpage
	make solib
	make arlib

override_dh_makeshlibs:
	mkdir -p $(DEBIAN_DIR)/$(LIB_PACKAGE)/DEBIAN
	dpkg-gensymbols -p$(LIB_PACKAGE) \
	-v$(LIB_VERSION) \
	-c2 -d \
	-e$(BUILD_DIR)/libmstoolkitlite.so.$(LIB_VERSION) \
	-e$(BUILD_DIR)/libmstoolkit.so.$(LIB_VERSION) \
	-O$(DEBIAN_DIR)/$(LIB_PACKAGE)/DEBIAN/symbols

	dh_makeshlibs -a

override_dh_strip:
	dh_strip --dbg-package=$(LIB_PACKAGE)-dbg -a