FIXUP: WIP: verification_trailer
[wireshark-wip.git] / debian / rules
blob0c122feb17f93be4e8af4152da5a04fa29df7025
1 #!/usr/bin/make -f
2 # 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.
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 include /usr/share/dpatch/dpatch.make
10 DB2MAN=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
13 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16 PYTHON_VERSION=python2.4
18 CFLAGS=-g -O2
20 # Enable IEEE-conformant floating point math on alphas (not the default)
21 ifeq (alpha-linux,$(DEB_HOST_GNU_TYPE))
22 CFLAGS += -mieee
23 endif
25 CONFIGURE_FLAGS=--prefix=/usr --sysconfdir=/usr/share --datadir=/usr/share --libdir=/usr/lib/wireshark --disable-static --enable-warnings-as-errors=no --enable-setuid-install --with-plugins=/usr/lib/wireshark/plugins --with-lua=/usr/
27 configure: configure-stamp
28 configure-stamp: patch
29 dh_testdir
31 cp /usr/share/misc/config.guess /usr/share/misc/config.sub .
32 libtoolize --force --copy
33 -mkdir aclocal-missing
34 ./autogen.sh
35 CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_FLAGS)
37 touch configure-stamp
39 build: build-stamp
40 build-stamp: configure-stamp
41 $(MAKE)
42 convert image/wsicon32.png image/wsicon32.xpm
43 touch build-stamp
45 patch: patch-stamp
46 patch-stamp:
47 dpatch apply-all
50 clean: unpatch-stamp
51 dh_testdir
52 dh_testroot
53 rm -f build-stamp configure-stamp
55 [ ! -f Makefile ] || $(MAKE) distclean
56 rm -f rdps wireshark.1 tshark.1 wireshark-filter.4
57 rm -f conftest conftest.c
58 rm -f config.guess config.sub config.log
59 rm -f config.h.in config.h configure
61 dh_clean
63 unpatch: unpatch-stamp
64 unpatch-stamp:
65 dpatch deapply-all
66 rm -rf patch-stamp debian/patched
68 install: build
69 dh_testdir
70 dh_testroot
71 dh_clean -k
72 dh_installdirs
74 # Add here commands to install the files into debian/tmp
75 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
76 mkdir -p $(CURDIR)/debian/tmp/usr/share/applications/
77 cp debian/wireshark.desktop $(CURDIR)/debian/tmp/usr/share/applications/
78 cp tools/asn2deb tools/idl2deb tools/idl2wrs $(CURDIR)/debian/tmp/usr/bin/
79 #cp debian/wireshark-root.desktop $(CURDIR)/debian/tmp/usr/share/applications/
80 mkdir -p $(CURDIR)/debian/tmp/usr/share/pixmaps/
81 cp image/hi48-app-wireshark.png $(CURDIR)/debian/tmp/usr/share/pixmaps/
82 cp image/wsicon32.xpm $(CURDIR)/debian/tmp/usr/share/pixmaps/
83 mkdir -p $(CURDIR)/debian/tmp/etc/wireshark/
84 mv $(CURDIR)/debian/tmp/usr/share/wireshark/init.lua \
85 $(CURDIR)/debian/tmp/etc/wireshark/
86 ln -s /etc/wireshark/init.lua \
87 $(CURDIR)/debian/tmp/usr/share/wireshark/init.lua
88 mkdir -p $(CURDIR)/debian/tmp/usr/lib/$(PYTHON_VERSION)/site-packages/
89 cp $(CURDIR)/tools/wireshark_be.py $(CURDIR)/tools/wireshark_gen.py \
90 $(CURDIR)/debian/tmp/usr/lib/$(PYTHON_VERSION)/site-packages/
91 mkdir -p $(CURDIR)/debian/tmp/usr/include/wireshark/
92 for F in `cat debian/wireshark-dev.header-files`; do \
93 cp --parents $$F $(CURDIR)/debian/tmp/usr/include/wireshark; \
94 done
95 -rm -rf $(CURDIR)/debian/tmp/usr/man
96 mkdir -p $(CURDIR)/debian/tmp/usr/man
97 dh_installman
98 cp doc/asn2deb.1 doc/idl2deb.1 doc/idl2wrs.1 $(CURDIR)/debian/tmp/usr/man
100 dh_movefiles
101 dh_pysupport
102 dh_installdocs
103 dh_installmenu
104 dh_installchangelogs NEWS
106 # Build architecture-independent files here.
107 binary-indep: install
108 # We have nothing to do by default.
110 check: install
111 # check all necessary headers are included
112 gcc -c debian/headers-check.c `pkg-config --cflags glib-2.0` -Idebian/wireshark-dev/usr/include/ -Idebian/wireshark-dev/usr/include/wireshark/ -o /dev/null
114 # Build architecture-dependent files here.
115 binary-arch: install check
116 dh_strip
117 dh_compress
118 dh_fixperms -Xdumpcap
120 dh_installdeb
121 LD_LIBRARY_PATH=/usr/lib/wireshark/:/usr/lib/libfakeroot/ dh_shlibdeps
122 dh_gencontrol
123 dh_md5sums
124 dh_builddeb
126 source diff:
127 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
129 binary: binary-indep binary-arch
130 .PHONY: build clean install check binary-indep binary-arch binary