More warining fixes: char -> const char
[obnox/wireshark/wip.git] / debian / rules
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.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9 export DH_COMPAT=3
10
11 DB2MAN=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
12
13
14 DEB_HOST_GNU_TYPE       ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
15 DEB_BUILD_GNU_TYPE      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
17 # Enable IEEE-conformant floating point math on alphas (not the default)
18 ifeq (alpha-linux,$(DEB_HOST_GNU_TYPE))
19   CFLAGS += -mieee
20 endif
21
22 idl2deb.1: idl2deb.dbk
23         xsltproc --nonet --novalid $(DB2MAN) $<
24
25 asn2deb.1: asn2deb.dbk
26         xsltproc --nonet --novalid $(DB2MAN) $<
27
28 configure: configure-stamp
29 configure-stamp:
30         dh_testdir
31
32         cp /usr/share/misc/config.guess /usr/share/misc/config.sub .
33         libtoolize --force --copy
34         -mkdir aclocal-missing
35         (if [ ! -x ./configure ]; then \
36            ./autogen.sh --prefix=/usr --sysconfdir=/usr/share/ethereal --disable-static --disable-ssl --without-ucdsnmp --enable-gtk2 --libdir=/usr/lib/ethereal --CFLAGS="$(CFLAGS)"; \
37         fi)
38
39         ./configure --prefix=/usr --sysconfdir=/usr/share/ethereal --disable-static --disable-ssl --without-ucdsnmp --enable-gtk2 --libdir=/usr/lib/ethereal CFLAGS="$(CFLAGS)"
40
41         touch configure-stamp
42
43 build: build-stamp idl2deb.1 asn2deb.1
44 build-stamp: configure-stamp
45         $(MAKE)
46
47         touch build-stamp
48
49 clean:
50         dh_testdir
51         dh_testroot
52         rm -f build-stamp configure-stamp
53
54         cp /usr/share/misc/config.guess /usr/share/misc/config.sub .
55         -$(MAKE) distclean
56         rm -f rdps ethereal.1 tethereal.1 idl2deb.1 ethereal-filter.4 asn2deb.1
57         rm -f conftest conftest.c
58         rm -f config.guess config.sub config.log
59
60         dh_clean
61
62 # Build architecture-independent files here.
63 binary-indep: build
64 # We have nothing to do by default.
65
66 # Build architecture-dependent files here.
67 binary-arch: build
68         dh_testdir
69         dh_testroot
70         dh_clean -k
71         dh_installdirs
72
73         # Add here commands to install the files into debian/tmp
74         $(MAKE) install DESTDIR=`pwd`/debian/tmp
75         mkdir -p `pwd`/debian/tmp/usr/share/applications/
76         cp ethereal.desktop `pwd`/debian/tmp/usr/share/applications/
77         cp debian/ethereal-root.desktop `pwd`/debian/tmp/usr/share/applications/
78         mkdir -p `pwd`/debian/tmp/usr/share/pixmaps/
79         cp image/hi48-app-ethereal.png `pwd`/debian/tmp/usr/share/pixmaps/
80         cp image/eicon3d32.xpm `pwd`/debian/tmp/usr/share/pixmaps/
81         mkdir -p `pwd`/debian/tmp/usr/lib/python2.3/site-packages/
82         install -m 755 `pwd`/idl2deb `pwd`/debian/tmp/usr/bin/
83         install -m 755 `pwd`/asn2deb `pwd`/debian/tmp/usr/bin/
84         cp `pwd`/ethereal_be.py `pwd`/ethereal_gen.py \
85                         `pwd`/debian/tmp/usr/lib/python2.3/site-packages/
86         mkdir -p `pwd`/debian/tmp/usr/include/ethereal/
87         for F in `cat debian/ethereal-dev.header-files`; do \
88                 cp --parents $$F `pwd`/debian/tmp/usr/include/ethereal; \
89         done
90         # .a is no longer built; why was is used ?
91         #cp `pwd`/wiretap/libwiretap.a `pwd`/debian/tmp/usr/lib/
92         -rm -rf `pwd`/debian/tmp/usr/man
93         dh_installman
94
95         dh_movefiles
96         dh_installdocs
97         -rm debian/menu   # from upstream debian/ package
98         dh_installmenu
99         dh_installchangelogs NEWS
100         dh_strip
101         dh_compress
102         dh_fixperms
103
104         dh_installdeb
105         dh_shlibdeps
106         dh_gencontrol
107         dh_md5sums
108         dh_builddeb
109
110 source diff:                                                                  
111         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
112
113 binary: binary-indep binary-arch
114 .PHONY: build clean binary-indep binary-arch binary