3
# Uncomment this to turn on verbose mode.
6
# This has to be exported to make some magic below work.
9
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
22
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
24
MAKEFLAGS += -j$(NUMJOBS)
28
DTMP:=$(CURDIR)/debian/tmp
29
RELEASE := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }')
30
UPSTREAM := $(shell echo "$(RELEASE)" | sed 's/:\?\([0-9\.]\+\)-[0-9].*/\1/')
32
configure-stamp: configure
35
test -x ./configure || ./autogen.sh
36
./configure --with-ocf-root=/usr/lib/ocf --with-initdir=/etc/init.d \
37
--prefix=/usr --sysconfdir=/etc --localstatedir=/var \
38
--mandir=/usr/share/man --libdir=/usr/lib --disable-fatal-warnings
42
build: build-arch build-indep
44
build-arch: build-arch-stamp
45
build-arch-stamp: configure-stamp
49
build-indep: build-indep-stamp
50
build-indep-stamp: configure-stamp
56
[ ! -f Makefile ] || $(MAKE) clean
57
[ ! -f Makefile ] || $(MAKE) distclean
60
install: install-indep install-arch
67
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
70
dh_install --list-missing
76
# install example configuration file
77
mkdir -p $(CURDIR)/debian/ldirectord/usr/share/doc/ldirectord/examples/
78
cp -ax $(CURDIR)/debian/ldirectord.cf.example $(CURDIR)/debian/ldirectord/usr/share/doc/ldirectord/examples/ldirectord.cf
80
# install ldirectord default file
81
mkdir -p $(CURDIR)/debian/ldirectord/etc/default/
82
cp -ax $(CURDIR)/debian/ldirectord.default $(CURDIR)/debian/ldirectord/etc/default/ldirectord
84
-mv $(CURDIR)/debian/resource-agents/usr/sbin/rhev-check.sh $(CURDIR)/debian/resource-agents/usr/sbin/rhev-check
101
# Build architecture independant packages using the common target.
102
binary-indep: build-indep install-indep
103
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
105
# Build architecture dependant packages using the common target.
106
binary-arch: build-arch install-arch
107
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
109
binary: binary-arch binary-indep
110
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure