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.
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.3
18 # Enable IEEE-conformant floating point math on alphas (not the default)
19 ifeq (alpha-linux,$(DEB_HOST_GNU_TYPE))
23 idl2deb.1: idl2deb.dbk
24 xsltproc --nonet --novalid $(DB2MAN) $<
26 asn2deb.1: asn2deb.dbk
27 xsltproc --nonet --novalid $(DB2MAN) $<
30 CONFIGURE_FLAGS=--prefix=/usr --sysconfdir=/usr/share/wireshark --datadir=/usr/share/wireshark --disable-static --disable-ssl --without-ucdsnmp --enable-gtk2 --libdir=/usr/lib/wireshark CFLAGS="$(CFLAGS)";
32 configure: configure-stamp
33 configure-stamp: patch
36 cp /usr/share/misc/config.guess /usr/share/misc/config.sub .
37 libtoolize --force --copy
40 -mkdir aclocal-missing
41 (if [ ! -x ./configure ]; then \
42 ./autogen.sh $(CONFIGURE_FLAGS) CFLAGS="$(CFLAGS)"; \
45 ./configure $(CONFIGURE_FLAGS) CFLAGS="$(CFLAGS)"
49 build: build-stamp idl2deb.1 asn2deb.1
50 build-stamp: configure-stamp
63 rm -f build-stamp configure-stamp
66 rm -f rdps wireshark.1 tshark.1 idl2deb.1 wireshark-filter.4 asn2deb.1
67 rm -f conftest conftest.c
68 rm -f config.guess config.sub config.log
69 rm -f config.h.in config.h configure
73 unpatch: unpatch-stamp
76 rm -rf patch-stamp debian/patched
78 # Build architecture-independent files here.
80 # We have nothing to do by default.
82 # Build architecture-dependent files here.
89 # Add here commands to install the files into debian/tmp
90 $(MAKE) install DESTDIR=`pwd`/debian/tmp
91 mkdir -p `pwd`/debian/tmp/usr/share/applications/
92 cp wireshark.desktop `pwd`/debian/tmp/usr/share/applications/
93 cp tools/idl2wrs.sh `pwd`/debian/tmp/usr/bin/
94 cp debian/wireshark-root.desktop `pwd`/debian/tmp/usr/share/applications/
95 mkdir -p `pwd`/debian/tmp/usr/share/pixmaps/
96 cp image/hi48-app-wireshark.png `pwd`/debian/tmp/usr/share/pixmaps/
97 cp image/wsicon32.xpm `pwd`/debian/tmp/usr/share/pixmaps/
98 mkdir -p `pwd`/debian/tmp/usr/lib/$(PYTHON_VERSION)/site-packages/
99 install -m 755 `pwd`/idl2deb `pwd`/debian/tmp/usr/bin/
100 install -m 755 `pwd`/asn2deb `pwd`/debian/tmp/usr/bin/
101 cp `pwd`/tools/wireshark_be.py `pwd`/tools/wireshark_gen.py \
102 `pwd`/debian/tmp/usr/lib/$(PYTHON_VERSION)/site-packages/
103 mkdir -p `pwd`/debian/tmp/usr/include/wireshark/
104 for F in `cat debian/wireshark-dev.header-files`; do \
105 cp --parents $$F `pwd`/debian/tmp/usr/include/wireshark; \
107 # .a is no longer built; why was is used ?
108 #cp `pwd`/wiretap/libwiretap.a `pwd`/debian/tmp/usr/lib/
109 -rm -rf `pwd`/debian/tmp/usr/man
114 -rm debian/menu # from upstream debian/ package
116 dh_installchangelogs NEWS
128 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
130 binary: binary-indep binary-arch
131 .PHONY: build clean binary-indep binary-arch binary