#!/usr/bin/make -f # rules file for netwib library (July 2004) # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %.dat.bkp : %.dat # create backup of files that will be tweaked later if [ ! -d src.bak ] ; then cp -a src src.bak ; fi sed -i.bkp \ -e 's|\(NETWAGDEF_INSTPREFIX\)=.*|\1=/usr|g' \ -e 's|\(NETWOXDEF_INSTPREFIX\)=.*|\1=/usr|g' \ -e 's|\(NETWIBDEF_INSTPREFIX\)=.*|\1=/usr|g' \ -e 's|\(NETWIBDEF_INSTDESTDIR\)=.*|\1=$(realpath .)/debian/tmp/netwib|g' \ -e 's|\(NETWOXDEF_INSTPREFIX\)=.*|\1=/usr|g' \ -e 's|\(NETWOXDEF_INSTDESTDIR\)=.*|\1=$(realpath .)/debian/tmp/netwox|g' \ -e 's|\(NETWAGDEF_INSTDESTDIR\)=.*|\1=$(realpath .)/debian/tmp/netwag|g' \ $(MORESUBS) \ $< # Using explicit x-term path instead of detection. src/netwag-src/src/config.dat.bkp : MORESUBS=-e 's|^\#bin_term=.*|bin_term="/usr/bin/x-terminal-emulator"|g' -e 's|^\#bin_term_param=.*|bin_term_param="-e"|g' override_dh_auto_configure: src/netwib-src/src/config.dat.bkp src/netwox-src/src/config.dat.bkp src/netwag-src/src/config.dat.bkp @# Need to build and install netwib for netwox's genemake to work, &c. override_dh_auto_build: override_dh_auto_install: > Makefile cd src/netwib-src/src && ./genemake dh_auto_build -- -C src/netwib-src/src installso cd src/netwox-src/src && ./genemake # Sorry folks, we have to use rpath cause our library isn't public. sed -i \ -e 's|\(GCCOPT\)=.*|\1=-O2 -Wall -fno-strict-aliasing -Wl,-rpath,/usr/lib/netwib|g' \ src/netwox-src/src/Makefile grep GCCOPT src/netwox-src/src/Makefile dh_auto_build -- -C src/netwox-src/src install cd src/netwag-src/src && ./genemake dh_auto_build -- -C src/netwag-src/src install # Making netwib version independent. rm -v debian/tmp/netwib/usr/lib/libnetwib.so # Making netwox version independent. rm -v debian/tmp/netwox/usr/bin/netwox mv -v debian/tmp/netwox/usr/bin/netwox* debian/tmp/netwox/usr/bin/netwox rm -v debian/tmp/netwox/usr/man/man1/netwox.1 mv -v debian/tmp/netwox/usr/man/man1/netwox* debian/tmp/netwox/usr/man/man1/netwox.1 # Making netwag version independent. rm -v debian/tmp/netwag/usr/bin/netwag mv -v debian/tmp/netwag/usr/bin/netwag* debian/tmp/netwag/usr/bin/netwag rm -v debian/tmp/netwag/usr/man/man1/netwag.1 mv -v debian/tmp/netwag/usr/man/man1/netwag* debian/tmp/netwag/usr/man/man1/netwag.1 sed -i -e 's|set netwag_glo_bin_netwox "/usr/bin/netwox.*|set netwag_glo_bin_netwox "/usr/bin/netwox"|g' debian/tmp/netwag/usr/bin/netwag ln src/netwag-src/misc/unix/ico/ico_netw-32x32.xpm netwag.xpm ln src/netwib-src/doc/credits.txt netwib_credits.txt execute_before_dh_auto_clean: if [ -d src.bak ] ; then rm -rf src ; mv src.bak src ; fi override_dh_installchangelogs: dh_installchangelogs src/netwag-src/doc/changelog.txt override_dh_compress: dh_compress -Xcredits.txt -Xnetwib_credits.txt %: dh $@