File: rules

package info (click to toggle)
libproxy 0.4.14-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 896 kB
  • ctags: 473
  • sloc: cpp: 3,786; ansic: 112; cs: 69; makefile: 64; python: 44; perl: 42; sh: 17; ruby: 8
file content (65 lines) | stat: -rwxr-xr-x 1,781 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
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/make -f

SHLIBVER := 0.4.14
libproxy := $(shell sed -nr 's/^Package:[[:space:]]*(libproxy[0-9]+(v5)?)[[:space:]]*$$/\1/p' debian/control.in)

#export DH_VERBOSE=1

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# only invoke dh --with cli if cli-common-dev is present
WITH_CLI = 
WITH_DOTNET = -DWITH_DOTNET=OFF
ifneq (,$(wildcard /usr/share/perl5/Debian/Debhelper/Sequence/cli.pm))
ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
WITH_CLI = --with cli
WITH_DOTNET = -DWITH_DOTNET=ON
endif
endif

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

CONFIGURE_FLAGS = $(WITH_DOTNET) \
		-DWITH_VALA=ON \
		-DGMCS_EXECUTABLE=/usr/bin/mono-csc \
		-DCMAKE_SKIP_RPATH=ON \
		-DBIPR=0 \
		-DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
		-DLIBEXEC_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/libproxy/$(SHLIBVER)

ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
CONFIGURE_FLAGS += \
		-DWITH_GNOME3=ON \
		-DWITH_MOZJS=ON \
		-DWITH_WEBKIT3=ON
else
CONFIGURE_FLAGS += \
		-DWITH_GNOME3=OFF \
		-DWITH_MOZJS=OFF \
		-DWITH_WEBKIT3=OFF
endif

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_install-arch:
	dh_install
	rm -f \
	  debian/libproxy-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/libproxy-sharp-*.pc

override_dh_install-indep:
	cp -a debian/tmp/usr/lib/$(shell pyversions -d) debian/tmp/usr/lib/python3
	dh_install
ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
	sed -i 's!/usr/lib/mono/libproxy-sharp!/usr/lib/cli/libproxy-sharp-0.4!' \
		debian/libproxy-cil-dev/usr/lib/pkgconfig/libproxy-sharp-1.0.pc
endif

override_dh_makeshlibs:
	dh_makeshlibs -V '$(libproxy) (>= $(SHLIBVER))' -- -c4

override_dh_gencontrol:
	dh_gencontrol -- -Vlibproxy=${libproxy}

%:
	dh $@ $(WITH_CLI) --with python2,python3,gnome