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
|
#!/usr/bin/make -f
SHELL+= -e
#export DH_VERBOSE=1
include debian/scripts/vars
BUILD_DIR := $(SOURCE_DIR)/$(TAR_DIR)
B := $(BUILD_DIR)
D := $(CURDIR)/debian/inn2
clean:
$(MAKE) -f debian/sys-build.mk source.clean
dh_clean
# target used by the maintainer
unpack.nopatch:
$(MAKE) -f debian/sys-build.mk source.build
diff:
$(MAKE) -f debian/sys-build.mk make-diff
debian/po/templates.pot: debian/inn2.templates
debconf-updatepo
unpack: $(STAMP_DIR)/source.make
$(STAMP_DIR)/source.make:
$(MAKE) -f debian/sys-build.mk source.make
touch $@
configure: $(STAMP_DIR)/configure
$(STAMP_DIR)/configure: $(STAMP_DIR)/source.make
dh_testdir
NOISY=1 \
_PATH_PERL=/usr/bin/perl \
ac_cv_path__PATH_AWK=awk \
ac_cv_path__PATH_EGREP=egrep \
ac_cv_path__PATH_SED=sed \
ac_cv_path__PATH_SORT=sort \
ac_cv_path_PATH_GPGV=/usr/bin/gpgv \
ac_cv_path_GETFTP=wget \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
./configure \
--with-perl \
--enable-ipv6 \
--prefix=/usr/lib/news \
--mandir=/usr/share/man \
--includedir=/usr/include/inn \
--with-db-dir=/var/lib/news \
--with-etc-dir=/etc/news \
--with-filter-dir=/etc/news/filter \
--with-lib-dir=/usr/lib/news \
--with-log-dir=/var/log/news \
--with-run-dir=/var/run/news \
--with-spool-dir=/var/spool/news \
--with-tmp-dir=/var/spool/news/incoming/tmp \
--with-berkeleydb=/usr \
--with-sendmail=/usr/sbin/sendmail \
"
touch $@
build: $(STAMP_DIR)/build #debian/po/templates.pot
$(STAMP_DIR)/build: $(STAMP_DIR)/configure $(STAMP_DIR)/source.make
dh_testdir
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
$(MAKE) \
"
touch $@
configure-ssl: $(STAMP_DIR)/configure-ssl
$(STAMP_DIR)/configure-ssl: $(STAMP_DIR)/configure
dh_testdir
cd $B && if [ ! -d ssl/ ]; then \
mkdir ssl/ ssl/nnrpd/ && \
cd ssl/ && \
ln -s ../Makefile.global ../include ../storage ../history . &&\
cd nnrpd/ && ln -s ../../nnrpd/* . && \
$(MAKE) clean ; \
fi
touch $@
build-ssl: $(STAMP_DIR)/build-ssl
$(STAMP_DIR)/build-ssl: $(STAMP_DIR)/configure-ssl
dh_testdir
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
cd ssl/nnrpd/ && \
$(MAKE) SSLLIB='-L/usr/lib -lssl -lcrypto -ldl' \
SSLINC='-DHAVE_SSL=1' \
"
touch $@
install: $(STAMP_DIR)/install
$(STAMP_DIR)/install: $(STAMP_DIR)/build $(STAMP_DIR)/build-ssl
dh_testdir
dh_testroot
dh_clean -k
NOISY=1 \
$(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
$(MAKE) install DESTDIR=$D \
"
dh_movefiles --sourcedir=debian/inn2/
dh_link -a
# move back this one
mv $D-dev/usr/share/man/man3/uwildmat.3 $D/usr/share/man/man3/
# remove assorted crap and
# make sure we don't ship active, active.times, newsgroups in place!
cd $D/etc/news/filter && rm -f *.py *.tcl
rm -rf $D/usr/lib/news/bin/simpleftp $D/usr/share/man/man1/simpleftp.1\
$D/etc/news/sasl.conf $D/usr/lib/news/doc/ $D/var/lib/news/* \
$D/usr/include/
mv $D/usr/share/man/man1/startinnfeed.1 \
$D/usr/share/man/man8/startinnfeed.8
# create inn2-ssl
dh_installdirs -pinn2-ssl \
etc/news/ usr/lib/news/bin/ usr/share/man/man5/
cp $B/ssl/nnrpd/nnrpd $D-ssl/usr/lib/news/bin/nnrpd-ssl
install -m 644 extra/sasl.conf $D-ssl/etc/news/
mv $D/usr/share/man/man5/sasl.conf.5 $D-ssl/usr/share/man/man5/
install -m 755 extra/buildinnkeyring extra/ginpaths2 \
$D/usr/lib/news/bin/
install -m 755 $B/contrib/showtoken.in $D/usr/lib/news/bin/showtoken
install -m 755 extra/bunbatch $D-inews/usr/lib/news/bin/rnews.libexec/
install -m 644 extra/send-uucp.cf $D/etc/news/
mkdir $D/var/log/news/path
# Build architecture-dependent files here.
binary-arch:
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installchangelogs -a $B/NEWS
dh_installdocs $(addprefix $B/,CONTRIBUTORS INSTALL NEWS README \
doc/checklist doc/external-auth doc/history doc/hook-perl \
doc/IPv6-info doc/compliance-nntp)
dh_installexamples extra/active extra/newsgroups
dh_installinit --noscripts -a
dh_installcron -a
dh_installdebconf
dh_compress -a
dh_fixperms -a \
-Xusr/lib/news/bin/inndstart -Xusr/lib/news/bin/startinnfeed
# some files are not writeable when installed by make install
dh_strip -a
chown root:news $D-inews/etc/news/passwd.nntp
chmod 640 $D-inews/etc/news/passwd.nntp
chmod -x $D/usr/lib/news/bin/control/*.pl
chmod +rw \
$D/usr/lib/news/bin/inndstart \
$D/usr/lib/news/bin/startinnfeed
chown news:uucp $D-inews/usr/lib/news/bin/rnews
chmod 4755 $D-inews/usr/lib/news/bin/rnews
chown -R news:news $D/var/spool/news/ $D/var/lib/news/ \
$D/var/run/news/ $D/var/log/news/
chmod -R g+w $D/var/spool/news/ $D/var/lib/news/ \
$D/var/run/news/ $D/var/log/news/
dh_installdeb -a
dh_shlibdeps -a --exclude=ckpasswd
dh_gencontrol -a
dh_gencontrol -a -- \
-VPERLAPI=$$(perl -MConfig -e 'print "perlapi-$$Config{version}"')
dh_md5sums -a
dh_builddeb -a
binary: binary-arch
.PHONY: unpack diff clean configure build install binary-arch binary
|