#!/usr/bin/make -f #export DH_VERBOSE=1 export LC_ALL=C.UTF-8 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) NOOPT = -no-opt endif # Pick up `-j' from xxx-buildpackage: ifneq (,$(DEB_BUILD_OPTIONS)) PARALLEL = -parallel $(shell echo $(DEB_BUILD_OPTIONS) | sed -e 's/.*parallel=\([0-9]\+\).*/\1/') endif ifneq (,$(DEB_PARALLEL_JOBS)) PARALLEL = -parallel $(DEB_PARALLEL_JOBS) endif PRECMD=$(CURDIR)/debian/linux32-wrapper export DEB_BUILD_HARDENING=1 # for qmon, sigh export DEB_BUILD_HARDENING_FORMAT=0 include /usr/share/dpkg/default.mk export SGE_INPUT_CFLAGS = $(CPPFLAGS) $(CFLAGS) export SGE_INPUT_LDFLAGS = $(LDFLAGS) export LD_RUN_PATH=/usr/lib/gridengine SGE_ARCH = $(shell source/dist/util/arch) export JAVA_HOME=/usr/lib/jvm/default-java %: dh $@ override_dh_auto_build: cd source \ && ${PRECMD} sh scripts/bootstrap.sh \ && ${PRECMD} ./aimk \ -with-jemalloc \ -DDEFAULT_EDITOR='\"sensible-editor\"' \ -no-remote \ -DSGE_LD_PATH='\"/usr/lib/gridengine/\"' \ -DDEFAULT_EDITOR='\"sensible-editor\"' \ -with-munge \ $(NOOPT) $(PARALLEL) \ && ${PRECMD} ./aimk -man \ && ${PRECMD} ant drmaa.javadoc juti.javadoc jjsv.javadoc override_dh_clean: # If just copying Debian debian over SGE distribution tarball cd debian && rm -rf sge.* sge-* README dh_clean override_dh_auto_clean: # aimk clean doesn't DTRT cd source && rm -rf CLASSES JAVADOCS MANSBUILD_* dist/qmon/Qmon find source -type d -name "LINUX*" -print0 | xargs --null rm -rf find source -type d -name "build" -print0 | xargs --null rm -rf find source -name "*_dependencies" -print0 | xargs --null rm -f for t in common exec master client qmon; do \ cp debian/gridengine.templates debian/gridengine-$$t.templates; done debconf-updatepo rm -f debian/qmon.desktop override_dh_auto_install: install -d debian/tmp/usr install -d debian/tmp/usr/share install -d debian/tmp/lib/$(DEB_HOST_GNU_TYPE)/security cd source && /usr/bin/yes | ${PRECMD} scripts/distinst \ -basedir ${CURDIR}/debian \ -vdir tmp/usr \ -allall \ -noexit cd debian/tmp/usr \ && mv man share \ && $(RM) -r hadoop dtrace ckpt util/sgeSMF start_gui_installer \ && $(RM) util/resources/loadsensors/interix-loadsensor.sh \ && $(RM) doc/arc_depend* doc/javadocs/index.html \ && $(RM) -r util/gui-installer \ && mv util/resources/drmaa4ruby . # qmake clashes with qt cd debian/tmp/usr/bin/$(SGE_ARCH) && mv qmake qmake_sge # Rename some of the spool utils so we can replace them with wrapper scripts # which set LD_LIBRARY_PATH for the spool libraries cd debian/tmp/usr/utilbin/$(SGE_ARCH) \ && mv spooledit spooledit.bin \ && mv spooldefaults spooldefaults.bin \ && install -m 755 $(CURDIR)/debian/spool.wrapper spooledit \ && install -m 755 $(CURDIR)/debian/spool.wrapper spooldefaults \ # Make manpage names sane cd debian/tmp/usr/share/man && \ for k in hostnameutils submit; do \ mv man1/$$k.1 man1/sge_$$k.1; done && \ mv man1/qmake.1 man1/qmake_sge.1 && \ for k in access_list accounting bootstrap calendar_conf checkpoint \ complex host_aliases host_conf hostgroup project qtask queue_conf \ reporting sched_conf share_tree user; do \ mv man5/$$k.5 man5/sge_$$k.5; done # Remove manpage symlinks in favour of mandb find debian/tmp/usr/share/man -type l | xargs rm -f mandb -u -c debian/tmp/usr/share/man chmod 755 debian/scripts/init_cluster debian/gridengine-wrapper cp source/clients/qmon/qmon.desktop debian mv debian/tmp/usr/lib/*/pam_sge* debian/tmp/lib/$(DEB_HOST_GNU_TYPE)/security override_dh_installinit: dh_installinit -p gridengine-master # Start the execd after the master dh_installinit -p gridengine-exec -- defaults 21 override_dh_fixperms-indep: dh_fixperms # not sure why this gets made executable, causing lintian whinges chmod -x \ debian/gridengine-common/usr/share/gridengine/util/dl.sh \ debian/gridengine-common/usr/share/gridengine/util/resources/scripts/README* override_dh_installchangelogs: dh_installchangelogs --keep NEWS