1d046ee4177b8168aacf0dc9495f02c1f22fe691
[platform/core/appfw/launchpad.git] / packaging / launchpad.spec
1 Name:       launchpad
2 Summary:    Launchpad for launching applications
3 Version:    0.3.7
4 Release:    1
5 Group:      Application Framework/Daemons
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source101:  launchpad-process-pool.service
9 Source102:  launchpad-process-pool.socket
10
11
12 BuildRequires:  cmake
13 BuildRequires:  pkgconfig(bundle)
14 BuildRequires:  pkgconfig(gio-2.0)
15 BuildRequires:  pkgconfig(ecore)
16 BuildRequires:  pkgconfig(dlog)
17 BuildRequires:  pkgconfig(libsystemd)
18 BuildRequires:  pkgconfig(elementary)
19 BuildRequires:  pkgconfig(vconf)
20 BuildRequires:  pkgconfig(buxton2)
21 BuildRequires:  pkgconfig(security-manager)
22 BuildRequires:  pkgconfig(aul)
23 BuildRequires:  pkgconfig(ttrace)
24 BuildRequires:  pkgconfig(libtzplatform-config)
25 BuildRequires:  pkgconfig(libcap)
26 BuildRequires:  pkgconfig(tanchor)
27
28 Requires(post): /sbin/ldconfig
29 Requires(post): /usr/bin/systemctl
30 Requires(postun): /sbin/ldconfig
31 Requires(postun): /usr/bin/systemctl
32 Requires(preun): /usr/bin/systemctl
33
34 Provides: app-launchpad
35 Obsoletes: amd-mod-launchpad
36
37 %define tizen_feature_priority_change 0
38 %define tizen_feature_loader_priority 0
39 %ifarch armv7l i586
40 %define tizen_arch32 1
41 %else
42 %define tizen_arch32 0
43 %endif
44
45 %description
46 Launchpad for launching applications
47
48 %package devel
49 Summary:    Launchpad for launching applications (devel)
50 Group:      Development/Libraries
51 Requires:   %{name} = %{version}-%{release}
52
53 %description devel
54 Launchpad for launching applications (devel)
55
56 %package -n launchpad-loader
57 Summary:    Launchpad-Loader for launching applications
58 Group:      Application Framework/Application Launcher
59
60 %description -n launchpad-loader
61 Launchpad-Loader for launching applications
62
63 %prep
64 %setup -q
65
66 %build
67 %if 0%{?sec_build_binary_debug_enable}
68 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
69 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
70 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
71 %endif
72 %if 0%{?tizen_feature_priority_change}
73 _TIZEN_FEATURE_PRIORITY_CHANGE=ON
74 %endif
75 %if 0%{?tizen_feature_loader_priority}
76 _TIZEN_FEATURE_LOADER_PRIORITY=ON
77 %endif
78 %if 0%{?tizen_arch32}
79 _TIZEN_FEATURE_SET_PERSONALITY_32=ON
80 %endif
81
82 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
83 %cmake -DVERSION=%{version} \
84         -DMAJORVER=${MAJORVER} \
85         -D_TIZEN_FEATURE_PRIORITY_CHANGE:BOOL=${_TIZEN_FEATURE_PRIORITY_CHANGE} \
86         -D_TIZEN_FEATURE_LOADER_PRIORITY:BOOL=${_TIZEN_FEATURE_LOADER_PRIORITY} \
87         -D_TIZEN_FEATURE_SET_PERSONALITY_32:BOOL=${_TIZEN_FEATURE_SET_PERSONALITY_32} \
88         .
89 %__make %{?_smp_mflags}
90
91 %install
92 rm -rf %{buildroot}
93
94 %make_install
95 mkdir -p %{buildroot}%{_unitdir_user}/basic.target.wants
96 mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
97 install -m 0644 %SOURCE101 %{buildroot}%{_unitdir_user}/launchpad-process-pool.service
98 install -m 0644 %SOURCE102 %{buildroot}%{_unitdir_user}/launchpad-process-pool.socket
99 ln -sf ../launchpad-process-pool.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/launchpad-process-pool.socket
100 ln -sf ../launchpad-process-pool.service %{buildroot}%{_unitdir_user}/basic.target.wants/launchpad-process-pool.service
101
102 %post
103
104 %files
105 %manifest launchpad.manifest
106 %license LICENSE
107 %{_prefix}/share/aul/default.debugger
108 %{_unitdir_user}/launchpad-process-pool.service
109 %{_unitdir_user}/launchpad-process-pool.socket
110 %{_unitdir_user}/sockets.target.wants/launchpad-process-pool.socket
111 %{_unitdir_user}/basic.target.wants/launchpad-process-pool.service
112 %if 0%{?tizen_feature_priority_change} || 0%{?tizen_feature_loader_priority}
113 %caps(cap_mac_admin,cap_dac_override,cap_setgid,cap_sys_admin,cap_sys_nice=ei) %{_bindir}/launchpad-process-pool
114 %else
115 %caps(cap_mac_admin,cap_dac_override,cap_setgid,cap_sys_admin=ei) %{_bindir}/launchpad-process-pool
116 %endif
117 %attr(0644,root,root) %{_libdir}/liblaunchpad.so.*
118
119 %files devel
120 %{_includedir}/launchpad/*.h
121 %{_libdir}/*.so
122 %{_libdir}/pkgconfig/*.pc
123
124 %files -n launchpad-loader
125 %manifest %{name}.manifest
126 %license LICENSE
127 %{_prefix}/share/aul/default.loader
128 %if 0%{?tizen_feature_priority_change} || 0%{?tizen_feature_loader_priority}
129 %caps(cap_setgid,cap_sys_admin,cap_sys_nice=ei) %{_bindir}/launchpad-loader
130 %else
131 %caps(cap_setgid,cap_sys_admin=ei) %{_bindir}/launchpad-loader
132 %endif