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
|
#!/usr/bin/make -f
# Derived from dh_make example.
export DH_VERBOSE=1
export DH_COMPAT=4
export DH_OPTIONS
version := $(shell cat VERSION)
tmp := $(CURDIR)/debian/tmp
CFLAGS := -g -Wall -D_REENTRANT -DSYSTEM_PCAP
ifneq "$(findstring noopt,$(DEB_BUILD_OPTIONS))" ""
CFLAGS += -O0
else
CFLAGS += -O2
endif
build: build-stamp
build-stamp: config.status
dh_testdir
$(MAKE)
touch $@
config.status: configure
CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
--mandir='$${prefix}/share/man' --enable-static --enable-debug \
--localstatedir='/var/lib/'
clean:
dh_testdir
dh_testroot
touch nasl.tmpl
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean build-stamp nasl/strutils.h
install: DH_OPTIONS=
install: build-stamp
dh_testdir
dh_testroot
dh_clean -k
$(MAKE) install DESTDIR=$(tmp)/
cd doc && $(MAKE) install DESTDIR=$(tmp)/
dh_install --sourcedir=debian/tmp
find debian/libnasl2/ -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty
binary-indep:
# Nothing.
binary-arch: DH_OPTIONS=-a
binary-arch: install
dh_testdir
dh_testroot
dh_installdocs
dh_installdirs -plibnasl-dev usr/share/doc/libnasl-dev
(cd debian/libnasl-dev/usr/share/doc/ ; \
rm -rf libnasl-dev; ln -s libnasl2 libnasl-dev ; )
-rm -rf debian/libnasl2/usr/share/doc/libnasl-dev
dh_installchangelogs
ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
dh_strip
endif
dh_compress
dh_fixperms
dh_makeshlibs -V "libnasl2 (>= $(version))"
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|