#!/usr/bin/make -f DESTDIR=$(CURDIR)/debian/viewmol %: dh $@ --with python2 override_dh_auto_build: $(MAKE) -C source override_dh_auto_clean: # [ ! -f source/Makefile ] || $(MAKE) -C source clean ### That's calling the not-patched source/getmachine script which is broken # viewmol's make clean does not clean out the '$$(os)' directory, so do it here. -rm -r source/Linux source/.config.Linux override_dh_auto_install: # install the package into debian/viewmol. cd source; ./install $(DESTDIR)/usr # put arch-independent files into /usr/share/viewmol (make FHS compliant) mv $(DESTDIR)/usr/lib/viewmol/viewmolrc $(DESTDIR)/etc/viewmol cd $(DESTDIR)/usr/lib/viewmol; mv readdmol readgulp readpqs writecar \ writegauss.py writemol writetm readdmol.awk \ $(DESTDIR)/usr/share/viewmol cd $(DESTDIR)/usr/lib/viewmol; mv examples locale scripts tests \ $(DESTDIR)/usr/share/viewmol # viewmol has no standard English, so change en_US to en # or else other English locales fail cd $(DESTDIR)/usr/share/viewmol/locale; mv en_US en # localised Viewmol settings may be user-configurable # (conffiles go in /etc) for i in $(DESTDIR)/usr/share/viewmol/locale/*; do \ mkdir $(DESTDIR)/etc/viewmol/locale/`basename $${i}` ; \ mv $${i}/Viewmol $(DESTDIR)/etc/viewmol/locale/`basename $${i}` ; \ ln -s /etc/viewmol/locale/`basename $${i}`/Viewmol $${i}/Viewmol ; \ done # Viewmol scripts heavily depend on VIEWMOLPATH, without # distinguishing between ../share and ../lib, so make a symlink. for i in $(DESTDIR)/usr/share/viewmol/*; do \ ln -s /usr/share/viewmol/`basename $${i}` $(DESTDIR)/usr/lib/viewmol/`basename $${i}` ; \ done # install KDE (and generic Desktop) support files cd kde; KDEDIR=$(DESTDIR)/usr ./install ln -s /usr/share/icons/crystalsvg/128x128/apps/viewmol.png $(DESTDIR)/usr/share/pixmaps override_dh_installdocs: dh_installdocs $(DESTDIR)/usr/lib/viewmol/doc/* rm -r $(DESTDIR)/usr/lib/viewmol/doc # don't want to compress examples, so don't use dh_installexamples ln -s /usr/share/viewmol/examples/ $(DESTDIR)/usr/share/doc/viewmol override_dh_installman: dh_installman debian/viewmol.1