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
|
#!/usr/bin/make -f
# export DH_VERBOSE=1
export DH_OPTIONS
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
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
configure: configure-stamp
:
configure-stamp:
dh_testdir
CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" \
./configure --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--libexecdir='$${prefix}/lib' \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir='$${datadir}/man' \
--infodir='$${datadir}/info'
touch $@
build: build-arch build-indep
:
build-arch: build-arch-stamp
:
build-arch-stamp: configure-stamp
$(MAKE)
$(MAKE) check
touch $@
build-indep: build-indep-stamp
:
build-indep-stamp: configure-stamp
$(MAKE) doc
touch $@
clean:
dh_testdir
dh_testroot
if [ -r Makefile ] ; then $(MAKE) distclean ; fi
rm -f debian/nordugrid-arc-nox-arex.a-rex.init
rm -f debian/nordugrid-arc-nox-hed.arched.init
dh_clean configure-stamp build-arch-stamp build-indep-stamp
install: install-indep install-arch
:
install-indep: build-indep-stamp
dh_testdir
dh_testroot
dh_clean -k -i
install-arch: build-arch-stamp
dh_testdir
dh_testroot
dh_clean -k -a
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
rm -f $(CURDIR)/debian/tmp/usr/lib/arc/lib*.la
rm -f $(CURDIR)/debian/tmp/usr/lib/arc/lib*.a
rm -rf $(CURDIR)/debian/tmp/usr/share/doc/arc
rm -f $(CURDIR)/debian/tmp/usr/share/arc/examples/storage_service.xml.example
mv debian/tmp/etc/init.d/a-rex debian/nordugrid-arc-nox-arex.a-rex.init
mv debian/tmp/etc/init.d/arched debian/nordugrid-arc-nox-hed.arched.init
binary-indep: install-indep
dh_testdir
dh_testroot
dh_installdirs -i
dh_installexamples -i
dh_installman -i
dh_installdocs -i
dh_installchangelogs -i
dh_compress -i -X .pdf
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: install-arch
dh_testdir
dh_testroot
dh_installdirs -a
dh_installdocs -a
dh_installexamples -a
dh_installman -a
dh_install -a --fail-missing
dh_installchangelogs -a
dh_installinit --name arched
dh_installinit --name a-rex
dh_perl -a
dh_pysupport -a
dh_link -a
dh_strip -a --dbg-package=nordugrid-arc-nox-dbg
dh_compress -a -X .pdf
dh_fixperms -a
dh_makeshlibs -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-arch binary-indep
:
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
|