#!/usr/bin/make -f # -*- makefile -*- # debian/rules file for the Debian/GNU Linux ggobi package # Copyright 2002 - 2014 by Dirk Eddelbuettel # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 package := $(shell grep Package debian/control | sed 's/^Package: //') debtmp := $(CURDIR)/debian/$(package) plugins := "DataViewer DescribeDisplay GraphAction VarCloud ggvis" cflags = $(shell dpkg-buildflags --get CFLAGS) fcflags = $(shell dpkg-buildflags --get FFLAGS) ldflags = $(shell dpkg-buildflags --get LDFLAGS) configure: configure-stamp #configure-stamp: patch-stamp configure-stamp: dh_testdir dh_autoreconf # GGOBI_HOME=/usr/lib/ggobi \ # GGOBI_ROOT=/usr/lib/ggobi # ./bootstrap # ## same as # autoreconf -iv --force # autopoint -f # CFLAGS="$(cflags)" \ # FFLAGS="$(fcflags)" \ # LDFLAGS="$(ldflags)" ./configure --prefix=/usr \ --with-all-plugins # --with-plugins="DataViewer DescribeDisplay ggvis GraphAction VarCloud" # --without-plugins # --enable-embed \ # --with-dataviewer \ # --with-describedisplay \ # --with-ggvis \ # --without-graphaction \ # --without-graphlayout \ # --with-varcloud # --with-xml=/usr/include/libxml2 # 3 Aug 2004: turn off all plugins # --without-graphlayout \ # --without-graphaction \ # --without-ggvis \ # --without-dataviewer \ # --without-varcloud \ # --without-describedisplay \ # --without-gtk2 \ # --without-postgres \ # --without-fileselector \ # --without-plugins \ # --without-R \ # --without-Python \ # --without-Perl touch configure-stamp build: build-arch build-indep build-arch: configure build-stamp build-indep: configure build-stamp build-stamp: dh_testdir $(MAKE) touch build-stamp #clean: clean1 unpatch clean: clean1 clean1: dh_testdir dh_testroot dh_autoreconf_clean rm -f build-stamp configure-stamp install-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_clean src/libggobi.so src/xmlConvert.o src/config.h \ bin/ggobi.bin bin/xmlConvert bin/setLD.csh \ bin/ggobi bin/ggobi-config bin/setLD.bsh \ src/ggobiMain.o \ config.log config.status config.cache \ Makeconf GNUmakefile bugTemplate \ lib/* .CRulesFrag local.config \ ggobi rm -vf gtkext/src/*.so find plugins -name \*.o -o -name \*.so -o -name config.log|xargs rm -vf find . -name config.cache -o -name config.status | xargs rm -vf tryfix: cp bin/ggobi-config bin/ggobi-config-backup # Need to fix cflags, libs and ld-library-path options for ggobi-config perl -p -i -e "s|^CFLAGS=.*|CFLAGS=\"-I/usr/lib/ggobi/include\"|; s|^LIBS=.*|LIBS=\"-L/usr/lib/ggobi/lib -lggobi\"|; s|echo \"/home/.*\"|echo \"/usr/lib/ggobi/lib\"|" bin/ggobi-config-backup install: build install-stamp install-stamp: dh_testdir dh_testroot dh_prep # dh_installdirs usr/bin \ # usr/lib/ggobi/bin usr/lib/ggobi/lib \ # usr/lib/ggobi/include \ # usr/lib/ggobi/data # edd: the GNUmakefile has a broken install # edd 25 Mar 2006 reactivated under Ggobi 2.1.1 $(MAKE) install prefix=$(debtmp)/usr # install ggobirc into /etc/xdg/ggobi $(MAKE) ggobirc dh_installdirs etc/xdg/ggobic dh_install ggobirc etc/xdg/ggobi/ # # so do it manually # for i in ggobi ggobi-config; \ # do install -v -c -m 0755 bin/$$i $(debtmp)/usr/bin/; done # for i in setLD.bsh setLD.csh; do \ # install -v -c -m 0644 bin/$$i \ # $(debtmp)/usr/lib/ggobi/bin/; done # install -v -c -m 0755 bin/ggobi.bin $(debtmp)/usr/lib/ggobi/bin/ # for i in libggobi.so libgtkext.so; do \ # install -v -c -m 0755 lib/$$i \ # $(debtmp)/usr/lib/ggobi/lib/; done # install -c -m 0644 include/* $(debtmp)/usr/lib/ggobi/include # install -c -m 0644 data/* $(debtmp)/usr/lib/ggobi/data # # # # slightly modified version of ggobi shell script # install -v -c -m 0755 debian/ggobi $(debtmp)/usr/bin/ # edd 26 Mar 2006 plugins/ should not be in share, move to lib # edd 02 Dec 2006 correcting softlink, now it even works dh_installdirs usr/lib/ggobi (cd $(debtmp)/usr/share/ggobi && \ mv -v plugins ../../lib/ggobi/ && \ ln -svf ../../lib/ggobi/plugins . ) # 15 Dec 2009 remove la files # 23 Jan 2010 undo this and keep them #-rm -v $(debtmp)/usr/lib/ggobi/plugins/*/plugin.la -rm -rf $(debtmp)/usr/etc/ # edd 08 May 2011 # empty dependency_lib in .la files (cf #621213) find $(debtmp) -name \*.la | \ xargs perl -p -i -e "s/dependency_libs='.*'/dependency_libs=''/" touch install-stamp # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot # dh_installdebconf dh_installdocs doc/manual.pdf doc/XML.pdf # dh_installexamples data/* # dh_installmenu # dh_installemacsen # dh_installpam # dh_installinit # dh_installcron dh_installman debian/ggobi.1 debian/ggobi-config.1 # dh_installinfo # dh_undocumented ggobi.1 ggobi-config.1 xmlConvert.1 dh_installchangelogs dh_install -a debian/ggobi.xpm usr/share/pixmaps/ dh_install -a xdg/ggobi.desktop usr/share/applications/ dh_lintian dh_link dh_strip dh_compress dh_fixperms # clean up zero-length file (lintian) # -rm $(debtmp)/usr/share/doc/ggobi/commandArgs.html # dh_suidregister dh_makeshlibs dh_installdeb # dh_perl ## edd: not sure how to suppress the warnings # dh_shlibdeps -Xlibgtkext -Xlibggobi dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure #.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch