File: rules

package info (click to toggle)
libre 0.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,216 kB
  • ctags: 4,832
  • sloc: ansic: 36,333; makefile: 127
file content (41 lines) | stat: -rwxr-xr-x 1,020 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
#!/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)"

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: