Add a debian subdirectory and the files needed to generate a debian package.
[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 build: build-stamp
10 build-stamp:
11         dh_testdir
12
13         (if [ -x ./autogen.sh ]; then \
14            ./autogen.sh --prefix=/usr --sysconfdir=/etc --disable-static ; \
15         else \
16            ./configure --prefix=/usr --sysconfdir=/etc --disable-static ; \
17         fi)
18         # Add here commands to compile the package.
19         make
20         make ethereal.1
21
22         touch build-stamp
23
24 clean:
25         dh_testdir
26         dh_testroot
27         rm -f build-stamp
28
29         # Add here commands to clean up after the build process.
30         -$(MAKE) distclean
31         rm -f rdps
32         dh_clean
33
34 # Build architecture-independent files here.
35 binary-indep: build
36 # We have nothing to do by default.
37
38 # Build architecture-dependent files here.
39 binary-arch: build
40         dh_testdir
41         dh_testroot
42         dh_clean -k
43         dh_installdirs
44
45         # Add here commands to install the files into debian/tmp
46         $(MAKE) install DESTDIR=`pwd`/debian/tmp
47         -rm -rf `pwd`/debian/tmp/usr/man
48
49         dh_installdocs
50 #       dh_installexamples
51         dh_installmenu
52 #       dh_installinit
53 #       dh_installcron
54         dh_installmanpages 
55         dh_installchangelogs NEWS
56         dh_strip
57         dh_compress
58         dh_fixperms
59
60 # debhelper isn't yet updated to support policy 3.0.0 so I have to play
61 # with directories to comply with fhs 
62 #       test -d debian/tmp/usr/share || mkdir debian/tmp/usr/share
63 #       test -d debian/tmp/usr/doc && \
64 #               mv debian/tmp/usr/doc debian/tmp/usr/share/
65 #       test -d debian/tmp/usr/man && \
66 #               mv debian/tmp/usr/man debian/tmp/usr/share/
67 #       dh_suidregister
68         dh_installdeb
69         dh_shlibdeps
70         dh_gencontrol
71 #       dh_makeshlibs
72         dh_md5sums
73         dh_builddeb
74
75 source diff:                                                                  
76         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
77
78 binary: binary-indep binary-arch
79 .PHONY: build clean binary-indep binary-arch binary