Merge "Beautification of soure-code" into tizen_2.2
[platform/framework/native/appfw.git] / packaging / osp-appfw.spec
1 %define debug_package %{nil}
2 %define __strip /bin/true
3
4 Name:       osp-appfw
5 Summary:    The App Framework library of OSP 
6 Version:    1.2.2.0
7 Release:    1
8 Group:      TO_BE/FILLED_IN
9 License:    Apache License, Version 2.0 or Flora
10 Source0:    %{name}-%{version}.tar.gz
11 BuildRequires:  cmake
12 BuildRequires:  pkgconfig(capi-appfw-application)
13 BuildRequires:  pkgconfig(capi-appfw-app-manager)
14 BuildRequires:  pkgconfig(capi-appfw-package-manager)
15 BuildRequires:  pkgconfig(capi-content-mime-type)
16 BuildRequires:  pkgconfig(capi-network-serial)
17 BuildRequires:  pkgconfig(capi-system-device)
18 BuildRequires:  pkgconfig(capi-system-info)
19 BuildRequires:  pkgconfig(capi-system-power)
20 BuildRequires:  pkgconfig(capi-system-runtime-info)
21 BuildRequires:  pkgconfig(capi-system-system-settings)
22 BuildRequires:  pkgconfig(capi-system-media-key)
23 BuildRequires:  pkgconfig(capi-network-bluetooth)
24 BuildRequires:  pkgconfig(capi-telephony-sim)
25 BuildRequires:  pkgconfig(capi-network-tethering)
26 BuildRequires:  pkgconfig(capi-network-wifi)
27 BuildRequires:  pkgconfig(capi-network-wifi-direct)
28 BuildRequires:  pkgconfig(wifi-direct)
29 BuildRequires:  pkgconfig(capi-media-sound-manager)
30 BuildRequires:  pkgconfig(sysman)
31 BuildRequires:  pkgconfig(tapi)
32 BuildRequires:  pkgconfig(alarm-service)
33 BuildRequires:  pkgconfig(appsvc)
34 BuildRequires:  pkgconfig(aul)
35 BuildRequires:  pkgconfig(bundle)
36 BuildRequires:  pkgconfig(chromium)
37 BuildRequires:  pkgconfig(dbus-1)
38 BuildRequires:  pkgconfig(dbus-glib-1)
39 BuildRequires:  pkgconfig(devman)
40 BuildRequires:  pkgconfig(dlog)
41 BuildRequires:  pkgconfig(dukgenerator)
42 BuildRequires:  pkgconfig(ecore)
43 BuildRequires:  pkgconfig(glib-2.0)
44 BuildRequires:  pkgconfig(heynoti)
45 BuildRequires:  pkgconfig(elementary)
46 BuildRequires:  pkgconfig(eina)
47 BuildRequires:  pkgconfig(evas)
48 BuildRequires:  pkgconfig(edje)
49 BuildRequires:  pkgconfig(eet)
50 BuildRequires:  pkgconfig(edbus)
51 BuildRequires:  pkgconfig(efreet)
52 BuildRequires:  pkgconfig(ethumb)
53 BuildRequires:  pkgconfig(icu-i18n)
54 BuildRequires:  pkgconfig(libcurl)
55 BuildRequires:  pkgconfig(libpcre)
56 BuildRequires:  pkgconfig(libssl)
57 BuildRequires:  pkgconfig(libsoup-2.4)
58 BuildRequires:  pkgconfig(libwbxml2)
59 BuildRequires:  pkgconfig(message-port)
60 BuildRequires:  pkgconfig(minizip)
61 BuildRequires:  pkgconfig(notification)
62 BuildRequires:  pkgconfig(openssl)
63 BuildRequires:  pkgconfig(pkgmgr)
64 BuildRequires:  pkgconfig(pkgmgr-info)
65 BuildRequires:  pkgconfig(pmapi)
66 BuildRequires:  pkgconfig(libprivilege-control)
67 BuildRequires:  pkgconfig(sqlite3)
68 BuildRequires:  pkgconfig(uuid)
69 BuildRequires:  pkgconfig(vconf)
70 BuildRequires:  pkgconfig(zlib)
71 BuildRequires:  pkgconfig(haptic)
72 BuildRequires:  pkgconfig(x11)
73 BuildRequires:  privacy-manager-client-devel
74 BuildRequires:  capi-security-privilege-manager-devel
75 BuildRequires:  boost-devel
76 BuildRequires:  gettext-tools
77 BuildRequires:  pkgconfig(security-server)
78
79 # runtime requires
80 Requires: capi-appfw-app-manager  
81 Requires: capi-appfw-application  
82 Requires: capi-appfw-package-manager
83 Requires: capi-content-mime-type
84 Requires: capi-network-serial
85 Requires: capi-system-runtime-info
86 Requires: capi-security-privilege-manager
87 Requires: chromium
88 Requires: message-port
89 Requires: osp-env-config
90 Requires: sqlite
91
92 Provides:   libosp-appfw.so.1
93
94 Requires(post): /sbin/ldconfig  
95 Requires(post): coreutils
96 Requires(postun): /sbin/ldconfig
97
98 %description
99 The App Framework library of OSP
100
101 %package devel
102 Summary:    The App Framework library of OSP (Development)
103 Group:      TO_BE/FILLED_IN
104 Requires:   %{name} = %{version}-%{release}
105 Requires: boost-devel
106 Requires: pkgconfig(pkgmgr-info)
107 Requires: pkgconfig(capi-appfw-app-manager)
108
109 %description devel
110 The  App Framework library of OSP (DEV)
111
112 %package internal-devel
113 Summary:    osp app framework internel (Internal)
114 Group:      TO_BE/FILLED_IN
115 Requires:   %{name} = %{version}-%{release}
116 Requires: pkgconfig(capi-appfw-app-manager)
117
118 %description internal-devel
119 The App Framework library of OSP (Internal-DEV)
120
121 %package debug
122 Summary:    The App Framework library of OSP (Development)
123 Group:      TO_BE/FILLED_IN
124 Requires:   %{name} = %{version}-%{release}
125
126 %description debug
127 The App Framework library of OSP (DEV)
128
129 %prep
130 %setup -q
131
132 %build
133 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
134 %ifarch %{ix86}
135 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86
136 %else
137 CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm
138 %endif
139
140 # Call make instruction with smp support
141 make %{?jobs:-j%jobs}
142
143 %install
144 rm -rf %{buildroot}
145 mkdir -p %{buildroot}/usr/share/license
146 cp %{_builddir}/%{name}-%{version}/LICENSE.Flora  %{buildroot}/usr/share/license/%{name}
147 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
148
149 %make_install
150
151 %post
152 /bin/rm -f /etc/ld.so.cache
153 /sbin/ldconfig
154
155 mkdir -p /opt/usr/share/.osp-compat/share/AppControl
156 mkdir -p /opt/usr/share/.osp-compat/share2
157 mkdir -p /opt/usr/etc
158 mkdir -p /opt/usr/media/Images
159 mkdir -p /opt/usr/media/Others
160 mkdir -p /opt/usr/media/Sounds
161 mkdir -p /opt/usr/media/Videos
162 mkdir -p /opt/usr/media/Camera
163
164
165 mkdir -p /tmp/osp
166
167 chmod -R 707 /opt/usr/share/.osp-compat/share/AppControl
168 chmod -R 777 /opt/usr/media
169 chmod -R 777 /tmp/osp
170
171 chown -R 5000:5000 /opt/usr/media
172 locale -a > /opt/usr/etc/clocale.list
173 chmod 444 /opt/usr/etc/clocale.list
174
175 %postun -p /sbin/ldconfig
176
177 %files
178 %manifest osp-appfw.manifest
179 /usr/share/license/%{name}
180 /etc/*
181 /opt/usr/share/.osp-compat/share/*
182 /opt/usr/etc/*
183 /usr/share/locale/*
184 /usr/etc/*
185 %{_libdir}/osp/libosp-appfw.so*
186 %{_libdir}/osp-server/libosp-appfw-server.so*
187 %{_libdir}/osp-server/libosp-system-server.so*
188
189 %files devel
190 %{_includedir}/osp/*.h
191 %{_includedir}/osp/*.hpp
192 %{_libdir}/pkgconfig/osp-appfw.pc
193
194 %files internal-devel
195 %{_includedir}/osp/app/*
196 %{_includedir}/osp/base/*
197 %{_includedir}/osp/io/*
198 %{_includedir}/osp/locales/*
199 %{_includedir}/osp/security/*
200 %{_includedir}/osp/system/*
201 %{_includedir}/osp/text/*
202 %{_includedir}/osp/server/*
203 %{_includedir}/osp/system-server/*
204 %{_libdir}/pkgconfig/osp-appfw-server.pc
205 %{_libdir}/pkgconfig/osp-system-server.pc
206
207 %files debug
208 %{_libdir}/osp/debug/libosp-appfw.so*
209 %{_libdir}/osp-server/debug/libosp-appfw-server.so*
210 %{_libdir}/osp-server/debug/libosp-system-server.so*
211