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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# Copyright 1997 to 1999 by Joey Hess.
# License: GNU General Public License (GPL)
# Thanks to Paolo Molaro <lupus@debian.org> and heartbeat_0.4.6-2.diff
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
#
# Path to SSH and SCP
# Usually this is guessed if ssh is installed.
# However, there is a long standing bug with installing ssh
# on arm in debian and this is preventing heartbeat from
# moving into sarge. By adding this we can remove the build
# dependency on ssh and get an updated heartbeat into sarge...
# I hope. Horms 26th July 2004
#
# If this is removed then the build depandancy on ssh should be
# restored
#
cfg:=--prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/lib --mandir=/usr/share/man \
--enable-snmp-subagent --with-mibsdir=/usr/share/snmp/mibs \
--disable-fatal-warnings --enable-glib-malloc --with-esmtp \
--with-snmp --with-ais --with-heartbeat --libdir=/usr/lib \
--enable-upstart
RELEASE := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }')
UPSTREAM := $(shell echo "$(RELEASE)" | sed 's/:\?\([0-9\.]\+\)-[0-9].*/\1/')
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
patch:
override_version=$(RELEASE) sh debian/apply
unpatch:
override_version=$(RELEASE) sh debian/apply $(UPSTREAM)
build-arch: build
build-indep: build
build: build-stamp
build-stamp:
dh_testdir
[ -f configure ] || sh autogen.sh
if [ -e configure -a ! -x configure ]; then chmod u+x configure; fi
if [ -e py-compile -a ! -x py-compile ]; then chmod u+x py-compile; fi
# run configure script
./configure $(cfg)
# set rng compatibility symlinks
$(shell cd xml && for a in *-1.0.rng; do ln -s "$$a" `echo "$$a" | sed 's/-1.0//g'`; done)
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) clean
rm -f tools/ccdv
rm -f libltdl.tar autoconf automake autoheader
rm -f build-stamp
rm -f debian/*.files debian/*.dirs
rm -rf debian/*-build-*
rm -rf debian/tmp-*
## Zero autoconf foo
rm -f config.status libltdl/config.log libltdl/config.status
dh_clean
install: build install-stamp
install-stamp:
dh_testdir
dh_testroot
dh_installdirs
$(MAKE) install DESTDIR=`pwd`/debian/tmp docdir=/usr/share/doc/pacemaker
for file in `find debian/tmp -name '*.la'`; do \
sed -i "/dependency_libs/ s/'.*'/''/" $$file ; \
done
binary-indep: build install
binary-arch: build install
dh_testdir -a
dh_testroot -a
rm -rf `pwd`/debian/tmp/usr/lib/service_crm.so
rm -rf `pwd`/debian/tmp/usr/lib/service_crm.la
rm -rf `pwd`/debian/tmp/usr/lib/service_crm.a
dh_install --sourcedir=debian/tmp --list-missing
# install default file
mkdir -p $(CURDIR)/debian/pacemaker/etc/default
cp -ax $(CURDIR)/mcp/pacemaker.sysconfig $(CURDIR)/debian/pacemaker/etc/default/pacemaker
# make non-scripts non-executable
-chmod -x `pwd`/debian/pacemaker/usr/share/pacemaker/crm-transitional.dtd
-chmod -x `pwd`/debian/pacemaker/usr/share/pacemaker/resources-1.0.rng
-chmod -x `pwd`/debian/pacemaker/usr/share/pacemaker/upgrade06.xsl
-chmod -x `pwd`/debian/pacemaker/usr/share/pacemaker/constraints-1.0.rng
-chmod -x `pwd`/debian/pacemaker/usr/share/pacemaker/pacemaker.rng
-chmod -x `pwd`/debian/pacemaker/usr/share/pacemaker/pacemaker-1.0.rng
-chmod -x `pwd`/debian/pacemaker/usr/share/pacemaker/score.rng
-chmod -x `pwd`/debian/pacemaker/usr/share/pacemaker/crm.dtd
# delete redundant COPYING files
rm -rf debian/pacemaker/usr/share/doc/pacemaker/COPYING.LGPL
rm -rf debian/pacemaker/usr/share/doc/pacemaker/COPYING.LIB
rm -rf debian/pacemaker/usr/share/doc/pacemaker/COPYING
# create special directory
mkdir -p `pwd`/debian/pacemaker/var/lib/pengine
mkdir -p `pwd`/debian/pacemaker/var/lib/heartbeat/pengine
mkdir -p `pwd`/debian/pacemaker/var/lib/pacemaker/blackbox
mkdir -p `pwd`/debian/pacemaker/var/lib/pacemaker/cib
mkdir -p `pwd`/debian/pacemaker/var/lib/pacemaker/cores
mkdir -p `pwd`/debian/pacemaker/var/lib/pacemaker/pengine
dh_installdebconf -a
dh_installdocs -a
dh_installexamples -a
dh_installinit -a -n -u 'defaults 20 32'
dh_installman -a
dh_lintian
dh_installchangelogs
dh_link -a
dh_strip -a --dbg-package=pacemaker-dbg
dh_compress -a
dh_fixperms -a
chmod -x $(CURDIR)/debian/pacemaker/usr/share/pacemaker/*.rng
dh_makeshlibs -a -V
dh_perl -a
dh_python2 -ppacemaker -ppacemaker-dev
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary binary-indep binary-arch install \
patch unpatch
|