| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# Uncomment this to turn on verbose mode. |
| 4 |
#export DH_VERBOSE=1 |
| 5 |
|
| 6 |
# More hardening |
| 7 |
export DEB_BUILD_MAINT_OPTIONS := hardening=+all |
| 8 |
|
| 9 |
%: |
| 10 |
dh $@ |
| 11 |
|
| 12 |
override_dh_auto_configure: |
| 13 |
dh_auto_configure -- \ |
| 14 |
--prefix=/usr \ |
| 15 |
--includedir=/usr/include/c_icap \ |
| 16 |
--sysconfdir=/etc/c-icap \ |
| 17 |
--localstatedir=/var \ |
| 18 |
--libexecdir=/usr/lib/c_icap \ |
| 19 |
--with-zlib=yes \ |
| 20 |
--with-bzlib=yes \ |
| 21 |
--with-clamav=yes |
| 22 |
|
| 23 |
override_dh_auto_install: |
| 24 |
mkdir -p debian/tmp/etc/c-icap |
| 25 |
dh_auto_install |
| 26 |
# install clamav pattern update script |
| 27 |
mkdir -p debian/libc-icap-mod-virus-scan/etc/clamav/onupdateexecute.d/ |
| 28 |
cp debian/libc-icap-mod-virus-scan.pattern-update \ |
| 29 |
debian/libc-icap-mod-virus-scan/etc/clamav/onupdateexecute.d/libc-icap-mod-virus-scan |
| 30 |
chmod 0755 debian/libc-icap-mod-virus-scan/etc/clamav/onupdateexecute.d/libc-icap-mod-virus-scan |
| 31 |
|
| 32 |
execute_before_dh_install: |
| 33 |
mv debian/tmp/etc/c-icap/srv_content_filtering.conf.default \ |
| 34 |
debian/tmp/etc/c-icap/srv_content_filtering.conf |
| 35 |
rm debian/tmp/etc/c-icap/*.default |
| 36 |
rm debian/tmp/usr/lib/*/c_icap/*.la |
| 37 |
|
| 38 |
override_dh_fixperms-arch: |
| 39 |
dh_fixperms |
| 40 |
# config permissions |
| 41 |
chmod 0644 debian/libc-icap-mod-virus-scan/etc/c-icap/* |
| 42 |
chmod 0644 debian/libc-icap-mod-urlcheck/etc/c-icap/* |
| 43 |
# template permissions |
| 44 |
chmod 0644 debian/libc-icap-mod-urlcheck/usr/share/c_icap/templates/srv_url_check/*/* |
| 45 |
chmod 0644 debian/libc-icap-mod-virus-scan/usr/share/c_icap/templates/virus_scan/*/* |