Gtk: Remove source code
[metze/wireshark/wip.git] / debian / rules
1 #!/usr/bin/make -f
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
6
7 # Uncomment this to turn on verbose mode.
8 #export DH_VERBOSE=1
9
10 distrelease  := $(shell lsb_release -cs)
11 ifeq ($(distrelease),n/a)
12   distrelease     := sid
13 endif
14
15 # This has to be exported to make some magic below work.
16 export DH_OPTIONS
17
18 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
19 ifneq (,$(filter $(distrelease),wheezy))
20 export DEB_LDFLAGS_MAINT_APPEND = -Wl,-Bsymbolic
21 endif
22
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
26 %:
27         dh $@ --with python2 --buildsystem cmake --with quilt --parallel
28
29 override_dh_auto_configure:
30         dh_auto_configure -- -DBUILD_xxx2deb=ON -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
31
32 override_dh_auto_build:
33         $(MAKE) -C $(CURDIR)/obj-* asn1
34         dh_auto_build
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
38
39 override_dh_strip:
40         dh_strip --dbg-package=wireshark-dbg
41
42 override_dh_auto_install:
43         dh_auto_install
44         rm -f debian/*.shlibs
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
52
53 override_dh_install:
54         dh_install
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
57
58 override_dh_fixperms:
59         dh_fixperms
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
63