[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.5, Mon Feb 23 23:13:47 2004 UTC (20 years, 4 months ago) by takayama
Branch: MAIN
Changes since 1.4: +1 -1 lines

The target install-document installs asir under bin as a dependency,
so do "cd asir-port ; make install" to undo the asir installation for knoppix.

#!/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
MAN_PAGES    = openxm.1 sm1.1
EXECUTABLES = gnuplot4ox gnuplot_x11 k0 ox ox_sm1 oxlog oxweave sm1 tigers

SHELL_SCRIPTS=asir sm1 oxgp 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)
	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 )
	#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