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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
#!/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.
# Some lines taken from debmake, by Cristoph Lameter.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PACKAGE=aolserver
DOCDIR=aolserver-doc
DEVDIR=aolserver-dev
TEMP:=$(shell tempfile)
build: build-stamp
build-stamp:
dh_testdir
bash -n debian/aolserver.postinst
bash -n debian/aolserver-doc.postinst
bash -n debian/aolserver.postrm
bash -n debian/aolserver-doc.postrm
bash -n debian/aolserver.preinst
bash -n debian/aolserver.prerm
bash -n debian/aolserver-doc.prerm
perl -c debian/aolsrvconfig
dh_installdirs
$(MAKE) install
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
-rm -rf `pwd`/root
-rm -f `pwd`/nsd/stamp.o
# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
#dh_clean -k
dh_installmenu
# Add here commands to install the package into debian/tmp.
#
# First, use the temporary file name (from `tempfile`) and turn it into
# a directory for our use. Then move the aolserver install
cp `pwd`/debian/aolserver.init `pwd`/debian/tmp/usr/lib/aolserver/bin/init
chmod 753 `pwd`/debian/tmp/usr/lib/aolserver/bin/init
cp `pwd`/include/* `pwd`/debian/$(DEVDIR)/usr/include/aolserver
sed "s/^PREFIX.*$$/PREFIX=\$$\(NSHOME\)/" `pwd`/include/Makefile.global > `pwd`/debian/$(DEVDIR)/usr/include/aolserver/Makefile.global
-mv `pwd`/debian/tmp/usr/lib/aolserver/lib/*.a `pwd`/debian/$(DEVDIR)/usr/lib/aolserver/lib
cp `pwd`/thread/*.a `pwd`/debian/$(DEVDIR)/usr/lib/aolserver/lib
cp `pwd`/nspd/*.a `pwd`/debian/$(DEVDIR)/usr/lib/aolserver/lib
cp `pwd`/debian/aolsrvconfig `pwd`/debian/tmp/usr/sbin
cp `pwd`/nsd/nsd.h `pwd`/debian/$(DEVDIR)/usr/include/aolserver
chmod +x `pwd`/debian/tmp/usr/sbin/aolsrvconfig
# Patch up the nsd.tcl file for Debian use
cp `pwd`/debian/nsd.tcl `pwd`/debian/tmp/usr/share/doc/aolserver/examples
cp `pwd`/debian/cron.conf `pwd`/debian/tmp/usr/share/doc/aolserver/examples/cron.conf
cp `pwd`/debian/cron.daily `pwd`/debian/tmp/etc/cron.daily/aolserver
chmod +x `pwd`/debian/tmp/etc/cron.daily/aolserver
# Move the documentation
cp `pwd`/README `pwd`/debian/tmp/usr/share/doc/aolserver/README
cp `pwd`/debian/aolsrvconfig.8 `pwd`/debian/tmp/usr/share/man/man8
# Move the examples
cp `pwd`/debian/intro.html `pwd`/debian/tmp/usr/share/doc/aolserver/examples
cp `pwd`/debian/app3.tcl `pwd`/debian/tmp/usr/lib/aolserver/servers/server1/modules/tcl
# Install the icons
uudecode `pwd`/debian/aolserver.png.uu --output=`pwd`/debian/tmp/usr/share/aolserver/icons/aolserver.png
uudecode `pwd`/debian/openlogo-50.jpg.uu --output=`pwd`/debian/tmp/usr/share/aolserver/icons/openlogo-50.jpg
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
cp `pwd`/debian/index.html `pwd`/debian/$(DOCDIR)/usr/share/doc/$(DOCDIR)/html
cp -ar `pwd`/doc/*.html `pwd`/debian/$(DOCDIR)/usr/share/doc/$(DOCDIR)/html
cp -ar `pwd`/doc/admin `pwd`/debian/$(DOCDIR)/usr/share/doc/$(DOCDIR)/html
cp `pwd`/debian/aolserver-admin `pwd`/debian/$(DOCDIR)/usr/share/doc-base
cp -ar `pwd`/doc/cdev `pwd`/debian/$(DOCDIR)/usr/share/doc/$(DOCDIR)/html
cp `pwd`/debian/aolserver-cdev `pwd`/debian/$(DOCDIR)/usr/share/doc-base
cp -ar `pwd`/doc/tcldev `pwd`/debian/$(DOCDIR)/usr/share/doc/$(DOCDIR)/html
cp `pwd`/debian/aolserver-tcldev `pwd`/debian/$(DOCDIR)/usr/share/doc-base
cp `pwd`/doc/*.txt `pwd`/debian/$(DOCDIR)/usr/share/doc/$(DOCDIR)
rm -f `pwd`/debian/$(DOCDIR)/usr/share/doc/$(DOCDIR)/license* # Already in as "copyright"
# Build architecture-dependent files here.
binary-arch: build install
# dh_testversion
dh_testdir
dh_testroot
dh_installdocs
# dh_installexamples
# dh_installmenu
# dh_installemacsen
# dh_installinit
# dh_installcron
# dh_installmanpages
dh_installdebconf
# dh_undocumented
dh_installchangelogs
dh_strip
dh_compress
dh_fixperms
dh_installdeb
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
|