Merge "Add screen feature on SystemInfo" 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.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(heynoti)
43 BuildRequires:  pkgconfig(elementary)
44 BuildRequires:  pkgconfig(eina)
45 BuildRequires:  pkgconfig(evas)
46 BuildRequires:  pkgconfig(edje)
47 BuildRequires:  pkgconfig(eet)
48 BuildRequires:  pkgconfig(edbus)
49 BuildRequires:  pkgconfig(efreet)
50 BuildRequires:  pkgconfig(ethumb)
51 BuildRequires:  pkgconfig(icu-i18n)
52 BuildRequires:  pkgconfig(iniparser)
53 BuildRequires:  pkgconfig(libpcre)
54 BuildRequires:  pkgconfig(libssl)
55 BuildRequires:  pkgconfig(libsoup-2.4)
56 BuildRequires:  pkgconfig(libxml-2.0)
57 BuildRequires:  pkgconfig(message-port)
58 BuildRequires:  pkgconfig(minizip)
59 BuildRequires:  pkgconfig(notification)
60 BuildRequires:  pkgconfig(openssl)
61 BuildRequires:  pkgconfig(pkgmgr)
62 BuildRequires:  pkgconfig(pkgmgr-info)
63 BuildRequires:  pkgconfig(pmapi)
64 BuildRequires:  pkgconfig(libprivilege-control)
65 BuildRequires:  pkgconfig(sqlite3)
66 BuildRequires:  pkgconfig(uuid)
67 BuildRequires:  pkgconfig(vconf)
68 BuildRequires:  pkgconfig(zlib)
69 BuildRequires:  pkgconfig(haptic)
70 BuildRequires:  pkgconfig(x11)
71 BuildRequires:  privacy-manager-client-devel
72 BuildRequires:  capi-security-privilege-manager-devel
73 BuildRequires:  boost-devel
74 BuildRequires:  gettext-tools
75 BuildRequires:  pkgconfig(security-server)
76 BuildRequires:  pkgconfig(badge)
77 BuildRequires:  pkgconfig(appinfo) >= 0.1.0
78
79 # runtime requires
80 Requires: capi-appfw-application
81 Requires: capi-appfw-package-manager
82 Requires: capi-content-mime-type
83 Requires: capi-network-serial
84 Requires: capi-system-runtime-info
85 Requires: capi-security-privilege-manager
86 Requires: chromium
87 Requires: message-port
88 Requires: osp-env-config >= 1.2.2.1
89 Requires: sqlite
90 Requires: iniparser
91
92 Provides:   libosp-appfw.so.1, libosp-newlib.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
108 %description devel
109 The  App Framework library of OSP (DEV)
110
111 %package internal-devel
112 Summary:    osp app framework internel (Internal)
113 Group:      TO_BE/FILLED_IN
114 Requires:   %{name} = %{version}-%{release}
115
116 %description internal-devel
117 The App Framework library of OSP (Internal-DEV)
118
119 %package debug
120 Summary:    The App Framework library of OSP (Development)
121 Group:      TO_BE/FILLED_IN
122 Requires:   %{name} = %{version}-%{release}
123
124 %description debug
125 The App Framework library of OSP (DEV)
126
127 %prep
128 %setup -q
129
130 %build
131 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
132 %ifarch %{ix86}
133 %if 0%{?simulator}
134 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
135 %else
136 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86
137 %endif
138 %else
139 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
140 %endif
141
142 # Call make instruction with smp support
143 #make %{?jobs:-j%jobs}
144 make %{?_smp_mflags}
145
146 %clean
147 rm -rf %{buildroot}
148
149 %install
150 mkdir -p %{buildroot}/usr/share/license
151 cp %{_builddir}/%{name}-%{version}/LICENSE.Flora  %{buildroot}/usr/share/license/%{name}
152 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
153
154 %make_install
155
156 %post
157 /bin/rm -f /etc/ld.so.cache
158 /sbin/ldconfig
159
160 mkdir -p /opt/usr/share/.osp-compat/share/AppControl
161 mkdir -p /opt/usr/share/.osp-compat/share2
162 mkdir -p /opt/usr/etc
163 mkdir -p /opt/usr/media/Images
164 mkdir -p /opt/usr/media/Others
165 mkdir -p /opt/usr/media/Sounds
166 mkdir -p /opt/usr/media/Videos
167 mkdir -p /opt/usr/media/Camera
168
169
170 mkdir -p /tmp/osp
171
172 chmod -R 707 /opt/usr/share/.osp-compat/share/AppControl
173 chmod -R 777 /opt/usr/media
174 chmod -R 777 /tmp/osp
175
176 chown -R 5000:5000 /opt/usr/media
177 locale -a > /opt/usr/etc/clocale.list
178 chmod 444 /opt/usr/etc/clocale.list
179
180 %postun -p /sbin/ldconfig
181
182 %files
183 %manifest osp-appfw.manifest
184 /usr/share/license/%{name}
185 %config /etc/*
186 %config /opt/usr/etc/*
187 /usr/share/locale/*
188 %config /usr/etc/*
189 %{_libdir}/osp/libosp-appfw.so*
190 %{_libdir}/osp/libosp-newlib.so*
191 %{_libdir}/osp-server/libosp-appfw-server.so*
192 %{_libdir}/osp-server/libosp-system-server.so*
193
194 %files devel
195 %{_includedir}/osp/*.h
196 %{_includedir}/osp/*.hpp
197 %{_libdir}/pkgconfig/osp-appfw.pc
198
199 %files internal-devel
200 %{_includedir}/osp/app/*
201 %{_includedir}/osp/base/*
202 %{_includedir}/osp/io/*
203 %{_includedir}/osp/locales/*
204 %{_includedir}/osp/security/*
205 %{_includedir}/osp/system/*
206 %{_includedir}/osp/text/*
207 %{_includedir}/osp/server/*
208 %{_includedir}/osp/system-server/*
209 %{_libdir}/pkgconfig/osp-appfw-server.pc
210 %{_libdir}/pkgconfig/osp-system-server.pc
211
212 %files debug
213 %{_libdir}/osp/debug/libosp-appfw.so*
214 %{_libdir}/osp/debug/libosp-newlib.so*
215 %{_libdir}/osp-server/debug/libosp-appfw-server.so*
216 %{_libdir}/osp-server/debug/libosp-system-server.so*