upload tizen1.0 source
[framework/system/rfkill.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 # These are used for cross-compiling and for saving the configure script
14 # from having to guess our platform (since we know it already)
15 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
16 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
17
18 CFLAGS ?= -Wall -g
19 LDFLAGS ?= 
20 PREFIX ?= /usr
21 DATADIR ?= /opt
22
23 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24         CFLAGS += -O0
25 else
26         CFLAGS += -O2
27 endif
28
29 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
30
31 #config.status: configure
32 #       dh_testdir
33 #       # Add here commands to configure the package.
34 #       CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --prefix=$(PREFIX) 
35
36 #build: build-stamp
37
38 #build-stamp:  config.status
39
40
41 configure: configure-stamp
42 configure-stamp:
43         dh_testdir
44         # Add here commands to configure the package.
45
46         touch configure-stamp
47
48
49 build: build-stamp
50
51 build-stamp: configure-stamp 
52
53         dh_testdir
54
55         # Add here commands to compile the package.
56         $(MAKE)
57         #docbook-to-man debian/ncurses.sgml > ncurses.1
58
59         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
60                 cat $$f > $${f%.in}; \
61                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
62                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
63         done
64
65         touch $@
66
67 clean:
68         dh_testdir
69         dh_testroot
70         rm -f build-stamp 
71
72         # Add here commands to clean up after the build process.
73         -$(MAKE) clean
74 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
75         cp -f /usr/share/misc/config.sub config.sub
76 endif
77 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
78         cp -f /usr/share/misc/config.guess config.guess
79 endif
80
81         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
82                 rm -f $${f%.in}; \
83         done
84
85         dh_clean 
86
87 install: build
88         dh_testdir
89         dh_testroot
90         dh_clean -k 
91         dh_installdirs
92
93         # Add here commands to install the package into debian/ncurses.
94         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
95
96
97 # Build architecture-independent files here.
98 binary-indep: build install
99 # We have nothing to do by default.
100
101 # Build architecture-dependent files here.
102 binary-arch: build install
103         dh_testdir
104         dh_testroot
105         dh_installchangelogs 
106         dh_installdocs
107         dh_installexamples
108         dh_install --sourcedir=debian/tmp
109 #       dh_installmenu
110 #       dh_installdebconf
111 #       dh_installlogrotate
112 #       dh_installemacsen
113 #       dh_installpam
114 #       dh_installmime
115 #       dh_python
116 #       dh_installinit
117 #       dh_installcron
118 #       dh_installinfo
119         dh_installman
120         dh_link
121         dh_strip
122         dh_compress
123         dh_fixperms
124 #       dh_perl
125         dh_makeshlibs
126         dh_installdeb
127         dh_shlibdeps
128         dh_gencontrol
129         dh_md5sums
130         dh_builddeb
131
132 binary: binary-indep binary-arch
133 .PHONY: build clean binary-indep binary-arch binary install