rules changed to obey version 4 compatability
[tclrobot.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # Force compat level four
9 export DH_COMPAT=4
10
11 # Ignore CVS information
12 export DH_ALWAYS_EXCLUDE=CVS
13
14 # This has to be exported to make some magic below work.
15 #export DH_OPTIONS
16
17
18
19 CFLAGS = -Wall -g
20
21 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
22         CFLAGS += -O0
23 else
24         CFLAGS += -O2
25 endif
26 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
27         INSTALL_PROGRAM += -s
28 endif
29
30 # shared library versions, option 1
31 version=2.0.5
32 major=2
33 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
34 #version=`ls src/.libs/lib*.so.* | \
35 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
36 #major=`ls src/.libs/lib*.so.* | \
37 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
38
39 configure: configure-stamp
40 configure-stamp:
41         dh_testdir
42         # Add here commands to configure the package.
43         ./configure --prefix=$(CURDIR)/debian/tmp/usr
44         touch configure-stamp
45
46
47 build: build-stamp
48 build-stamp: configure-stamp 
49         dh_testdir
50
51         # Add here commands to compile the package.
52         $(MAKE)
53
54         touch build-stamp
55
56 clean:
57         dh_testdir
58         dh_testroot
59         rm -f build-stamp configure-stamp
60
61         # Add here commands to clean up after the build process.
62         -$(MAKE) clean
63
64         dh_clean
65
66 install: build
67         dh_testdir
68         dh_testroot
69         dh_clean -k
70         dh_installdirs
71
72         # Add here commands to install the package into debian/tmp
73         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
74         dh_install
75
76 # Build architecture-independent files here.
77 binary-indep: build install
78 # We have nothing to do by default.
79
80 # Build architecture-dependent files here.
81 binary-arch: build install
82         dh_testdir
83         dh_testroot
84         dh_installchangelogs 
85         dh_installdocs
86 #       dh_installexamples
87 #       dh_install maybe wrong place here?? moved to 
88 #       dh_installmenu
89 #       dh_installdebconf       
90 #       dh_installlogrotate
91 #       dh_installemacsen
92 #       dh_installpam
93 #       dh_installmime
94 #       dh_installinit
95 #       dh_installcron
96 #       dh_installinfo
97 #       dh_installman
98         dh_link
99         dh_strip
100         dh_compress
101         dh_fixperms
102 #       dh_perl
103 #       d_python
104 #       dh_makeshlibs
105         dh_installdeb
106         dh_shlibdeps
107         dh_gencontrol
108         dh_md5sums
109         dh_builddeb
110
111 binary: binary-indep binary-arch
112 .PHONY: build clean binary-indep binary-arch binary install configure