summaryrefslogtreecommitdiff
path: root/debian/rules
blob: c52f1060a7ea50a575c80c992fb5711e24cd7726 (plain)
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
49
50
51
52
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
endif

#
# Test for gcc-6 support
#
#export CC=gcc-6
#export CXX=g++-6

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
export CXXFLAGS+= -std=c++98

confflags = --prefix=/usr --mandir=\$${prefix}/share/man --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --enable-static

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	./configure $(confflags)

override_dh_install-arch:
	chmod -x examples/*.cpp
	dh_install
	#
	# rename arch-dependent file to name-MULTIARCH.ext
	# and link to the old name
	#
	mv -f $(CURDIR)/debian/libxbase64-dev/usr/include/xbase64/xbconfig.h $(CURDIR)/debian/libxbase64-dev/usr/include/xbase64/xbconfig-$(DEB_HOST_MULTIARCH).h
	cd $(CURDIR)/debian/libxbase64-dev/usr/include/xbase64 && ln -rs xbconfig-$(DEB_HOST_MULTIARCH).h xbconfig.h

override_dh_install-indep:
	chmod -x examples/*.cpp
	dh_install

override_dh_installdocs:
	dh_installdocs -A --link-doc=libxbase64-doc

override_dh_makeshlibs:
	dpkg-gensymbols -plibxbase64-1
	dh_makeshlibs