File: rules

package info (click to toggle)
rem 0.6.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 476 kB
  • sloc: ansic: 4,083; makefile: 140; python: 19; sh: 1
file content (52 lines) | stat: -rwxr-xr-x 1,365 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
49
50
51
52
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

MAJOR := $(shell grep -Po '\bVER_MAJOR := \K\d+' Makefile)
LIB = librem

LDFLAGS += -Wl,-soname,$(LIB).so.$(MAJOR)

# LIBDIR for installation
LIBDIR=/usr/lib/

override_dh_auto_build:
	dh_auto_build -- info all \
		RELEASE=1 \
		HAVE_LIBPTHREAD=1 \
		HAVE_ARMV6=$(filter armhf ,$(DEB_HOST_ARCH)) \
		USE_OPENSSL=1 \
		USE_ZLIB=1 \
		EXTRA_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
		EXTRA_LFLAGS="$(LDFLAGS)" \
		LIB_SUFFIX=.so.$(MAJOR)

override_dh_auto_test:

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

override_dh_install:
	dh_install
	d-shlibmove --commit \
		--devunversioned \
		--exclude-la \
		--multiarch \
		--override s/$(LIB)$(MAJOR)-dev/$(LIB)-dev/ \
		--override s/libre0-dev/libre-dev/ \
		--movedev "debian/tmp/usr/include/*" usr/include/ \
		--movedev "debian/tmp/usr/lib//pkgconfig/$(LIB).pc" usr/lib/$(DEB_TARGET_MULTIARCH)/pkgconfig \
		debian/tmp/usr/lib/$(LIB).so

override_dh_strip:
	dh_strip --dbgsym-migration='librem0-dbg (<< 0.6.0-2~)'

override_dh_auto_clean:
	dh_auto_clean -- LIB_SUFFIX=.so.0

%:
	dh $@ --with pkgkde_symbolshelper