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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 by Joey Hess.
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=2
# This has to be exported to make some magic below work.
export DH_OPTIONS
build: build-stamp
build-stamp:
dh_testdir
# we need a path to the kernel sources.
# Link to top dir so that local choice can be preserved. That link must
# be made first thing, otherwise it will try to unpack
# /usr/src/kernel-source-2.4.*.tar.bz2 .
# This used to be "parent dir", but that doesn't always work for
# build daemons...
# This has moved to an external script, as large chunks of shell
# script in makefiles is an ugly solution.
sh debian/prepare-kernel-source $(DEB_HOST_ARCH)
cp debian/isdnactivecards.files.all debian/isdnactivecards.files
cp debian/isdnactivecards.conffiles.all debian/isdnactivecards.conffiles
# we need a .config file. Try isdnutils.config in parent directory first
# so that local choice can be preserved.
test -f ../isdnutils.config && cp ../isdnutils.config .config || \
sed -e "s#@KERNELDIR@#`pwd`/linux#" \
< debian/dotconfig > .config
# build only isdnvboxclient on the "excluded" arches
if [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
sed -e "s#@KERNELDIR@#`pwd`/linux#" < debian/dotconfig.vboxclientonly > .config; \
fi
# ugh
touch eurofile/configure
# gcc 2.95 on powerpc doesn't compile our stuff - the compiler breaks
# with an internal error. So we use gcc-3.0
if [ $(DEB_HOST_ARCH) = powerpc ]; then \
CC=gcc-3.0 $(MAKE) subconfig; \
else \
$(MAKE) subconfig; \
fi
$(MAKE)
# note the "NOT!" directly after the "if" below.
if ! [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
(cd isdnlog/tools/zone; $(MAKE) zonefiles); \
(cd Mini-FAQ; make); \
fi
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
-$(MAKE) distclean
rm -f isdnlog/client/config.cache isdnlog/client/config.status
#-rm -f vbox/examples/beep.msg.example
#-rm -f `find . -name "*~"`
#-rm -rf debian/tmp* `find debian/* -type d ! -name CVS` debian/files* core
-rm -rf linux debian/linux debian/kernel-source-*
-rm -f debian/isdnactivecards.files debian/isdnactivecards.conffiles
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Install ALL dirs into tmp also. Unfortunately there's no easy way...
sort -u debian/*.dirs > debian/tmp.dirs
dh_installdirs -Pdebian/tmp -pisdnutils `cat debian/tmp.dirs`
rm debian/tmp.dirs
# Add here commands to install the package into debian/tmp
# (the files get moved out by dh_movefiles later)
$(MAKE) install DESTDIR=`pwd`/debian/tmp
# note the "NOT!" directly after the "if" below.
if ! [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
chmod +x debian/finish-install-first.sh; \
debian/finish-install-first.sh; \
dh_movefiles -i; \
fi
# These apply to all arch'es:
mv debian/tmp/usr/share/man/man5/vbox_file.5 debian/tmp/usr/share/man/man5/vbox.5
install -m 0644 vbox/examples/vboxrc.example debian/isdnvboxclient/usr/share/doc/isdnvboxclient/examples/vboxrc
dh_movefiles -s
if ! [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
chmod +x debian/finish-install-last.sh; \
debian/finish-install-last.sh; \
fi
# These apply to all arch'es:
# the binary is called vboxcnvt, not vboxconvert
mv debian/isdnvboxclient/usr/share/man/man1/vboxconvert.1 debian/isdnvboxclient/usr/share/man/man1/vboxcnvt.1
# 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
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
dh_installexamples
# dh_installmenu
# dh_installemacsen
# dh_installpam
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installchangelogs
dh_link
dh_compress
dh_fixperms
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=-s
binary-arch: build install
dh_testdir
dh_testroot
dh_installdebconf
dh_installdocs
if ! [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
install -m 0644 debian/README.MPPP debian/README.multiple-ipppd debian/ipppd/usr/share/doc/ipppd/; \
fi
dh_installexamples
dh_installmenu
# dh_installpam
# override the "global" DH_OPTIONS=-a setting for one command
if ! [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
env DH_OPTIONS='' dh_installinit --no-restart-on-upgrade --update-rcd-params='defaults 20 21' -pisdnactivecards; \
fi
# Ok, for two commands
# No, for one command after all. Do this one by hand.
# env DH_OPTIONS='' dh_installinit --no-restart-on-upgrade -pisdnutils-base
# the postinst stuff normally done by dh is now statically in there.
if ! [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
install -m 0755 debian/isdnutils-base.init debian/isdnutils-base/etc/init.d/isdnutils; \
fi
dh_installcron
if ! [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
ln -s ../man7/isdn_cause.7.gz debian/isdnutils-base/usr/share/man/man1/isdncause.1.gz; \
fi
# lintian junk
# - duh, it's an example, why should it be executable
install -d debian/isdnutils-base/usr/share/lintian/overrides
install -m 644 debian/isdnutils-base.lintian-overrides debian/isdnutils-base/usr/share/lintian/overrides/isdnutils-base
# - the upstream source contains junk, how am I supposed to change that?!
install -d debian/isdnutils/usr/share/lintian/overrides
install -m 644 debian/isdnutils.lintian-overrides debian/isdnutils/usr/share/lintian/overrides/isdnutils
# - INSTALL is not a compilation guide, it's a real usage guide.
install -d debian/isdneurofile/usr/share/lintian/overrides
install -m 644 debian/isdneurofile.lintian-overrides debian/isdneurofile/usr/share/lintian/overrides/isdneurofile
# - again, examples scripts that shouldn't be executable
# - and I *do* want a different default depending on the language!
install -d debian/isdnlog/usr/share/lintian/overrides
install -m 644 debian/isdnlog.lintian-overrides debian/isdnlog/usr/share/lintian/overrides/isdnlog
# - these shared libraries are only used by a single binary that knows all about them
install -d debian/pppdcapiplugin/usr/share/lintian/overrides
install -m 644 debian/pppdcapiplugin.lintian-overrides debian/pppdcapiplugin/usr/share/lintian/overrides/pppdcapiplugin
# - there's no -dev package, so shut up about the shlib symlink
# - No, I don't call ldconfig in an unsafe manner
install -d debian/libcapi20/usr/share/lintian/overrides
install -m 644 debian/libcapi20.lintian-overrides debian/libcapi20/usr/share/lintian/overrides/libcapi20
# - not much chance of more processed with the name "vboxgetty", and start-stop-daemon won't work
# - db_input in postinst only in extreme situations
install -d debian/isdnvboxserver/usr/share/lintian/overrides
install -m 644 debian/isdnvboxserver.lintian-overrides debian/isdnvboxserver/usr/share/lintian/overrides/isdnvboxserver
# - yet again, examples scripts that shouldn't be executable
# - db_input in postinst only in extreme situations
install -d debian/ipppd/usr/share/lintian/overrides
install -m 644 debian/ipppd.lintian-overrides debian/ipppd/usr/share/lintian/overrides/ipppd
dh_installchangelogs
dh_strip
dh_link
dh_compress
dh_fixperms
dh_installdeb
# dh_makeshlibs
# dh_perl
dh_shlibdeps
dh_gencontrol
## # dont build isdnvboxclient on all architectures.
## for pkg in isdnutils isdnutils-xtools ipppd isdnlog isdnvbox isdnvboxserver libcapi20 isdnactivecards pppdcapiplugin isdneurofile; do \
## dpkg-gencontrol -ldebian/changelog -isp -p$pkg -Tdebian/$pkg.substvars -Pdebian/$pkg; \
## done
## case $(DEB_HOST_ARCH) in \
## hurd) ;; \
## *) dpkg-gencontrol -ldebian/changelog -isp -pisdnvboxclient -Tdebian/isdnvboxclient.substvars -Pdebian/isdnvboxclient; \
## esac
## chmod 644 debian/*/DEBIAN/control
## chown 0.0 debian/*/DEBIAN/control
dh_md5sums
dh_builddeb
# checking that nothing is left behind...
rm -f debian/tmp/etc/services # this should be ignored
@if [ $(DEB_HOST_ARCH) = hurd -o $(DEB_HOST_ARCH) = hurd-i386 -o $(DEB_HOST_ARCH) = hppa -o $(DEB_HOST_ARCH) = s390 -o $(DEB_HOST_ARCH) = sh ]; then \
echo "Ignore any of the 'still existing files' listed below on this architecture."; \
fi
@if [ ! -z "`find debian/tmp ! -type d`" ]; then echo "The following files still exist in debian/tmp/:"; find debian/tmp ! -type d -ls; fi;
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|