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