8b6f0c2d03f41a45868b347222f196eaa8d26ba8
[platform/framework/native/channel-service.git] / packaging / osp-channel-service.spec
1 Name:           osp-channel-service
2 Summary:        osp channel service
3 Version:        1.2.0.0
4 Release:        1
5 Group:          TO_BE/FILLED_IN
6 License:    Apache License, Version 2.0
7 Source0:        %{name}-%{version}.tar.gz
8 BuildRequires:  cmake
9 BuildRequires:  pkgconfig(glib-2.0)
10 BuildRequires:  pkgconfig(osp-appfw)
11 BuildRequires:  pkgconfig(chromium)
12 BuildRequires:  osp-appfw-internal-devel
13
14 # runtime requires
15 Requires: osp-appfw 
16 Requires: osp-installer
17 Requires: osp-app-service
18
19 Requires(post): coreutils
20
21 %description
22 osp channel service
23
24 %prep
25 %setup -q
26
27 %build 
28 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
29 %ifarch %{ix86}
30 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
31 %else
32 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_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
33 %endif
34
35 # Call make instruction with smp support
36 make %{?jobs:-j%jobs}
37
38 %install
39 rm -rf %{buildroot}
40 mkdir -p %{buildroot}/usr/share/license
41 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
42
43 %make_install
44
45 %post
46
47 /bin/rm -fr /opt/apps/cp7ipabg4k
48
49 /usr/etc/package-manager/backend/tpk -i /usr/apps/cp7ipabg4k
50 cp -f %{_libdir}/osp/osp-system-service-loader /usr/apps/cp7ipabg4k/bin/osp-channel-service
51 if [ -f /usr/lib/rpm-plugins/msm.so ]
52 then
53         chsmack -a osp-channel-service /usr/apps/cp7ipabg4k/bin/osp-channel-service
54         chsmack -e osp-channel-service /usr/apps/cp7ipabg4k/bin/osp-channel-service
55 fi
56
57 #%postun -p /sbin/ldconfig
58
59 %files
60 %manifest osp-channel-service.manifest
61 /usr/share/license/%{name}
62 /usr/apps/*