#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 ifeq (Linux,$(shell uname -s)) KERNEL=LINUX else KERNEL="--help unknown_kernel " endif ifeq (x86_64,$(shell uname -m)) PLATFORM=AMD64 else ifeq (i686,$(shell uname -m)) PLATFORM="" else PLATFORM=" --help unknown_machine" endif endif %: dh $@ export VMDINSTALLBINDIR=/usr/bin export VMDINSTALLLIBRARYDIR=/usr/lib/vmd export TCL_INCLUDE_DIR=/usr/include/tcl DESTDIR=$(CURDIR)/debian/vmd/ override_dh_auto_configure: #FREEBSD FREEBSDAMD64 HPUX11 AIX4 AIX5 AIX5_64 AIX6_64 BLUEWATERS LINUX LINUXALPHA LINUXAMD64 LINUXIA64 LINUXPPC LINUXPPC64 MACOSX MACOSXX86 MACOSXX86_64 TRU64 SOLARIS2 SOLARIS2_64 SOLARISX86 SOLARISX86_64 WIN32 WIN64) echo "Compiling plugins first" cd plugins_source && ./build.csh -cd plugins_source && PLUGINDIR=`pwd`/../plugins make distrib echo "Setting link from ../plugins to plugins to help compilation" #ln -s $(CURDIR)/plugins_source ../plugins echo "Now configuring core VMD" VMDINSTALLBINDIR=$(DESTDIR)$(VMDINSTALLBINDIR) \ VMDINSTALLLIBRARYDIR=$(DESTDIR)$(VMDINSTALLLIBRARYDIR) \ TCL_INCLUDE_DIR=/usr/include/tcl \ ./configure $(KERNEL)$(PLATFORM) NOSTATICPLUGINS GCC TCL override_dh_auto_build: $(MAKE) -C src veryclean $(MAKE) -C src ln -f ./$(KERNEL)$(PLATFORM)/vmd_$(KERNEL)$(PLATFORM) bin/vmd override_dh_auto_install: $(MAKE) -C src install cd debian/vmd && sed -i "s%`pwd`%%" usr/bin/vmd cd debian/vmd && sed -i "s%/bin/csh%/bin/tcsh%" usr/bin/vmd