mirror of https://github.com/sipwise/heartbeat.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
3.3 KiB
138 lines
3.3 KiB
#!/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
|
|
|
|
cfg:=--prefix=/usr --sysconfdir=/etc --localstatedir=/var \
|
|
--mandir=/usr/share/man \
|
|
--with-group-name=haclient --with-ccmuser-name=hacluster \
|
|
--enable-snmp-subagent --with-mibsdir=/usr/share/snmp/mibs \
|
|
--disable-fatal-warnings --enable-mgmt --enable-libc-malloc
|
|
|
|
# These are used for cross-compiling and for saving the configure script
|
|
# from having to guess our platform (since we know it already)
|
|
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
|
|
CFLAGS = -Wall -g
|
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
|
CFLAGS += -O0
|
|
else
|
|
CFLAGS += -O2
|
|
endif
|
|
|
|
DTMP := $(CURDIR)/debian/tmp
|
|
|
|
config.status:
|
|
dh_testdir
|
|
dh_autoreconf
|
|
./configure $(cfg)
|
|
|
|
build: build-stamp
|
|
build-stamp: config.status
|
|
$(MAKE)
|
|
touch build-stamp
|
|
|
|
clean: config.status
|
|
dh_testroot
|
|
|
|
# Add here commands to clean up after the build process.
|
|
-$(MAKE) clean MAKE=make
|
|
-$(MAKE) distclean MAKE=make
|
|
rm -f tools/ccdv
|
|
-find . -name '*.py[co]' | xargs rm -f
|
|
dh_clean build-stamp install-stamp
|
|
rm -f debian/init
|
|
|
|
# Zero autoconf foo
|
|
rm -f config.log config.status \
|
|
libltdl/config.log libltdl/config.status
|
|
rm -f lib/mgmt/pymgmt.py
|
|
rm -f lib/mgmt/pymgmt_wrap.c
|
|
|
|
dh_autoreconf_clean
|
|
|
|
|
|
install: install-stamp
|
|
install-stamp: build
|
|
dh_testdir
|
|
dh_testroot
|
|
dh_prep
|
|
dh_installdirs
|
|
$(MAKE) install DESTDIR=$(DTMP) \
|
|
MAKE=make \
|
|
docdir=/usr/share/doc/heartbeat
|
|
|
|
mv $(DTMP)/usr/share/heartbeat/cts/README \
|
|
$(DTMP)/usr/share/doc/heartbeat/README.cts
|
|
find $(DTMP)/usr/share/man -type f | xargs gzip -v --best
|
|
install -c -m 755 heartbeat/init.d/heartbeat \
|
|
$(DTMP)/usr/share/heartbeat/sysvinit
|
|
-mkdir -p $(DTMP)/usr/share/doc/ldirectord/
|
|
install -c -m 644 ldirectord/ldirectord.cf \
|
|
$(DTMP)/usr/share/doc/ldirectord/
|
|
-mkdir -p $(DTMP)/etc/init.d
|
|
install -c -m 755 ldirectord/init.d/ldirectord.debian \
|
|
$(DTMP)/etc/init.d/ldirectord
|
|
-mkdir -p $(DTMP)/etc/default/
|
|
install -c -m 755 ldirectord/init.d/ldirectord.debian.default \
|
|
$(DTMP)/etc/default/ldirectord
|
|
cd $(DTMP)/etc/ && ln -s ha.d heartbeat
|
|
# debug:
|
|
#find $(DTMP)
|
|
dh_install
|
|
|
|
binary-indep: install
|
|
dh_testdir -i
|
|
dh_testroot -i
|
|
dh_installdebconf -i
|
|
dh_installdocs -i
|
|
dh_installexamples -i
|
|
dh_installsystemd -i
|
|
dh_installman -i
|
|
dh_installchangelogs -i
|
|
dh_link -i
|
|
dh_strip -i
|
|
dh_compress -i
|
|
dh_fixperms -i
|
|
dh_makeshlibs -i -V
|
|
dh_installdeb -i
|
|
dh_perl -i
|
|
dh_python3 -i
|
|
dh_shlibdeps -i
|
|
dh_gencontrol -i
|
|
dh_md5sums -i
|
|
dh_builddeb -i
|
|
|
|
binary-arch: install
|
|
dh_testdir -a
|
|
dh_testroot -a
|
|
dh_installdebconf -a
|
|
dh_installdocs -a
|
|
dh_installexamples -a
|
|
dh_installsystemd -a --name=heartbeat
|
|
dh_installman -a
|
|
dh_installchangelogs -a $(CURDIR)/doc/ChangeLog
|
|
dh_link -a
|
|
dh_strip -a
|
|
dh_compress -a
|
|
dh_fixperms -a --exclude usr/bin/cl_status
|
|
dh_makeshlibs -a -V
|
|
dh_installdeb -a
|
|
dh_perl -a
|
|
dh_python3 -a
|
|
dh_shlibdeps -a
|
|
dh_gencontrol -a
|
|
dh_md5sums -a
|
|
dh_builddeb -a
|
|
|
|
binary: binary-indep binary-arch
|
|
dh_missing --list-missing
|
|
|
|
.PHONY: build clean binary binary-indep binary-arch install
|