~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /usr/bin/make -f
2
 
# Sample debian/rules that uses debhelper.
3
 
# GNU copyright 1997 to 1999 by Joey Hess.
4
2
 
5
3
# Uncomment this to turn on verbose mode.
6
 
#export DH_VERBOSE=1
7
 
 
8
 
export AUTOMAKE = automake-1.11
9
 
export ACLOCAL = aclocal-1.11
10
 
 
11
 
# These are used for cross-compiling and for saving the configure script
12
 
# from having to guess our platform (since we know it already)
13
 
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14
 
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15
 
 
16
 
CFLAGS = `dpkg-buildflags --get CFLAGS`
17
 
CFLAGS += -Wall
18
 
CXXFLAGS = `dpkg-buildflags --get CXXFLAGS`
19
 
CXXFLAGS += -Wall
20
 
LDFLAGS = `dpkg-buildflags --get LDFLAGS`
21
 
CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
4
export DH_VERBOSE=1
 
5
 
 
6
# Use automake 1.11 due to bug in automake-1.14.
 
7
# see: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16375
 
8
# TODO: Remove this, when the bug is fixed.
 
9
export AUTOMAKE = automake
 
10
export ACLOCAL = aclocal
 
11
 
 
12
# This is needed to work around arch-specific quirks in the test suite.
 
13
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
14
 
 
15
# Get the hardening build flags and enable all compiler warnings:
 
16
CFLAGS   := $(shell dpkg-buildflags --get CFLAGS) -Wall
 
17
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall
 
18
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
 
19
LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS)
 
20
 
 
21
# Faketime on hurd currently (faketime 0.9.1-2) segfaults and newer versions FTBFS.
 
22
# Thus don't use it there.
 
23
# TODO: Use faketime on hurd again, once this is fixed.
 
24
ifneq (,$(findstring $(DEB_HOST_ARCH),hurd-i386))
 
25
  FT=
 
26
else
 
27
  # Get the date of the latest changelog entry.
 
28
  # This is used to make the build more binary reproducible.
 
29
  DAT  = $(shell dpkg-parsechangelog | grep Date: | sed s/Date:\ //)
 
30
  # Change the format to the only one that stops faketime from incresing the time.
 
31
  DATE = $(shell faketime "$(DAT)" date -u +"%Y-%m-%d %H:%M:%S")
 
32
  # NO_FAKE_STAT is necessary in order not to confuse make.
 
33
  FT=NO_FAKE_STAT="true" faketime -f -m "$(DATE)"
 
34
endif
 
35
 
 
36
# LLVM is only used on these archs, so no point in enabling it elsewhere
 
37
# To add new llvm/jit archs add it here and to the arch list for llvm-dev in
 
38
# debian/control.
 
39
ifeq (,$(filter $(DEB_HOST_ARCH), i386 amd64 powerpc kfreebsd-amd64 kfreebsd-i386))
 
40
  export enable_llvm=no
 
41
else
 
42
  # The llvm in squeeze (Debian 6) is older than the internal copy, so don't use it.
 
43
  ifeq ($(shell cut -c1 /etc/debian_version),6)
 
44
    SYSTEM_LLVM =
 
45
  else
 
46
    SYSTEM_LLVM = -with-system-llvm=/usr/bin/llvm-config
 
47
  endif
 
48
endif
 
49
 
 
50
# Set the configure options:
 
51
#       * add the build flags
 
52
#       * set various paths
 
53
#       * disable test for clamav user/group (--disable-clamav)
 
54
#       * disable building of the non-free libclamunrar (--disable-unrar)
 
55
#       * build clamav-milter (--enable-milter)
 
56
#       * enable workaround for broken DNS servers (--enable-dns-fix)
 
57
#       * assume the C compiler uses GNU ld (--with-gnu-ld)
 
58
#       * use system libraries instead of the embedded copies (--with-system-tommath, --without-included-ltdl, -with-system-llvm=/usr/bin/llvm-config)
 
59
CONFIG := CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
 
60
        --with-dbdir=/var/lib/clamav --sysconfdir=/etc/clamav \
 
61
        --disable-clamav --disable-unrar --enable-milter --enable-dns-fix \
 
62
        --with-gnu-ld --with-system-tommath --without-included-ltdl $(SYSTEM_LLVM)
22
63
 
23
64
DEBUG_OPTS=
24
 
STRIP_OPTS=
25
65
 
 
66
# Enable debug code, if nostrip was given.
26
67
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
27
68
        INSTALL_PROGRAM += -s
28
 
        STRIP_OPTS += dh_strip --dbg-package=clamav-dbg -p$@
29
69
else
30
70
        DEBUG_OPTS += --enable-debug
31
71
endif
32
 
ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
33
 
  with_check := disabled by DEB_BUILD_OPTIONS.
 
72
 
 
73
# The autotools in squeeze (Debian 6) are too old, so don't use autoreconf.
 
74
ifeq ($(shell cut -c1 /etc/debian_version),6)
 
75
  AUTORECONF =
34
76
else
35
 
  ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
36
 
    with_check := disabled because cross-compiling.
37
 
  else
38
 
    with_check := yes
39
 
  endif
40
 
endif
41
 
 
42
 
# LLVM doesn't work on these archs, so no point in breaking the build over it.
43
 
ifneq (,$(filter $(DEB_HOST_ARCH), hurd-i386 ppc64 powerpcspe ppc64el))
44
 
  export enable_llvm=no
45
 
endif
46
 
 
47
 
config.status: configure
48
 
        dh_testdir
 
77
  AUTORECONF = --with autoreconf
 
78
endif
 
79
 
 
80
# Use the default debhelper scripts, where possible.
 
81
# Enable parallel building and autoreconf.
 
82
%:
 
83
        dh $@ --parallel $(AUTORECONF)
 
84
 
 
85
override_dh_auto_configure:
 
86
        $(info DEB_BUILD_OPTIONS = $(DEB_BUILD_OPTIONS))
 
87
        $(info CFLAGS = $(CFLAGS))
 
88
        $(info CXXFLAGS = $(CXXFLAGS))
 
89
        $(info CPPFLAGS = $(CPPFLAGS))
 
90
        $(info LDFLAGS = $(LDFLAGS))
 
91
        # Check for unknown options in the configuration files.
49
92
        egrep '^#[[:alpha:]]' etc/clamd.conf.sample | sed -e 's/^#//' | awk '{print $$1}' | while read opt; do \
50
 
          if ! grep -q "$${opt}" debian/clamav-base.postinst.in ; then \
 
93
          if ! grep -q "$${opt}" debian/clamav-daemon.postinst.in ; then \
51
94
            echo "Unhandled option(clamd.conf): $${opt}"; \
52
95
            exit 1; \
53
96
          fi;\
64
107
            exit 1; \
65
108
          fi;\
66
109
        done;
67
 
        # Add here commands to configure the package.
68
 
        dh_autoreconf
69
 
        ./configure CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" --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 --enable-milter --disable-clamuko --with-gnu-ld --enable-dns-fix ${DEBUG_OPTS} --disable-unrar --libdir=\$${prefix}/lib --with-system-tommath  --without-included-ltdl
70
 
 
71
 
build: build-stamp
72
 
build-stamp: build-arch build-indep
73
 
        touch build-stamp
74
 
 
75
 
build-indep: build-indep-stamp
76
 
build-indep-stamp:
77
 
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-base.config.in > debian/clamav-base.config
 
110
        # Configure using the specified flags.
 
111
        $(FT) dh_auto_configure -- $(CONFIG) $(DEBUG_OPTS)
 
112
 
 
113
override_dh_auto_clean:
 
114
        # Update .po files for debconf.
 
115
        debconf-updatepo
 
116
        dh_auto_clean
 
117
 
 
118
clamav_build-indep:
 
119
        # Add common functions in config and postinst files.
78
120
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-base.postinst.in > debian/clamav-base.postinst
79
 
        touch build-indep-stamp
80
 
 
81
 
build-arch: build-arch-stamp
82
 
build-arch-stamp:  config.status
83
 
        dh_testdir
84
 
 
 
121
 
 
122
clamav_build-arch:
85
123
ifeq ($(PO2DEBCONF),yes)
86
 
        po2debconf -e utf8 debian/clamav-base.templates.master > debian/clamav-base.templates
 
124
        po2debconf -e utf8 debian/clamav-daemon.templates.master > debian/clamav-daemon.templates
87
125
        po2debconf -e utf8 debian/clamav-freshclam.templates.master > debian/clamav-freshclam.templates
88
126
        po2debconf -e utf8 debian/clamav-milter.templates.master > debian/clamav-milter.templates
 
127
        @echo debian/clamav-daemon.templates debian/clamav-freshclam.templates debian/clamav-milter.templates \
 
128
               >> debian/clean
89
129
endif
90
 
 
91
 
        $(MAKE) CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" pkgdatadir=/var/lib/clamav/ all
 
130
        # Add common functions in config and postinst files.
92
131
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-milter.init.in > debian/clamav-milter.init
93
132
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-milter.config.in > debian/clamav-milter.config
94
133
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-milter.postinst.in > debian/clamav-milter.postinst
 
134
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-daemon.config.in > debian/clamav-daemon.config
95
135
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-daemon.postinst.in > debian/clamav-daemon.postinst
96
136
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-daemon.init.in > debian/clamav-daemon.init
97
137
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-freshclam.init.in > debian/clamav-freshclam.init
98
138
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-freshclam.config.in > debian/clamav-freshclam.config
99
139
        perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-freshclam.postinst.in > debian/clamav-freshclam.postinst
100
 
        touch build-arch-stamp
101
 
ifeq ($(with_check),yes)
102
 
ifneq (,$(filter alpha, $(shell dpkg-architecture -qDEB_BUILD_ARCH)))
 
140
 
 
141
# override_dh_auto_build-{indep,arch} doesn't work in squeeze (Debian 6).
 
142
ifeq ($(shell cut -c1 /etc/debian_version),6)
 
143
override_dh_auto_build: clamav_build-indep clamav_build-arch
 
144
        # Build all files.
 
145
        $(FT) dh_auto_build -- V=1
 
146
else
 
147
override_dh_auto_build-indep: clamav_build-indep
 
148
        # Build architecture-independent files.
 
149
        $(FT) dh_auto_build -i -- V=1
 
150
 
 
151
override_dh_auto_build-arch: clamav_build-arch
 
152
        # Build architecture-dependent files.
 
153
        $(FT) dh_auto_build -a -- V=1
 
154
endif
 
155
 
 
156
override_dh_auto_test:
 
157
ifneq (,$(filter alpha, $DEB_HOST_ARCH))
103
158
        @echo "Ignoring errors because of #521737"
104
 
        -$(MAKE) check VERBOSE=1
105
 
else
106
 
ifneq (,$(filter ia64 sparc, $(shell dpkg-architecture -qDEB_BUILD_ARCH)))
107
 
        $(MAKE) check EF_ALIGNMENT=8 VERBOSE=1
108
 
else
109
 
        $(MAKE) check VERBOSE=1
110
 
endif
111
 
endif
112
 
else
113
 
        @echo "Testsuite not run: $(with_check)."
114
 
endif
115
 
 
116
 
clean:
117
 
        debconf-updatepo
118
 
        dh_testdir 
119
 
        dh_testroot 
120
 
 
121
 
ifeq (Makefile,$(wildcard Makefile))
122
 
        $(MAKE) distclean
123
 
endif
124
 
        rm -f target.h config.log
125
 
        rm -f build-arch-stamp build-indep-stamp install-indep-stamp install-arch-stamp build-stamp install-stamp
126
 
        rm -f debian/clamav-base.config
127
 
        rm -f debian/clamav-base.postinst
128
 
        rm -f debian/clamav-daemon.postinst
129
 
        rm -f debian/clamav-daemon.init
130
 
        rm -f debian/clamav-milter.init
131
 
        rm -f debian/clamav-milter.config
132
 
        rm -f debian/clamav-milter.postinst
133
 
        rm -f debian/clamav-freshclam.init
134
 
        rm -f debian/clamav-freshclam.config
135
 
        rm -f debian/clamav-freshclam.postinst
136
 
        rm -f libclamav/c++/llvm/utils/lit/lit/*.pyc
137
 
        dh_autoreconf_clean
138
 
        dh_clean
139
 
 
140
 
install: install-indep install-arch
141
 
install-indep: install-indep-stamp
142
 
install-indep-stamp: build-indep-stamp
143
 
        dh_testdir
144
 
        dh_testroot
145
 
        dh_clean -k -i -d
146
 
        
147
 
        touch install-indep-stamp
148
 
 
149
 
clamav-base: install
150
 
        dh_testdir
151
 
        dh_testroot
152
 
        dh_installdirs -p$@
153
 
        dh_installdocs -p$@
154
 
        dh_install -X.svn -p$@
155
 
        chmod +x debian/$@/usr/share/bug/$@/script
156
 
        dh_installchangelogs -p$@ ChangeLog 
157
 
        dh_installdebconf -p$@
158
 
        dh_installman -p$@
159
 
        dh_installexamples -p$@
160
 
        dh_compress -p$@ -Xexamples/
161
 
        dh_md5sums -p$@
162
 
        dh_installdeb -p$@
163
 
        dh_gencontrol -p$@
164
 
        dh_fixperms -p$@
165
 
        dh_builddeb -p$@
166
 
 
167
 
clamav-docs: install-indep
168
 
        dh_testdir
169
 
        dh_testroot
170
 
        dh_installdirs -p$@
171
 
        dh_installdocs -p$@
172
 
        dh_install -X.svn -p$@
173
 
        dh_installchangelogs -p$@ ChangeLog 
174
 
        dh_compress -p$@ -X.pdf -X.html -X.css -X.png -X.uu
175
 
        rm -rf debian/clamav-docs/usr/share/doc/clamav-docs/html/.svn
176
 
        dh_md5sums -p$@
177
 
        dh_installdeb -p$@
178
 
        dh_gencontrol -p$@
179
 
        dh_fixperms -p$@
180
 
        dh_builddeb -p$@
181
 
 
182
 
clamav-testfiles: install-indep
183
 
        dh_testdir
184
 
        dh_testroot
185
 
        dh_installdirs -p$@
186
 
        dh_installdocs -p$@
187
 
        dh_install -X.svn -p$@
188
 
        dh_installchangelogs -p$@ ChangeLog 
189
 
        dh_compress -p$@
190
 
        dh_md5sums -p$@
191
 
        dh_installdeb -p$@
192
 
        dh_gencontrol -p$@
193
 
        dh_fixperms -p$@
194
 
        dh_builddeb -p$@
195
 
 
196
 
install-arch: install-arch-stamp
197
 
install-arch-stamp: build-stamp
198
 
        dh_testdir
199
 
        dh_testroot
200
 
        dh_clean -k -a
201
 
        # Add here commands to install the package into debian/clamav.
202
 
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/
203
 
        sed -i "/dependency_libs/ s/'.*'/''/" `find $(CURDIR)/debian/tmp/ -name '*.la'`
204
 
        
205
 
        touch install-arch-stamp
206
 
 
207
 
clamav-dbg: libclamav6
208
 
        dh_testdir
209
 
        dh_testroot
210
 
        dh_installdocs -p$@
211
 
        dh_installchangelogs -p$@ ChangeLog
212
 
        dh_compress -p$@
213
 
        dh_md5sums -p$@
214
 
        dh_shlibdeps -l debian/libclamav6/usr/lib -p$@
215
 
        dh_installdeb -p$@
216
 
        dh_gencontrol -p$@
217
 
        dh_builddeb -p$@
218
 
 
219
 
clamav: install
220
 
        dh_testdir
221
 
        dh_testroot
222
 
        dh_installdirs -p$@
223
 
        dh_installexamples -X.svn -p$@
224
 
        dh_install -X.svn -p$@
225
 
        chmod +x debian/$@/usr/share/bug/$@/script
226
 
        dh_installman -p$@
227
 
        dh_installchangelogs -p$@ ChangeLog 
228
 
        dh_installdocs -p$@ 
229
 
        dh_link -p$@
230
 
        ${STRIP_OPTS}
231
 
        dh_compress -p$@
232
 
        dh_md5sums -p$@
233
 
        dh_installdeb -p$@
234
 
        dh_shlibdeps -l debian/libclamav6/usr/lib -p$@
235
 
        dh_gencontrol -p$@
236
 
        dh_fixperms -p$@
237
 
        dh_builddeb -p$@
238
 
 
239
 
clamav-freshclam: install
240
 
        dh_testdir
241
 
        dh_testroot
242
 
        dh_installdirs -p$@
243
 
        dh_installdocs -p$@ 
244
 
        dh_installchangelogs -p$@ ChangeLog 
245
 
        dh_installexamples -p$@
246
 
        dh_install -X.svn -p$@
247
 
        chmod +x debian/$@/usr/share/bug/$@/script
248
 
        dh_installlogcheck -p$@
249
 
        dh_installinit -p$@ --noscripts
250
 
        dh_installman -p$@
251
 
        dh_link -p$@
252
 
        ${STRIP_OPTS}
253
 
        dh_compress -p$@ -Xexamples/
254
 
        dh_installdebconf -p$@
255
 
        dh_md5sums -p$@
256
 
        dh_installdeb -p$@
257
 
        dh_shlibdeps -l debian/libclamav6/usr/lib -p$@
258
 
        dh_gencontrol -p$@
259
 
        dh_fixperms -p$@ -Xclamav-freshclam-ifupdown
260
 
        chmod +x debian/clamav-freshclam/etc/network/if-up.d/clamav-freshclam-ifupdown
261
 
        chmod +x debian/clamav-freshclam/etc/network/if-down.d/clamav-freshclam-ifupdown
262
 
        chmod +x debian/clamav-freshclam/etc/ppp/ip-up.d/clamav-freshclam-ifupdown
263
 
        chmod +x debian/clamav-freshclam/etc/ppp/ip-down.d/clamav-freshclam-ifupdown
264
 
        dh_builddeb -p$@
265
 
 
266
 
clamav-daemon: install
267
 
        dh_testdir
268
 
        dh_testroot
269
 
        dh_installdirs -p$@
270
 
        dh_install -X.svn -p$@
271
 
        chmod +x debian/$@/usr/share/bug/$@/script
272
 
        dh_installlogcheck -p$@
273
 
        dh_installinit -p$@
274
 
        dh_installman -p$@
275
 
        dh_installdocs -p$@ 
276
 
        dh_installchangelogs -p$@ ChangeLog 
277
 
        dh_link -p$@
278
 
        ${STRIP_OPTS}
279
 
        dh_compress -p$@
280
 
        dh_md5sums -p$@
281
 
        dh_installdeb -p$@
282
 
        dh_shlibdeps -l debian/libclamav6/usr/lib -p$@
283
 
        dh_gencontrol -p$@
284
 
        dh_fixperms -p$@
285
 
        dh_builddeb -p$@
286
 
 
287
 
clamav-milter: install
288
 
        dh_testdir
289
 
        dh_testroot
290
 
        dh_installdirs -p$@
291
 
        dh_installdocs -p$@
292
 
        dh_install -X.svn -p$@
293
 
        chmod +x debian/$@/usr/share/bug/$@/script
294
 
        dh_installinit -p$@
295
 
        dh_installman -p$@
296
 
        dh_installdocs -p$@ 
297
 
        dh_installchangelogs -p$@ ChangeLog 
298
 
        dh_installdebconf -p$@
299
 
        dh_installlogcheck -p$@
300
 
        dh_link -p$@
301
 
        dh_installexamples -p$@
302
 
        dh_compress -p$@ -Xexamples/
303
 
        ${STRIP_OPTS}
304
 
        dh_md5sums -p$@
305
 
        dh_installdeb -p$@
306
 
        dh_shlibdeps -l debian/libclamav6/usr/lib -p$@
307
 
        dh_gencontrol -p$@
308
 
        dh_fixperms -p$@
309
 
        dh_builddeb -p$@
310
 
 
311
 
libclamav6: install
312
 
        dh_testdir
313
 
        dh_testroot
314
 
        dh_installdirs -p$@
315
 
        dh_installdocs -p$@
316
 
        dh_install -X.svn -p$@
317
 
        dh_installchangelogs -p$@ ChangeLog 
318
 
        dh_lintian -p$@
319
 
        ${STRIP_OPTS}
320
 
        dh_compress -p$@
321
 
        dh_makeshlibs -V -p$@
322
 
        dh_md5sums -p$@
323
 
        dh_installdeb -p$@
324
 
        dh_shlibdeps -l debian/libclamav6/usr/lib -p$@
325
 
        dh_gencontrol -p$@
326
 
        dh_fixperms -p$@
327
 
        dh_builddeb -p$@
328
 
 
329
 
libclamav-dev: install
330
 
        dh_testdir
331
 
        dh_testroot
332
 
        dh_installdirs -p$@
333
 
        dh_installman -p$@
334
 
        dh_installdocs -p$@ 
335
 
        dh_installchangelogs -p$@ ChangeLog 
336
 
        dh_install -X.svn -p$@
337
 
        dh_link -p$@
338
 
        ${STRIP_OPTS}
339
 
        dh_compress -p$@
340
 
        dh_makeshlibs -V -p$@
341
 
        dh_md5sums -p$@
342
 
        dh_installdeb -p$@
343
 
        dh_shlibdeps -l debian/tmp/usr/lib -p$@
344
 
        dh_gencontrol -p$@
345
 
        dh_fixperms -p$@
346
 
        dh_builddeb -p$@
347
 
 
348
 
# Build architecture independant packages using the common target.
349
 
binary-indep: build install clamav-base clamav-testfiles clamav-docs
350
 
 
351
 
# Build architecture dependant packages using the common target.
352
 
binary-arch: build install libclamav6 clamav clamav-daemon clamav-freshclam clamav-milter libclamav-dev clamav-dbg
353
 
 
354
 
binary: binary-indep binary-arch
355
 
.PHONY: build clean binary-indep binary-arch binary install
 
159
        -dh_auto_test -- V=1
 
160
else
 
161
ifneq (,$(filter ia64 sparc, $DEB_HOST_ARCH))
 
162
        dh_auto_test -- EF_ALIGNMENT=8 V=1
 
163
else
 
164
        dh_auto_test -- V=1 VERBOSE=1
 
165
endif
 
166
endif
 
167
 
 
168
override_dh_strip:
 
169
        # Move the debug symbols to the debug package:
 
170
        dh_strip --dbg-package=clamav-dbg
 
171
 
 
172
override_dh_installinit:
 
173
        dh_installinit -pclamav-daemon
 
174
        # Don't change the postinst/postrm scripts for clamav-freshclam, as they need non-standard code.
 
175
        dh_installinit -pclamav-freshclam --noscripts
 
176
        dh_installinit -pclamav-milter
 
177
 
 
178
override_dh_installdocs-indep:
 
179
        dh_installdocs
 
180
        # Make the .rar test files which are no longer created
 
181
        cat test/.split/split.clam-v2.raraa test/.split/split.clam-v2.rarab >debian/clamav-testfiles/usr/share/clamav-testfiles/clam-v2.rar
 
182
        cat test/.split/split.clam-v3.raraa test/.split/split.clam-v3.rarab >debian/clamav-testfiles/usr/share/clamav-testfiles/clam-v3.rar
 
183
 
 
184
# Install the upstream ChangeLog.
 
185
override_dh_installchangelogs:
 
186
        dh_installchangelogs -pclamav-base ChangeLog
 
187
        dh_installchangelogs -pclamav-daemon ChangeLog
 
188
        dh_installchangelogs -pclamav-dbg ChangeLog
 
189
        dh_installchangelogs -pclamav-docs ChangeLog
 
190
        dh_installchangelogs -pclamav-freshclam ChangeLog
 
191
        dh_installchangelogs -pclamav-milter ChangeLog
 
192
        dh_installchangelogs -pclamav-testfiles ChangeLog
 
193
        dh_installchangelogs -pclamav ChangeLog
 
194
        dh_installchangelogs -plibclamav-dev ChangeLog
 
195
        dh_installchangelogs -plibclamav6 ChangeLog
 
196
 
 
197
# Don't compress the example configuration files and the documentation PDFs.
 
198
override_dh_compress:
 
199
        dh_compress -Xexamples -X.pdf