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
|
#!/usr/bin/make -f
# Derived from wu-ftpd-academ rules file and dh_make examples.
export CFLAGS = -g -Wall -D_FILE_OFFSET_BITS=64 # -DPARANOID
export INSTALL_PROGRAM = install
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL += -s
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
#export DH_VERBOSE=1
export DH_OPTIONS
tmp=$(shell pwd)/debian/wu-ftpd
configure: configure-stamp
configure-stamp:
dh_testdir
autoconf
./configure --prefix=/usr --with-etc-dir=/etc/wu-ftpd \
--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
--with-log-dir=/var/log/wu-ftpd --disable-numericuid \
--mandir='$${prefix}/share/man' --enable-pam \
--enable-quota --enable-passwd --disable-mail
touch $@
build: build-stamp
build-stamp: configure
dh_testdir
$(MAKE)
touch $@
clean:
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean configure-stamp build-stamp install-stamp config.log
debconf-updatepo
cp /usr/share/misc/config.guess /usr/share/misc/config.sub .
install: install-stamp
install-stamp: build-stamp checklocations
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install prefix=$(tmp)/usr
install -m 755 util/xferstats $(tmp)/usr/sbin/xferstats
install -m 755 debian/addftpuser $(tmp)/usr/sbin/addftpuser
install -m 644 debian/ftpusers $(tmp)/etc/ftpusers
cd $(tmp)/usr/sbin && ln -s addftpuser rmftpuser
install -m 755 debian/bug.script $(tmp)/usr/share/bug/wu-ftpd/script
# cd $(tmp)/etc/wu-ftpd && ln -sf ../ftpusers ftpusers
set -e; cd debian; for p in in.*; do \
install -m644 $$p $(tmp)/etc/wu-ftpd/`echo $$p|sed -e 's/in\.//'`;\
done
touch $@
binary-indep:
# nothing to see here, move along...
binary-arch: DH_OPTIONS=-pwu-ftpd
binary-arch: install-stamp
dh_testdir
dh_testroot
dh_installdocs ERRATA README doc/HOWTO/VIRTUAL.FTP.SUPPORT doc/TODO \
doc/HOWTO/upload.configuration.HOWTO debian/wu-ftpd-faq.txt \
debian/wu-ftpd-faq.html debian/README.config
install -m 644 debian/*.8 $(tmp)/usr/share/man/man8/
cd $(tmp)/usr/share/man/man8 && ln -s addftpuser.8.gz rmftpuser.8.gz && \
ln -s xferstats.8.gz xferstats.wu-ftpd.8.gz
dh_installexamples `find doc/examples -type f` debian/*.es
dh_installchangelogs CHANGES
install -m 644 debian/logrotate $(tmp)/etc/logrotate.d/wu-ftpd
install -m 644 debian/binary.lintian-overrides $(tmp)/usr/share/lintian/overrides/wu-ftpd
dh_installdebconf
dh_installinit -r -u"defaults 50"
dh_installpam
dh_strip
dh_compress
if [ -f "$(tmp)/usr/share/doc/wu-ftpd/README.config.gz" ]; then \
ln -s /usr/share/doc/wu-ftpd/README.config.gz $(tmp)/etc/wu-ftpd/README.gz;\
else \
ln -s /usr/share/doc/wu-ftpd/README.config $(tmp)/etc/wu-ftpd/README;\
fi
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch binary-indep
.PHONY: build clean binary binary-arch binary-indep install checklocations
|