[BACK]Return to rules CVS log [TXT][DIR] Up to [local] / OpenXM / misc / packages / Linux / Debian / debian

File: [local] / OpenXM / misc / packages / Linux / Debian / debian / rules (download)

Revision 1.14, Fri Dec 17 00:13:09 2004 UTC (19 years, 5 months ago) by takayama
Branch: MAIN
CVS Tags: R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.13: +2 -2 lines

The final modifications (I hope) to use the gnuplot version 4.
  gnuplot4ox (patched version) --> gnuplot (original version)

The building on windows (cygwin) and the package generation for debian
have not yet tested.

#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. 
# GNU copyright 1997 by Joey Hess.
#
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.

# Uncomment this to turn on verbose mode. 
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
export DH_COMPAT=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

# Variables from top level Makefile (for FreeBSD) of OpenXM. Slightly modified.

SHARED_FILES = OpenXM/Copyright OpenXM/doc OpenXM/include OpenXM/man \
               OpenXM/lib/asir-contrib OpenXM/lib/java-support \
               OpenXM/lib/k097 OpenXM/lib/math OpenXM/lib/pari \
               OpenXM/lib/sm1 OpenXM/lib/asir 
BINARY_FILES = OpenXM/bin OpenXM/lib/*.a OpenXM/lib/*.so* OpenXM/lib/*.a.* \
               OpenXM/rc OpenXM/libexec/*
MAN_PAGES    = openxm.1 sm1.1
EXECUTABLES = gnuplot k0 ox ox_sm1 ox_k0 oxlog oxweave sm1 tigers ox_texmacs

SHELL_SCRIPTS=asir sm1 oxmath oxMathematica ox openxm

INST_PREFIX = `pwd`/debian/tmp/usr/local


build: build-stamp
build-stamp:
	dh_testdir
	(export PATH=${PATH}:/usr/lib/jdk1.1/bin ;  cd OpenXM/src ;\
		make configure ;\
		make ;\
		make install ; make install-document ; cd asir-port ; make install ; make clean-for-knoppix)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp 
	make -C OpenXM/src distclean
	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	mkdir -p ${INST_PREFIX}
	tar cf - ${BINARY_FILES} ${SHARED_FILES}| (cd ${INST_PREFIX} ; tar xf -)
#	(cd ${INST_PREFIX}/OpenXM/bin ; make clean-for-install)
	-for i in $(EXECUTABLES); do strip ${INST_PREFIX}/OpenXM/bin/$$i ; done
	make -C ${INST_PREFIX}/OpenXM/rc repl
	sed 's/setenv OpenXM_HOME $$HOME/setenv OpenXM_HOME \/usr\/local/' <${INST_PREFIX}/OpenXM/rc/cshrc >${INST_PREFIX}/OpenXM/rc/dot.cshrc
	sed 's/^OpenXM_HOME=$$HOME/OpenXM_HOME=\/usr\/local/' <${INST_PREFIX}/OpenXM/rc/bashrc >${INST_PREFIX}/OpenXM/rc/dot.bashrc
	mkdir ${INST_PREFIX}/bin
	(cd ${INST_PREFIX}/OpenXM/rc ; make openxm ; ./gen-shell-scripts ; cp ${SHELL_SCRIPTS} ../../bin )
# copying icons for KDE.
	mkdir -p ${INST_PREFIX}/../../usr/lib/menu
	mkdir -p ${INST_PREFIX}/../../usr/share/pixmaps
	cp ${INST_PREFIX}/OpenXM/rc/kde/openxm-binary-knoppix ${INST_PREFIX}/../../usr/lib/menu/openxm-binary
	cp ${INST_PREFIX}/OpenXM/doc/OpenXM-web/hopo_std_color.xpm ${INST_PREFIX}/OpenXM/doc/OpenXM-web/logo-openxm2-color.xpm  ${INST_PREFIX}/../../usr/share/pixmaps
# Do the final cleaning of /usr/local/OpenXM for knoppix package.
	cp `pwd`/debian/delete-files-knoppix.sh ${INST_PREFIX}/../../
	(cd ${INST_PREFIX}/../../ ; ./delete-files-knoppix.sh )
	rm -f ${INST_PREFIX}/../../delete-files-knoppix.sh
	#dh_movefiles

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
	# Need this version of debhelper for DH_OPTIONS to work.
	dh_testversion 1.1.17
	dh_testdir
	dh_testroot
#	dh_installdebconf
	dh_installdocs
	dh_installexamples
	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
	dh_installcron
#	dh_installmanpages
	dh_installinfo
#	dh_undocumented
	dh_installchangelogs 
	dh_link
	dh_compress
	dh_fixperms
	# You may want to make some executables suid here.
	dh_suidregister
	dh_installdeb
#	dh_perl
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
	# Need this version of debhelper for DH_OPTIONS to work.
	dh_testversion 1.1.17
	dh_testdir
	dh_testroot
#	dh_installdebconf
	dh_installdocs
	dh_installexamples
	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
	dh_installcron
#	dh_installmanpages
	dh_installinfo
#	dh_undocumented
	dh_installchangelogs 
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	# You may want to make some executables suid here.
	dh_suidregister
	dh_installdeb
#	dh_makeshlibs
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install