1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# 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-independant
# package.
package=tktable
version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
tmpdir=/tmp/$(package)
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
build: build-stamp
build-stamp:
dh_testdir
install -d $(tmpdir)
ln -s /usr/lib $(tmpdir)/lib && ln -s /usr/include $(tmpdir)/include
cd unix && ./configure --prefix=$(tmpdir) --with-tcl=/usr/lib/tcl8.3 --with-tk=/usr/lib/tk8.3 --x-includes=/usr/include/tcl8.3 --x-includes=/usr/include/tk8.3
#
# First build the shared library
cd unix && $(MAKE)
cd unix && $(MAKE) html
#
# Build the static library (it does not need Position Independent Code,
# which reserves one register; thus without -fPIC we get more efficient
# code).
#
cd unix && $(MAKE) static
rm -rf $(tmpdir)
clean:
dh_testdir
dh_testroot
rm -f build-stamp
-rm -rf static shared
# Add here commands to clean up after the build process.
-rm -rf $(tmpdir)
cd unix && ./configure --prefix=$(tmpdir) --with-tcl=/usr/lib/tcl8.3 --with-tk=/usr/lib/tk8.3 --x-includes=/usr/include/tcl8.3 --x-includes=/usr/include/tk8.3 && $(MAKE) distclean
dh_clean
# Build architecture-independent files here.
binary-indep: build
#
# Nothing to do?
#
binary-arch: build
# dh_testversion
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the files into debian/tmp
# $(MAKE) install DESTDIR=`pwd`/debian/tmp
install -d $(tmpdir)/lib $(tmpdir)/man/mann
cd unix && $(MAKE) install DESTDIR=`pwd`/debian/tmp
cp -a $(tmpdir)/lib `pwd`/debian/tmp/usr
cp -a $(tmpdir)/man/mann/tkTable.n `pwd`/debian/tmp/usr/share/man/man3/tktable.3
cp -a demos debian/tmp/usr/share/doc/tktable-dev && gzip -9 debian/tmp/usr/share/doc/tktable-dev/demos/*
ln -s Tktable2.7/Tktable.so.2.7 debian/tmp/usr/lib/Tktable.so.2.7
ln -s Tktable.so.2.7 debian/tmp/usr/lib/Tktable.so.2
strip --strip-unneeded debian/tmp/usr/lib/Tktable2.7/*.so.*
cp unix/Tktable.a debian/tmp/usr/lib/Tktable2.7
dh_movefiles
dh_installdocs
dh_installexamples
dh_installmenu
# dh_installinit
dh_installcron
dh_installmanpages
# dh_undocumented
dh_installchangelogs ChangeLog
dh_strip
dh_compress
dh_fixperms
dh_suidregister
dh_installdeb
install -m644 debian/shlibs debian/tmp/DEBIAN
dh_shlibdeps
dh_gencontrol
dh_makeshlibs
dh_md5sums
dh_builddeb
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|