#!/usr/bin/make -f # -*- makefile -*- export DEB_BUILD_MAINT_OPTIONS = hardening=+all -include /usr/share/dpkg/buildflags.mk name = globus-gridftp-server _name = globus_gridftp_server INSTALLDIR = $(CURDIR)/debian/tmp _prefix = /usr _bindir = $(_prefix)/bin _sbindir = $(_prefix)/sbin _includedir = $(_prefix)/include _libdir = $(_prefix)/lib _datadir = $(_prefix)/share _mandir = $(_datadir)/man _docdir = $(_datadir)/doc/lib$(name)-dev configure: configure-stamp configure-stamp: dh_testdir dh_autoreconf CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \ FFLAGS="$(FFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ LDFLAGS="$(LDFLAGS) -Wl,--as-needed -Wl,-z,defs" \ GLOBUS_VERSION=6.2 \ GRIDMAP=/etc/grid-security/grid-mapfile \ dh_auto_configure -- \ --disable-static \ --includedir=$(_includedir)/globus \ --libexecdir=$(_datadir)/globus \ --docdir=$(_docdir) # Reduce overlinking sed 's!CC \(.*-shared\) !CC \\\$${wl}--as-needed \1 !' -i libtool touch $@ build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp: configure-stamp dh_testdir $(MAKE) ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) $(MAKE) check VERBOSE=1 endif touch $@ clean: dh_testdir dh_testroot if [ -r Makefile ] ; then $(MAKE) distclean ; fi dh_autoreconf_clean rm -f build-stamp configure-stamp dh_clean install: build-stamp dh_testdir dh_testroot dh_prep $(MAKE) install DESTDIR=$(INSTALLDIR) # Remove libtool archives (.la files) rm $(INSTALLDIR)$(_libdir)/*/*.la mv $(INSTALLDIR)/etc/gridftp.conf.default \ $(INSTALLDIR)/etc/gridftp.conf mkdir -p $(INSTALLDIR)/etc/xinetd.d mv $(INSTALLDIR)/etc/gridftp.xinetd.default \ $(INSTALLDIR)/etc/xinetd.d/gridftp mv $(INSTALLDIR)/etc/gridftp.gfork.default \ $(INSTALLDIR)/etc/gridftp.gfork # No need for environment in gfork scripts sed '/ env /d' -i $(INSTALLDIR)/etc/gridftp.gfork sed '/^env /d' -i $(INSTALLDIR)/etc/xinetd.d/gridftp # Remove start-up scripts rm -rf $(INSTALLDIR)/etc/init.d # Remove installed license file rm $(INSTALLDIR)$(_docdir)/GLOBUS_LICENSE binary: binary-arch binary-indep binary-arch: install dh_testdir dh_testroot dh_installdocs debian/README dh_installchangelogs dh_install dh_missing --fail-missing dh_installman dh_installinit --name globus-gridftp-server --no-enable dh_installinit --name globus-gridftp-sshftp --no-enable dh_link dh_strip --dbgsym-migration='lib$(name)-dbg (<< 12.2-2~), $(name)-dbg (<< 12.2-2~)' dh_compress dh_fixperms dh_perl dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary-indep: .PHONY: binary binary-arch binary-indep build build-arch build-indep clean configure install