Change the manifest and remove rule files
[apps/native/ug-wifi-direct.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 ?= -pie
14 PREFIX ?= /opt/ug
15 DATADIR ?= /opt
16
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -O0
19 else
20         CFLAGS += -O2
21 endif
22
23 LDFLAGS += -Wl,--rpath=/usr/lib -Wl,--hash-style=both -Wl,--as-needed
24
25
26 configure: configure-stamp
27 configure-stamp:
28         dh_testdir
29         # Add here commands to configure the package.
30         CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .
31         touch configure-stamp
32
33 build: build-stamp
34 build-stamp: configure-stamp 
35         dh_testdir
36
37         # Add here commands to compile the package.
38         $(MAKE)
39
40         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
41                 cat $$f > $${f%.in}; \
42                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
43         done
44
45 clean:
46         dh_testdir
47         dh_testroot
48         rm -f build-stamp configure-stamp
49
50         # Add here commands to clean up after the build process.
51         -$(MAKE) clean
52
53         rm -rf CMakeCache.txt
54         rm -rf cmake_install.cmake
55         rm -rf Makefile
56         rm -rf install_manifest.txt
57         rm -rf CMakeFiles
58
59         rm -rf popup-wifidirect/CMakeCache.txt
60         rm -rf popup-wifidirect/CMakeFiles
61         rm -rf popup-wifidirect/cmake_install.cmake
62         rm -rf popup-wifidirect/Makefile
63         rm -rf popup-wifidirect/install_manifest.txt
64         rm -rf popup-wifidirect/*.so
65
66         rm -rf ugapp-wifidirect/CMakeCache.txt
67         rm -rf ugapp-wifidirect/CMakeFiles
68         rm -rf ugapp-wifidirect/cmake_install.cmake
69         rm -rf ugapp-wifidirect/Makefile
70         rm -rf ugapp-wifidirect/install_manifest.txt
71         rm -rf ugapp-wifidirect/*.so
72
73         rm -rf ug-wifidirect/CMakeCache.txt
74         rm -rf ug-wifidirect/CMakeFiles
75         rm -rf ug-wifidirect/cmake_install.cmake
76         rm -rf ug-wifidirect/Makefile
77         rm -rf ug-wifidirect/install_manifest.txt
78         rm -rf ug-wifidirect/*.so
79
80         rm -rf popup-wifidirect/po/CMakeCache.txt
81         rm -rf popup-wifidirect/po/CMakeFiles
82         rm -rf popup-wifidirect/po/cmake_install.cmake
83         rm -rf popup-wifidirect/po/Makefile
84         rm -rf popup-wifidirect/po/install_manifest.txt
85         rm -fr popup-wifidirect/po/*.mo
86
87         rm -rf ug-wifidirect/po/CMakeCache.txt
88         rm -rf ug-wifidirect/po/CMakeFiles
89         rm -rf ug-wifidirect/po/cmake_install.cmake
90         rm -rf ug-wifidirect/po/Makefile
91         rm -rf ug-wifidirect/po/install_manifest.txt
92         rm -fr ug-wifidirect/po/*.mo
93
94         rm -rf *.so
95         rm -rf *.desktop
96         rm -rf *.edj
97         rm -rf *.pc
98
99         rm -rf debian/*.install
100         rm -fr debian/temp
101         
102         dh_clean 
103
104 dev_clean:
105         dh_testdir
106         dh_testroot
107         rm -f build-stamp configure-stamp
108
109         dh_clean 
110
111 install: build
112         dh_testdir
113         dh_testroot
114         dh_clean -k 
115         dh_installdirs
116
117         # Add here commands to install the package into debian/tmp.
118         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
119
120
121 # Build architecture-independent files here.
122 binary-indep: build install
123 # We have nothing to do by default.
124
125 # Build architecture-dependent files here.
126 binary-arch: build install
127         dh_testdir
128         dh_testroot
129         dh_installchangelogs 
130         dh_installdocs
131         dh_installexamples
132         dh_install --sourcedir=debian/tmp
133         dh_installman
134         dh_link
135 #       dh_strip
136         dh_strip --dbg-package=libug-setting-wifidirect-efl-dbg
137         dh_compress
138         dh_fixperms
139 #       dh_perl
140         dh_makeshlibs
141         dh_installdeb
142 #       dh_shlibdeps
143         dh_gencontrol
144         dh_md5sums
145         dh_builddeb
146
147 binary: binary-indep binary-arch
148 .PHONY: build clean binary-indep binary-arch binary install configure