Fixes this bug:
[onis.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12
13
14
15 CFLAGS = -Wall -g
16
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -O0
19 else
20         CFLAGS += -O2
21 endif
22
23 configure: configure-stamp
24 configure-stamp:
25         dh_testdir
26         find . -type d -name '.svn' | xargs rm -rf
27         if [ ! -e patch-stamp ]; then patch -p1 <contrib/systemwide-patch/systemwide-patch.diff; touch patch-stamp; fi
28         touch configure-stamp
29
30
31 build: build-stamp
32
33 build-stamp: configure-stamp 
34         dh_testdir
35         pod2man -r "$(egrep '^\$VERSION' onis | cut -d \' -f 2)" onis >onis.1
36         touch build-stamp
37
38 clean:
39         dh_testdir
40         dh_testroot
41         rm -f build-stamp configure-stamp
42         if [ -e onis.1 ]; then rm -f onis.1; fi
43         if [ -e patch-stamp ]; then patch -p1 -R <contrib/systemwide-patch/systemwide-patch.diff; rm -f patch-stamp; fi
44         dh_clean 
45
46 install: build
47         dh_testdir
48         dh_testroot
49         dh_clean -k 
50         dh_installdirs
51         # Add here commands to install the package into debian/onis.
52         #$(MAKE) install DESTDIR=$(CURDIR)/debian/onis
53         dh_install onis.conf users.conf etc/onis/
54         dh_install onis usr/bin/
55         dh_install lib/Onis usr/lib/perl5/
56         dh_install lang themes usr/share/onis/
57         dh_install reports/*-theme usr/share/onis/themes/
58         dh_installman onis.1
59
60 # Build architecture-independent files here.
61 binary-indep: build install
62         dh_testdir
63         dh_testroot
64         dh_installchangelogs CHANGELOG
65         dh_installdocs
66         dh_installexamples
67 #       dh_install
68 #       dh_installmenu
69 #       dh_installdebconf       
70 #       dh_installlogrotate
71 #       dh_installemacsen
72 #       dh_installpam
73 #       dh_installmime
74 #       dh_installinit
75 #       dh_installcron
76 #       dh_installinfo
77         dh_installman
78         dh_link
79         dh_strip
80         dh_compress
81         dh_fixperms
82         dh_perl
83 #       dh_python
84 #       dh_makeshlibs
85         dh_installdeb
86         dh_shlibdeps
87         dh_gencontrol
88         dh_md5sums
89         dh_builddeb
90
91 # Build architecture-dependent files here.
92 binary-arch: build install
93 # We have nothing to do by default.
94
95 binary: binary-indep binary-arch
96 .PHONY: build clean binary-indep binary-arch binary install configure