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 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
|
#! /usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
DEBUG_OPTS=
STRIP_OPTS=
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
STRIP_OPTS += dh_strip --dbg-package=clamav-dbg -p$@
else
DEBUG_OPTS += --enable-debug
endif
config.status: patch-stamp configure
dh_testdir
egrep '^#[[:alpha:]]' etc/clamd.conf | egrep -v 'Phishing(AlwaysBlockCloak|AlwaysBlockSSLMismatch|RestrictedScan|StrictURLCheck|ScanURLs)' | sed -e 's/^#//' | awk '{print $$1}' | while read opt; do \
if ! grep -q "$${opt}" debian/clamav-base.postinst.in ; then \
echo "Unhandled option(clamd.conf): $${opt}"; \
exit 1; \
fi;\
done;
egrep '^#[[:alpha:]]' etc/freshclam.conf | sed -e 's/^#//' | awk '{print $$1}' | while read opt; do \
if ! grep -q "$${opt}" debian/clamav-freshclam.postinst.in ; then \
echo "Unhandled option (freshclam.conf): $${opt}"; \
exit 1; \
fi;\
done;
# Add here commands to configure the package.
./configure --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --disable-clamav --with-dbdir=/var/lib/clamav/ --sysconfdir=/etc/clamav --with-sendmail=/usr/sbin/sendmail --enable-milter --disable-clamuko --with-tcpwrappers --with-gnu-ld --with-libcurl --with-dns --enable-dns-fix ${DEBUG_OPTS}
build: build-stamp
build-stamp: build-arch build-indep
touch build-stamp
build-indep: build-indep-stamp
build-indep-stamp:
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-base.config.in > debian/clamav-base.config
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-base.postinst.in > debian/clamav-base.postinst
touch build-indep-stamp
build-arch: build-arch-stamp
build-arch-stamp: config.status
dh_testdir
ifeq ($(PO2DEBCONF),yes)
po2debconf -e utf8 debian/clamav-base.templates.master > debian/clamav-base.templates
po2debconf -e utf8 debian/clamav-freshclam.templates.master > debian/clamav-freshclam.templates
endif
$(MAKE) CFLAGS="${CFLAGS}" pkgdatadir=/var/lib/clamav/ all
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-daemon.postinst.in > debian/clamav-daemon.postinst
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-freshclam.init.in > debian/clamav-freshclam.init
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-freshclam.config.in > debian/clamav-freshclam.config
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-freshclam.postinst.in > debian/clamav-freshclam.postinst
touch build-arch-stamp
patch: patch-stamp
patch-stamp:
dpatch apply-all -v
touch patch-stamp
unpatch:
dpatch deapply-all
rm -rf patch-stamp debian/patched
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
ifeq (Makefile,$(wildcard Makefile))
$(MAKE) distclean
endif
rm -f target.h config.log
rm -f build-arch-stamp build-indep-stamp install-indep-stamp install-arch-stamp build-stamp install-stamp
rm -f debian/clamav-base.config
rm -f debian/clamav-base.postinst
rm -f debian/clamav-daemon.postinst
rm -f debian/clamav-freshclam.init
rm -f debian/clamav-freshclam.config
rm -f debian/clamav-freshclam.postinst
dh_clean
install: install-indep install-arch
install-indep: install-indep-stamp
install-indep-stamp: build-indep-stamp
dh_testdir
dh_testroot
dh_clean -k -i -d
touch install-indep-stamp
clamav-base: install
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_installdocs -p$@
dh_install -X.svn -p$@
dh_installchangelogs -p$@ ChangeLog
cp debian/clamav-base.overrides debian/clamav-base/usr/share/lintian/overrides/clamav-base
dh_installdebconf -p$@
dh_installman -p$@
dh_installexamples -p$@
dh_compress -p$@ -Xexamples/
dh_md5sums -p$@
dh_installdeb -p$@
dh_gencontrol -p$@
dh_fixperms -p$@
dh_builddeb -p$@
clamav-docs: install-indep
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_installdocs -p$@
dh_install -X.svn -p$@
dh_installchangelogs -p$@ ChangeLog
dh_compress -p$@ -X.pdf -X.html -X.css -X.png -X.uu
rm -rf debian/clamav-docs/usr/share/doc/clamav-docs/html/.svn
dh_md5sums -p$@
dh_installdeb -p$@
dh_gencontrol -p$@
dh_fixperms -p$@
dh_builddeb -p$@
clamav-testfiles: install-indep
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_installdocs -p$@
dh_install -X.svn -p$@
dh_installchangelogs -p$@ ChangeLog
dh_compress -p$@
dh_md5sums -p$@
dh_installdeb -p$@
dh_gencontrol -p$@
dh_fixperms -p$@
dh_builddeb -p$@
install-arch: install-arch-stamp
install-arch-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k -a
# Add here commands to install the package into debian/clamav.
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/
touch install-arch-stamp
clamav-dbg:
dh_testdir
dh_testroot
dh_installdocs -p$@
dh_installchangelogs -p$@ ChangeLog
dh_compress -p$@
dh_shlibdeps -l debian/libclamav2/usr/lib -p$@
dh_installdeb -p$@
dh_gencontrol -p$@
dh_builddeb -p$@
clamav: install
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_installexamples -X.svn -p$@
dh_install -X.svn -p$@
dh_installman -p$@
dh_installchangelogs -p$@ ChangeLog
dh_installdocs -p$@
dh_link -p$@
${STRIP_OPTS}
dh_compress -p$@
cp debian/clamav.overrides debian/clamav/usr/share/lintian/overrides/clamav
dh_md5sums -p$@
dh_installdeb -p$@
dh_shlibdeps -l debian/libclamav2/usr/lib -p$@
dh_gencontrol -p$@
dh_fixperms -p$@
dh_builddeb -p$@
clamav-freshclam: install
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_installdocs -p$@
dh_installchangelogs -p$@ ChangeLog
dh_installexamples -p$@
dh_install -X.svn -p$@
cp debian/clamav-freshclam.overrides debian/clamav-freshclam/usr/share/lintian/overrides/clamav-freshclam
dh_installlogcheck -p$@
dh_installinit -p$@ --noscripts
dh_installman -p$@
dh_link -p$@
dh_installlogrotate -p$@
${STRIP_OPTS}
dh_compress -p$@ -Xexamples/
dh_installdebconf -p$@
dh_md5sums -p$@
dh_installdeb -p$@
dh_shlibdeps -l debian/libclamav2/usr/lib -p$@
dh_gencontrol -p$@
dh_fixperms -p$@ -Xclamav-freshclam-ifupdown
chmod +x debian/clamav-freshclam/etc/network/if-up.d/clamav-freshclam-ifupdown
chmod +x debian/clamav-freshclam/etc/network/if-down.d/clamav-freshclam-ifupdown
chmod +x debian/clamav-freshclam/etc/ppp/ip-up.d/clamav-freshclam-ifupdown
chmod +x debian/clamav-freshclam/etc/ppp/ip-down.d/clamav-freshclam-ifupdown
dh_builddeb -p$@
clamav-daemon: install
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_install -X.svn -p$@
cp debian/clamav-daemon.overrides debian/clamav-daemon/usr/share/lintian/overrides/clamav-daemon
dh_installlogcheck -p$@
dh_installinit -p$@
dh_installman -p$@
dh_installdocs -p$@
dh_installchangelogs -p$@ ChangeLog
dh_link -p$@
dh_installlogrotate -p$@
${STRIP_OPTS}
dh_compress -p$@
dh_md5sums -p$@
dh_installdeb -p$@
dh_shlibdeps -l debian/libclamav2/usr/lib -p$@
dh_gencontrol -p$@
dh_fixperms -p$@
dh_builddeb -p$@
clamav-milter: install
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_installdocs -p$@
dh_install -X.svn -p$@
cp debian/clamav-milter.overrides debian/clamav-milter/usr/share/lintian/overrides/clamav-milter
dh_installinit -p$@
dh_installman -p$@
dh_installdocs -p$@
dh_installchangelogs -p$@ ChangeLog
dh_installlogcheck -p$@
dh_link -p$@
${STRIP_OPTS}
dh_compress -p$@
dh_md5sums -p$@
dh_installdeb -p$@
dh_shlibdeps -l debian/libclamav2/usr/lib -p$@
dh_gencontrol -p$@
dh_fixperms -p$@
dh_builddeb -p$@
libclamav2: install
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_installdocs -p$@
dh_install -X.svn -p$@
dh_installchangelogs -p$@ ChangeLog
${STRIP_OPTS}
dh_compress -p$@
dh_makeshlibs -V -p$@
dh_md5sums -p$@
dh_installdeb -p$@
dh_shlibdeps -l debian/libclamav2/usr/lib -p$@
dh_gencontrol -p$@
dh_fixperms -p$@
dh_builddeb -p$@
libclamav-dev: install
dh_testdir
dh_testroot
dh_installdirs -p$@
dh_installman -p$@
dh_installdocs -p$@
dh_installchangelogs -p$@ ChangeLog
dh_install -X.svn -p$@
cp debian/libclamav-dev.overrides debian/libclamav-dev/usr/share/lintian/overrides/libclamav-dev
dh_link -p$@
${STRIP_OPTS}
dh_compress -p$@
dh_makeshlibs -V -p$@
dh_md5sums -p$@
dh_installdeb -p$@
dh_shlibdeps -l debian/tmp/usr/lib -p$@
dh_gencontrol -p$@
dh_fixperms -p$@
dh_builddeb -p$@
# Build architecture independant packages using the common target.
binary-indep: build install clamav-base clamav-testfiles clamav-docs
# Build architecture dependant packages using the common target.
binary-arch: build install libclamav2 clamav clamav-daemon clamav-freshclam clamav-milter libclamav-dev clamav-dbg
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|