File: rules

package info (click to toggle)
libmstoolkit 82-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 772 kB
  • sloc: cpp: 10,999; ansic: 109; makefile: 86; sh: 20
file content (44 lines) | stat: -rwxr-xr-x 1,084 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

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


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

PACKAGE_VERSION = 82
LIB_PACKAGE = libmstoolkit$(PACKAGE_VERSION)
LIB_VERSION = $(PACKAGE_VERSION).0.0

# 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 all

override_dh_makeshlibs:
	mkdir -p $(DEBIAN_DIR)/$(LIB_PACKAGE)/DEBIAN
	dpkg-gensymbols -p$(LIB_PACKAGE) \
	-v$(PACKAGE_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