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
|
#!/usr/bin/make -f
# -*- makefile -*-
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
include /usr/share/quilt/quilt.make
name = grid-packaging-tools
version = 3.2globus2
_prefix = /usr
perl_vendorlib = $(shell eval "`perl -V:installvendorlib`"; echo $$installvendorlib)
configure: configure-stamp
:
configure-stamp: $(QUILT_STAMPFN)
dh_testdir
touch packaging_tools/aclocal.m4 && \
touch packaging_tools/Makefile.in && \
touch packaging_tools/configure
for f in config.sub config.guess ; do \
if [ -e /usr/share/misc/$$f -a ! \
-e packaging_tools/$$f.dist ] ; then \
mv packaging_tools/$$f packaging_tools/$$f.dist ; \
cp -f /usr/share/misc/$$f packaging_tools/$$f ; \
fi ; \
done
cd packaging_tools && ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=$(_prefix) \
--mandir='$${datadir}/man' \
--infodir='$${datadir}/info' \
--libexecdir='$${datadir}/globus' \
--with-perlmoduledir=$(perl_vendorlib) \
--disable-compat
touch $@
build: build-stamp
:
build-stamp: configure-stamp
dh_testdir
cd packaging_tools && $(MAKE)
touch $@
unpatch: cleanup
clean: unpatch
:
cleanup:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
cd packaging_tools && if [ -r Makefile ] ; then $(MAKE) distclean ; fi
# leftover file after distclean due to broken Makefile
rm -f packaging_tools/gpt_scripts_list
for f in config.sub config.guess ; do \
if [ -e packaging_tools/$$f.dist ] ; then \
mv -f packaging_tools/$$f.dist packaging_tools/$$f ; \
fi ; \
done
dh_clean
install: build-stamp
dh_testdir
dh_testroot
dh_clean -k
cd packaging_tools && \
$(MAKE) DESTDIR=$(CURDIR)/debian/$(name) install
cd packaging_tools && \
$(MAKE) DESTDIR=$(CURDIR)/debian/$(name) install-man
# Remove perl version check script that is not used for anything
# (and even gets installed without shebang so it is not executable
# from the path)
rm $(CURDIR)/debian/$(name)/usr/sbin/gpt-perl-version
# Remove old globus core source tarball - users should install an
# up-to-date globus-core package instead of having gpt compile it
# from source
rm $(CURDIR)/debian/$(name)/usr/share/globus/globus_core-src.tar.gz
# Remove temporary build file
rm $(CURDIR)/debian/$(name)/usr/share/globus/gpt_scripts_list
binary-indep: install
dh_testdir
dh_testroot
dh_installchangelogs CHANGES
dh_installdocs
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_perl
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_lintian
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep
:
get-orig-source:
if [ -r $(name)_$(version).orig.tar.gz ] ; then \
echo "$(name)_$(version).orig.tar.gz already exists." ; \
else \
echo "Fetching and untaring upstream version." ; \
wget -O - http://www-unix.globus.org/ftppub/gt4/4.2.1/gpt/gpt-$(version).tar.gz | tar -xzf - ; \
echo "Removing redundant or unnecessary files/directories." ; \
rm -r gpt/support gpt/tools gpt/packaging_tools/etc/globus_core-src.tar.gz ; \
touch gpt/packaging_tools/etc/globus_core-src.tar.gz ; \
mv gpt $(name)-$(version) ; \
echo "Packing it up again." ; \
GZIP=-9 tar --exclude=CVS -czf \
$(name)_$(version).orig.tar.gz $(name)-$(version) ; \
echo "Cleaning up." ; \
rm -rf $(name)-$(version) ; \
fi
.PHONY: build clean binary-indep binary install configure get-orig-source
|