Tizen 2.1 base
[platform/framework/native/app-service.git] / packaging / osp-app-service.spec
1 Name:           osp-app-service
2 Summary:        osp application service
3 Version:        1.2.0.0
4 Release:        1
5 Group:          System/Libraries
6 License:        Apache License, Version 2.0 or Flora
7 Source0:        %{name}-%{version}.tar.gz
8 Source1:        osp-app-service.service
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(glib-2.0)
11 BuildRequires:  pkgconfig(chromium)
12 BuildRequires:  pkgconfig(capi-system-media-key)
13 BuildRequires:  pkgconfig(capi-network-bluetooth)
14 BuildRequires:  pkgconfig(capi-appfw-application)
15 BuildRequires:  pkgconfig(capi-appfw-app-manager)
16 BuildRequires:  pkgconfig(capi-appfw-package-manager)
17 BuildRequires:  pkgconfig(capi-system-device)
18 BuildRequires:  pkgconfig(capi-system-info)
19 BuildRequires:  pkgconfig(capi-messaging-messages)
20 BuildRequires:  pkgconfig(notification)
21 BuildRequires:  pkgconfig(appsvc)
22 BuildRequires:  pkgconfig(pkgmgr)
23 BuildRequires:  pkgconfig(osp-appfw)
24 BuildRequires:  pkgconfig(osp-shell)
25 BuildRequires:  pkgconfig(sysman)
26 BuildRequires:  pkgconfig(vconf)
27 BuildRequires:  pkgconfig(calendar-service2)
28 BuildRequires:  osp-appfw-internal-devel
29 BuildRequires:  osp-shell-internal-devel
30
31 # runtime requires
32 Requires: osp-appfw
33 Requires: osp-installer
34 Requires: osp-shell
35 Requires: capi-system-device
36 Requires: capi-system-info
37 Requires: sysman
38 Requires: capi-system-device
39 Requires(post): coreutils
40 Requires(post): /usr/bin/vconftool
41
42 Requires(post): coreutils
43
44 %description
45 osp application service
46
47 %prep
48 %setup -q
49
50 %build 
51 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
52 %ifarch %{ix86}
53 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
54 %else
55 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}
56 %endif
57
58 # Call make instruction with smp support
59 make %{?jobs:-j%jobs}
60
61 %install
62 rm -rf %{buildroot}
63 mkdir -p %{buildroot}/usr/share/license
64 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
65
66 %make_install
67
68 mkdir -p %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants
69 install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/user/osp-app-service.service
70 ln -s ../osp-app-service.service %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants/osp-app-service.service
71
72 mkdir -p %{buildroot}/etc/rc.d/rc3.d/
73 ln -s ../init.d/boot-osp.sh %{buildroot}/etc/rc.d/rc3.d/S44boot-osp
74
75 %post
76 #/bin/rm -f /etc/ld.so.cache
77 #/sbin/ldconfig
78
79 /bin/rm -f /etc/rc.d/rc3.d/S43osp-app-service
80 /bin/rm -f /etc/rc.d/rc3.d/S44osp-app-service
81 /bin/rm -f /etc/rc.d/rc3.d/S99osp-app-service
82 /bin/rm -fr /opt/apps/aospd00043
83 mkdir -p /usr/apps/aospd00043/lib
84
85 /usr/etc/package-manager/backend/tpk -i /usr/apps/aospd00043
86 cp -f %{_libdir}/osp/osp-system-service-loader /usr/apps/aospd00043/bin/osp-app-service
87 chmod +x /etc/rc.d/init.d/boot-osp.sh
88
89 vconftool set -t int memory/appservice/status -1 -i -u 5000
90
91 if [ ! -f /var/run/memory/appservice/mmc ]
92 then
93         vconftool set -t int memory/appservice/mmc -1 -i -u 5000
94 fi
95
96 if [ -f /usr/lib/rpm-plugins/msm.so ]
97 then
98         chsmack -a osp-app-service /usr/apps/aospd00043/lib
99         chsmack -a osp-app-service /usr/apps/aospd00043/bin/osp-app-service
100         chsmack -e osp-app-service /usr/apps/aospd00043/bin/osp-app-service
101 fi
102
103 %files
104 %manifest osp-app-service.manifest
105 /usr/share/license/%{name}
106 /usr/apps/*
107 /etc/rc.d/*
108 %{_libdir}/systemd/user/osp-app-service.service
109 %{_libdir}/systemd/user/core-efl.target.wants/osp-app-service.service