File: rules

package info (click to toggle)
bibutils 7.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,040 kB
  • sloc: ansic: 112,579; sh: 462; makefile: 42
file content (60 lines) | stat: -rwxr-xr-x 2,011 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

DATE=$(shell sed -n 's/^DATE\s*=\s*\(.*\)/\1/p' Makefile_start)
MAJORVERSION=$(shell sed -n 's/^MAJORVERSION\s*=\s*\(.*\)/\1/p' Makefile_start)
MINORVERSION=$(shell sed -n 's/^MINORVERSION\s*=\s*\(.*\)/\1/p' Makefile_start)
VERSION       = ${MAJORVERSION}.${MINORVERSION}

DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
XP=xsltproc -''-nonet

# Set SONAME
SOMAJOR=8
SOMINOR=0
SONAME="libbibutils.so."$(SOMAJOR)

DESTDIR=${CURDIR}/debian/tmp/
INSTALLDIR=${DESTDIR}/usr/bin
LIBINSTALLDIR=${DESTDIR}/usr/lib/$(DEB_HOST_MULTIARCH)

CFLAGSIN=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGSIN

LDFLAGSIN=$(shell dpkg-buildflags --get LDFLAGS)
export LDFLAGSIN

%:
	dh $@ --buildsystem=makefile

override_dh_auto_configure:
	@echo Skipping auto_configure
	@echo building bibutils $(VERSION), upstream date $(DATE)

override_dh_auto_build:
	dh_auto_build -Dlib -- -f Makefile.dynamic LIBTARGETIN=libbibutils.so CFLAGSIN="-fPIC ${CFLAGSIN}" SONAME=$(SONAME) SOMINOR=$(SOMINOR) all
	dh_auto_build -Dbin -- -f Makefile.dynamic VERSION=$(VERSION) DATE=$(DATE) all
	# this relies on target clean not removing the shared libs
	dh_auto_build -Dlib -- -f Makefile.static clean
	dh_auto_build -Dlib -- -f Makefile.static RANLIB=ranlib libbibutils.a libbibcore.a
	$(XP) -o bibutils.1 $(DB2MAN) bibutils.dbk
	sed 's/VERSION/${VERSION}/g' packageconfig_start > lib/bibutils.pc

override_dh_auto_install:
	@echo Skipping auto_install

ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
override_dh_auto_test:
	make -C test -f Makefile.static all
	make -C test -f Makefile.static test
endif

override_dh_auto_clean:
	make -C lib -f Makefile.dynamic realclean
	make -C bin -f Makefile.dynamic realclean
	make -C test -f Makefile.dynamic realclean