Update change log and spec for wrt-plugins-tizen_0.2.71
[profile/ivi/wrt-plugins-tizen.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 -fvisibility=hidden -fPIC
19 CXXFLAGS ?=  -Wall -g -fPIC
20 PREFIX ?= /usr/lib/wrt-plugins
21 CONFIG_DTD ?= /usr/etc/tizen-apis
22 DATADIR ?= /opt
23
24 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25         CFLAGS += -O0
26         CXXFLAGS += -O0
27 else
28         CFLAGS += -O2
29         CXXFLAGS += -O2
30 endif
31
32 ifeq (,$(findstring no,$(DPL_LOG)))
33         DPL_LOGS_STATUS = "ON"
34 else
35         DPL_LOGS_STATUS = "OFF"
36 endif
37
38 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -Wl,--hash-style=both# -Wl,--version-script=$(CURDIR)/wrt-plugins.map
39
40 ifdef DEVPKG
41         CMAKEFLAGS += -DDEVPKG="$(DEVPKG)"
42 endif
43
44 configure: configure-stamp
45 configure-stamp:
46                 dh_testdir
47                 # Add here commands to configure the package.
48                 CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CMAKEFLAGS) -DDPL_LOG=$(DPL_LOGS_STATUS) -DCMAKE_BUILD_TYPE="$(BUILD_TYPE)" 
49                         touch configure-stamp
50                          
51 build: build-stamp
52
53 build-stamp:  configure-stamp
54         dh_testdir
55
56         # Add here commands to compile the package.
57         $(MAKE) -j9 -l2.0
58         #docbook-to-man debian/ncurses.sgml > ncurses.1
59
60         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
61                 cat $$f > $${f%.in}; \
62                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
63                 sed -i -e "s#@CONFIG_DTD@#$(CONFIG_DTD)#g" $${f%.in}; \
64                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
65         done
66
67         touch $@
68
69 clean:
70         dh_testdir
71         dh_testroot
72         rm -f build-stamp configure-stamp
73 #       -$(MAKE) distclean
74         ./clean.sh
75
76 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
77         cp -f /usr/share/misc/config.sub config.sub
78 endif
79 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
80         cp -f /usr/share/misc/config.guess config.guess
81 endif
82
83         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
84                 rm -f $${f%.in}; \
85         done
86
87         dh_clean 
88
89 install: build
90         dh_testdir
91         dh_testroot
92         dh_clean -k 
93         dh_installdirs
94
95         # Add here commands to install the package into debian/ncurses.
96         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
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 --dbg-package=wrt-plugins-tizen-dbg
124         dh_compress
125         dh_fixperms
126 #       dh_perl
127         dh_makeshlibs
128         dh_installdeb
129         dh_shlibdeps
130         dh_gencontrol
131         dh_md5sums
132         dh_builddeb
133
134 binary: binary-indep binary-arch
135 .PHONY: build clean binary-indep binary-arch binary install