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
|
#!/usr/bin/make -f
# -*- makefile -*- made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=proftpd
SHELL=/bin/bash
CC=cc
ifeq ("$(shell bash debian/getkernelversion)", "privs")
LINUXPRIVS=:mod_linuxprivs
endif
build: stamp-configure
$(checkdir)
$(MAKE)
touch build
stamp-configure:
ln -sf ../contrib/mod_ratio.c modules/mod_ratio.c
CC="$(CC)" ./configure --prefix=/usr \
--sysconfdir=/etc --localstatedir=/var/run \
--enable-autoshadow \
--with-modules=mod_ratio$(LINUXPRIVS):mod_readme
touch stamp-configure
l33ch:
rm -rf debian/www && install -d debian/www/www.proftpd.org
cd debian/www && wget -nv -r -l2 -k www.proftpd.org
rm -rv debian/www/www.proftpd.org/_*
cd debian/www && tar -czvf ../www.proftpd.org.tar.gz www.proftpd.org
test -f debian/www/www.proftpd.org/index.html
uuencode www.proftpd.org.tar.gz \
< debian/www.proftpd.org.tar.gz > debian/manual.uue
rm debian/www.proftpd.org.tar.gz
clean:
$(checkdir)
dh_clean
rm -f build stamp-configure
-$(MAKE) distclean
rm -f $$(find . -type l) $$(find . -name "*~" -o -name "*.o")
rm -f proftpd config.cache config.log lib/*.a ftpshut
rm -rf $$(find debian/* -type d) debian/{files*,*substvars*,*.gz} core
rm -f $$(find * -name "*.orig") modules/mod_ratio.c
find .. -name $(package)*.asc -size 0 -maxdepth 1 -exec rm {} ";"
chmod 755 debian/{preinst,postinst,postrm,init,cron.monthly}
chmod 755 debian/getkernelversion
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: checkroot build
$(checkdir)
rm -rf debian/tmp && install -d debian/tmp
dh_installdirs
dh_installdocs README README.Solaris2.5x INSTALL doc/API \
contrib/mod_ratio.c
dh_installinit
dh_installchangelogs changelog
$(MAKE) install prefix=$$(pwd)/debian/tmp/usr \
rundir=$$(pwd)/debian/tmp/var/run/proftpd \
sysconfdir=$$(pwd)/debian/tmp/etc INSTALL=install
cd debian/tmp/usr/man/man5 && mv xferlog.5 xferlog.proftpd.5
rm debian/tmp/usr/sbin/in.proftpd
install contrib/xferstats.holger-preiss \
debian/tmp/usr/sbin/xferstats.proftpd
cp debian/basic.conf debian/tmp/etc/proftpd.conf
cd debian && uudecode manual.uue && tar -zxvf www.proftpd.org.tar.gz
cp -a debian/www.proftpd.org/{images,*.html} \
debian/tmp/usr/doc/$(package)
cp -a debian/cron.monthly debian/tmp/etc/cron.monthly/$(package)
dh_installexamples sample-configurations/*
dh_undocumented xferstats.proftpd.8
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol -u-isp
dh_strip
dh_md5sums
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|