File: rules

package info (click to toggle)
libre 0.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,464 kB
  • sloc: ansic: 38,937; makefile: 132; sh: 4
file content (46 lines) | stat: -rwxr-xr-x 1,245 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DH_VERBOSE = 1

%:
	dh $@ --with pkgkde_symbolshelper --parallel

EXTRA_LFLAGS:="$(shell dpkg-buildflags --get LDFLAGS) -Wl,-soname,libre.so.0"
EXTRA_CFLAGS:="$(shell dpkg-buildflags --get CPPFLAGS)"

# relax symbols check when targeting experimental
EXP_RELEASE = $(filter experimental% UNRELEASED,\
 $(shell dpkg-parsechangelog | grep -Po '^Distribution: \K.*'))
export DPKG_GENSYMBOLS_CHECK_LEVEL=$(if $(EXP_RELEASE),0,1)

override_dh_auto_configure:
	sed -e 's,@\$$(CC),\$$(CC),' \
		-e 's,@\$$(LD),\$$(LD),' \
		-e 's,@\$$(AR),\$$(AR),' \
		-e 's,@rm -rf,rm -rf,' < Makefile > GNUmakefile

override_dh_auto_build:
	dh_auto_build -- info all \
		RELEASE=1 \
		USE_OPENSSL=1 \
		EXTRA_LFLAGS=$(EXTRA_LFLAGS) \
		EXTRA_CFLAGS=$(EXTRA_CFLAGS) \
		LIB_SUFFIX=.so.0

LIBDIR=/usr/lib/$(DEB_TARGET_MULTIARCH)

override_dh_auto_install:
	dh_auto_install -- \
		LIBDIR=$(LIBDIR) \
		LIB_SUFFIX=.so.0
	cd debian/tmp/$(LIBDIR) && \
		ln -s -f libre.so.0 libre.so
	sed -i "s,libdir=\$${prefix}/lib,libdir=\$${prefix}/lib/$(DEB_TARGET_MULTIARCH)," debian/tmp/$(LIBDIR)/pkgconfig/libre.pc

override_dh_auto_clean:
	make clean LIB_SUFFIX=.so.0
	rm -f GNUmakefile

override_dh_auto_test: