File: rules

package info (click to toggle)
bibutils 4.8-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,512 kB
  • ctags: 1,340
  • sloc: ansic: 72,394; csh: 216; makefile: 117
file content (49 lines) | stat: -rwxr-xr-x 1,500 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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

TG_BRANCHES=debian/mkshlibs
# wildcard is to avoid a warning from dh when topgit is not installed
include $(wildcard /usr/share/topgit/tg2quilt.mk)

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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

# what to pass to libtool
SO_CURRENT=1
SO_REVISION=0
SO_AGE=0
SOVERSION=$(SO_CURRENT):$(SO_REVISION):$(SO_AGE)
SONAME="libbibutils.so."$(SO_CURRENT)

INSTALLDIR=$(CURDIR)/debian/tmp/bin
DEVLIB=${CURDIR}/debian/libbibutils-dev/usr/lib

%:
	dh $@

override_dh_auto_configure:
	# do the sed ourselves to avoid build dependency on csh
	sed -e 's/REPLACE_CC/CC="cc -Wall"/' \
	    -e 's/REPLACE_RANLIB/RANLIB="ranlib"/'  \
	    -e "s|REPLACE_INSTALLDIR|${INSTALLDIR}|"  \
	    -e 's/REPLACE_POSTFIX//' < Makefile_start > Makefile

override_dh_auto_build:
	$(MAKE) SOVERSION=$(SOVERSION) all
	$(XP) -o bibutils.1 $(DB2MAN) bibutils.dbk
	make -C test all
	make -C test test

override_dh_auto_install:
	mkdir -p ${INSTALLDIR}
	$(MAKE) SOVERSION=$(SOVERSION) install
	mkdir -p ${DEVLIB} && ln -s ${SONAME} ${DEVLIB}/libbibutils.so