Update the spec file
[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.1.0
4 Release:        2
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(bundle)
12 BuildRequires:  pkgconfig(dlog)
13 BuildRequires:  pkgconfig(chromium)
14 BuildRequires:  pkgconfig(libsoup-2.4)
15 BuildRequires:  pkgconfig(libssl)
16 BuildRequires:  pkgconfig(libsmack)
17 BuildRequires:  pkgconfig(message-port)
18 BuildRequires:  pkgconfig(openssl)
19 BuildRequires:  osp-appfw-internal-devel
20
21 # runtime requires
22 Requires: osp-appfw 
23 Requires: osp-installer
24 Requires: osp-app-service
25
26 Requires(post): coreutils
27
28 %description
29 osp channel service
30
31 %prep
32 %setup -q
33
34 %build 
35 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
36 %ifarch %{ix86}
37 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
38 %else
39 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}
40 %endif
41
42 # Call make instruction with smp support
43 make %{?jobs:-j%jobs}
44
45 %install
46 rm -rf %{buildroot}
47 mkdir -p %{buildroot}/usr/share/license
48 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
49
50 %make_install
51
52 %post
53
54 /bin/rm -fr /opt/apps/cp7ipabg4k
55
56 /usr/etc/package-manager/backend/tpk -i /usr/apps/cp7ipabg4k
57 if [ -f /usr/lib/rpm-plugins/msm.so ]
58 then
59         chsmack -a cp7ipabg4k /usr/apps/cp7ipabg4k/bin/osp-channel-service
60         chsmack -e cp7ipabg4k /usr/apps/cp7ipabg4k/bin/osp-channel-service
61 fi
62
63 #%postun -p /sbin/ldconfig
64
65 %files
66 %manifest osp-channel-service.manifest
67 /usr/share/license/%{name}
68 /usr/apps/*