File: rules

package info (click to toggle)
serf 1.3.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,380 kB
  • sloc: ansic: 17,446; python: 60; sh: 50; makefile: 48
file content (45 lines) | stat: -rwxr-xr-x 1,178 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
#!/usr/bin/make -f
# -*- makefile -*-

DEB_BUILD_MAINT_OPTIONS=hardening=+all
DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
include /usr/share/dpkg/default.mk

libdir = /usr/lib/$(DEB_HOST_MULTIARCH)
libpkg = libserf-1-1

parallel =
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    parallel = -j $(NUMJOBS)
endif

silent =
ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
    silent = --silent
endif

%:
	dh $@

.PHONY: build
build: build-arch build-indep
override_dh_auto_build:
	scons $(parallel) $(silent) GSSAPI=/usr CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LINKFLAGS="$(LDFLAGS)" PREFIX=/usr LIBDIR=$(libdir) CC="$(CC)"

override_dh_auto_test:
	scons $(silent) check CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LINKFLAGS="$(LDFLAGS)" CC="$(CC)"

override_dh_auto_clean:
	scons -c

override_dh_auto_install:
	scons $(silent) install PREFIX=$(CURDIR)/debian/tmp/usr LIBDIR=debian/tmp$(libdir)
	chrpath -d $(CURDIR)/debian/tmp/$(libdir)/*.so.*

override_dh_installchangelogs:
	dh_installchangelogs CHANGES

override_dh_shlibdeps:
	dh_shlibdeps
	sed -i 's:libserf-private\(, *\)\?::' debian/*.substvars