Tizen 2.0 Release
[platform/core/system/libslp-sysman.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 CFLAGS ?= -Wall -g
13 LDFLAGS ?= 
14 PREFIX ?= /usr
15 DATADIR ?= /opt
16 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
17
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19         CFLAGS += -O0
20 else
21         CFLAGS += -O2
22 endif
23
24 configure: configure-stamp
25 configure-stamp:
26         dh_testdir
27         # Add here commands to configure the package.
28         LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX)
29
30         touch configure-stamp
31
32 build: build-stamp
33
34 build-stamp: configure-stamp 
35         dh_testdir
36
37         # Add here commands to compile the package.
38         $(MAKE)
39         #docbook-to-man debian/wavplayer.sgml > wavplayer.1
40
41         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
42                 cat $$f > $${f%.in}; \
43                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
44                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
45         done
46
47
48         touch $@
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) clean
57         rm -rf CMakeCache.txt
58         rm -rf CMakeFiles
59         rm -rf cmake_install.cmake
60         rm -rf Makefile
61         rm -rf install_manifest.txt
62         rm -rf *.so
63         rm -rf *.pc
64         rm -rf *.desktop
65
66         rm -rf set_pmon/CMakeCache.txt
67         rm -rf set_pmon/CMakeFiles
68         rm -rf set_pmon/cmake_install.cmake
69         rm -rf set_pmon/Makefile
70         rm -rf set_pmon/install_manifest.txt
71         rm -rf set_pmon/*.desktop
72
73         rm -rf test/CMakeCache.txt
74         rm -rf test/CMakeFiles
75         rm -rf test/cmake_install.cmake
76         rm -rf test/Makefile
77         rm -rf test/install_manifest.txt
78
79         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
80                 rm -f $${f%.in}; \
81         done
82
83         dh_clean 
84
85 install: build
86         dh_testdir
87         dh_testroot
88         dh_clean -k 
89         dh_installdirs
90
91         # Add here commands to install the package into debian/wavplayer.
92         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
93         mkdir -p $(CURDIR)/debian/tmp/etc/rc.d/rc3.d/
94         mkdir -p $(CURDIR)/debian/tmp/etc/rc.d/rc5.d/
95         ln -s /usr/bin/regpmon.sh $(CURDIR)/debian/tmp/etc/rc.d/rc3.d/S99regpmon
96         ln -s /usr/bin/regpmon.sh $(CURDIR)/debian/tmp/etc/rc.d/rc5.d/S99regpmon
97
98
99 # Build architecture-independent files here.
100 binary-indep: build install
101 # We have nothing to do by default.
102
103 # Build architecture-dependent files here.
104 binary-arch: build install
105         dh_testdir
106         dh_testroot
107         dh_installchangelogs 
108         dh_installdocs
109         dh_installexamples
110         dh_install --sourcedir=debian/tmp
111 #       dh_installmenu
112 #       dh_installdebconf       
113 #       dh_installlogrotate
114 #       dh_installemacsen
115 #       dh_installpam
116 #       dh_installmime
117 #       dh_python
118 #       dh_installinit
119 #       dh_installcron
120 #       dh_installinfo
121         dh_installman
122         dh_link
123 #       dh_strip
124         dh_strip --dbg-package=libslp-sysman-dbg
125         dh_compress
126         dh_fixperms
127 #       dh_perl
128         dh_makeshlibs
129         dh_installdeb
130         dh_shlibdeps
131         dh_gencontrol
132         dh_md5sums
133         dh_builddeb
134
135 binary: binary-indep binary-arch
136 .PHONY: build clean binary-indep binary-arch binary install configure