Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / libosip2 / 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 # This is the debhelper compatibility version to use.
9 export DH_COMPAT=3
10
11 # These are used for cross-compiling and for saving the configure script
12 # from having to guess our platform (since we know it already)
13 DEB_HOST_GNU_TYPE       ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14 DEB_BUILD_GNU_TYPE      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15
16
17 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -g
19 endif
20 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
21         INSTALL_PROGRAM += -s
22 endif
23
24 # shared library versions, option 1
25 version=2.0.5
26 major=2
27 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
28 #version=`ls src/.libs/lib*.so.* | \
29 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
30 #major=`ls src/.libs/lib*.so.* | \
31 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
32
33 configure: configure-stamp
34 configure-stamp:
35         dh_testdir
36         # Add here commands to configure the package.
37         ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
38
39         touch configure-stamp
40
41 build: build-stamp
42 build-stamp: configure-stamp 
43         dh_testdir
44
45         # Add here commands to compile the package.
46         $(MAKE)
47
48         touch build-stamp
49
50 clean:
51         dh_testdir
52         dh_testroot
53         rm -f build-stamp configure-stamp
54
55         # Add here commands to clean up after the build process.
56         -$(MAKE) distclean
57         -test -r /usr/share/misc/config.sub && \
58           cp -f /usr/share/misc/config.sub config.sub
59         -test -r /usr/share/misc/config.guess && \
60           cp -f /usr/share/misc/config.guess config.guess
61
62
63         dh_clean
64
65 install: build
66         dh_testdir
67         dh_testroot
68         dh_clean -k
69         dh_installdirs
70
71         # Add here commands to install the package into debian/tmp
72         $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
73
74
75 # Build architecture-independent files here.
76 binary-indep: build install
77 # We have nothing to do by default.
78
79 # Build architecture-dependent files here.
80 binary-arch: build install
81         dh_testdir
82         dh_testroot
83         dh_movefiles
84
85 #       dh_installdebconf       
86         dh_installdocs
87         dh_installexamples
88         dh_installmenu
89 #       dh_installlogrotate
90 #       dh_installemacsen
91 #       dh_installpam
92 #       dh_installmime
93 #       dh_installinit
94         dh_installcron
95         dh_installman
96         dh_installinfo
97 #       dh_undocumented
98         dh_installchangelogs ChangeLog
99         dh_link
100         dh_strip
101         dh_compress
102         dh_fixperms
103         dh_makeshlibs
104         dh_installdeb
105 #       dh_perl
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