Found in "gnokii-working" directory, some November-patches version
[gnokii.git] / packaging / Debian / rules
1 #!/usr/bin/make -f
2
3 export DH_VERBOSE=1
4 export DH_COMPAT=3
5
6 export build_dir=$(shell pwd)/debian/gnokii
7
8 build:  build-stamp
9 build-stamp:
10         dh_testdir
11 #       if [ ! -f ./configure ] ; then autoconf ; fi
12         ./configure --prefix=/usr --with-x
13 #       ./configure --prefix=/usr --with-x --enable-debug --enable-xdebug --enable-rlpdebug
14         make
15         touch build
16         touch build-stamp
17
18 clean:
19         dh_testdir
20         dh_testroot
21         rm -f build build-stamp config.*
22         touch Makefile.global
23         make clean
24         dh_clean
25
26 # Build architecture-independent files here.
27 binary-indep:   build
28
29 # There are no architecture-independent files to be uploaded
30 # generated by this package.  If there were any they would be
31 # made here.
32
33 binary-arch:    build
34 #       dh_testversion
35         dh_testdir
36         dh_testroot
37         dh_installdirs
38 # The following two lines are to prevent the install process from installing
39 # mgnokiidev owned by the probably not-yet-existing group "gnokii".  mgnokiidev
40 # gets SGID after dpkg runs preinst which creates the group "gnokii".
41         mv utils/Makefile utils/Makefile.ORIG
42         sed 's#-o root -g gnokii -m 4750 ##' < utils/Makefile.ORIG > utils/Makefile
43 #       
44         make install prefix=$(build_dir)/usr
45 #
46 # just to leave the sources in a pristine state...
47         mv utils/Makefile.ORIG utils/Makefile
48 #
49         mkdir -p $(build_dir)/etc
50         sed 's#/usr/local/sbin/#/usr/sbin/#' < Docs/sample/gnokiirc > $(build_dir)/etc/gnokiirc
51 # lintian complains if there are multiple licence files in one package, hence
52 # the next two commands
53         sed 's#"COPYING"#"file:/usr/share/doc/gnokii/copyright"#' < \
54                 xgnokii/docs/help/en_US/faq.html > \
55                 $(build_dir)/usr/share/xgnokii/help/en_US/faq.html
56         rm -f $(build_dir)/usr/share/xgnokii/help/en_US/COPYING
57 # lintian complains if there is a binary that does not have a man page.
58 # Pawel says that xlogos will soon be dumped anyways, so...
59         rm -f $(build_dir)/usr/bin/xlogos
60 #       dh_installdebconf       
61         dh_installexamples
62         dh_installdocs
63         dh_installmenu
64 #       dh_installemacsen
65 #       dh_installpam
66 #       dh_installinit
67 #       dh_installcron
68         dh_installman
69 #       dh_installinfo
70 #       dh_undocumented
71         dh_installchangelogs
72         dh_link
73         dh_strip
74         dh_compress
75         dh_fixperms
76 #       dh_makeshlibs
77         dh_installdeb
78 #       dh_perl
79         dh_shlibdeps
80         dh_gencontrol
81         dh_md5sums
82         dh_builddeb
83
84
85 source diff:
86         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
87
88 binary: binary-indep binary-arch
89 .PHONY: build clean binary-indep binary-arch binary
90