2 # Originally made with the aid of dh_make, by Craig Small
3 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4 # Some lines taken from debmake, by Cristoph Lameter.
5 # Rewritten to use dh, by Balint Reczey
7 # Uncomment this to turn on verbose mode.
10 distrelease := $(shell lsb_release -cs)
11 ifeq ($(distrelease),n/a)
15 # This has to be exported to make some magic below work.
18 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
19 ifneq (,$(filter $(distrelease),wheezy))
20 export DEB_LDFLAGS_MAINT_APPEND = -Wl,-Bsymbolic
23 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
24 VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-.*/\1/p')
25 export docdir = /usr/share/doc/wireshark-doc
27 dh $@ --with python2 --buildsystem cmake --with quilt --parallel
29 override_dh_auto_configure:
30 dh_auto_configure -- -DBUILD_xxx2deb=ON -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
32 override_dh_auto_build:
33 $(MAKE) -C $(CURDIR)/obj-* asn1
35 $(MAKE) -C $(CURDIR)/obj-* user_guide_html developer_guide_html
36 # fix links in documentation
37 sed -i "s|$(CURDIR)/docbook|..|" obj-*/docbook/ws*g_html_chunked/*.html
40 dh_strip --dbg-package=wireshark-dbg
42 override_dh_auto_install:
45 rm -rf $(CURDIR)/debian/tmp/usr/share/wireshark/COPYING
46 cp debian/license-text-about-dialog $(CURDIR)/debian/tmp/usr/share/wireshark/ABOUT.GPL
47 mkdir -p $(CURDIR)/debian/tmp/etc/wireshark/
48 mv $(CURDIR)/debian/tmp/usr/share/wireshark/init.lua \
49 $(CURDIR)/debian/tmp/etc/wireshark/
50 ln -s /etc/wireshark/init.lua \
51 $(CURDIR)/debian/tmp/usr/share/wireshark/init.lua
55 # check all necessary headers are included
56 $(CC) -c debian/headers-check.c `pkg-config --cflags glib-2.0` -Idebian/libwireshark-dev/usr/include -Idebian/libwireshark-dev/usr/include/wireshark -Idebian/libwiretap-dev/usr/include/wireshark -Idebian/libwsutil-dev/usr/include/wireshark -o /dev/null
60 chmod 644 debian/wireshark-dev/usr/share/pyshared/make-plugin-reg.py \
61 debian/wireshark-dev/usr/share/pyshared/wireshark_be.py \
62 debian/wireshark-dev/usr/share/pyshared/wireshark_gen.py