f78a82415e3432383492504a05d36fb44e94b57b
[platform/core/appfw/launchpad.git] / packaging / launchpad.spec
1 Name:       launchpad
2 Summary:    Launchpad for launching applications
3 Version:    0.40.4
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 Source1001: %{name}.manifest
11 Source1002: lib%{name}.manifest
12 Source1003: %{name}-loader.manifest
13 Source1004: app-defined-loader.manifest
14
15 BuildRequires:  cmake
16 BuildRequires:  pkgconfig(aul)
17 BuildRequires:  pkgconfig(bundle)
18 BuildRequires:  pkgconfig(buxton2)
19 BuildRequires:  pkgconfig(capi-system-resource)
20 BuildRequires:  pkgconfig(dbus-1)
21 BuildRequires:  pkgconfig(dlog)
22 BuildRequires:  pkgconfig(dlog-redirect-stdout)
23 BuildRequires:  pkgconfig(ecore)
24 BuildRequires:  pkgconfig(elementary)
25 BuildRequires:  pkgconfig(gio-2.0)
26 BuildRequires:  pkgconfig(gmock)
27 BuildRequires:  pkgconfig(iniparser)
28 BuildRequires:  pkgconfig(libcap)
29 BuildRequires:  pkgconfig(libsmack)
30 BuildRequires:  pkgconfig(libsystemd)
31 BuildRequires:  pkgconfig(libtzplatform-config)
32 BuildRequires:  pkgconfig(libxml-2.0)
33 BuildRequires:  pkgconfig(parcel)
34 BuildRequires:  pkgconfig(pkgmgr-installer)
35 BuildRequires:  pkgconfig(security-manager)
36 BuildRequires:  pkgconfig(tanchor)
37 BuildRequires:  pkgconfig(tizen-shared-queue)
38 BuildRequires:  pkgconfig(ttrace)
39 BuildRequires:  pkgconfig(vconf)
40
41 Requires(post): /sbin/ldconfig
42 Requires(post): /usr/bin/systemctl
43 Requires(postun): /sbin/ldconfig
44 Requires(postun): /usr/bin/systemctl
45 Requires(preun): /usr/bin/systemctl
46
47 Provides: app-launchpad
48
49 %define tizen_feature_priority_change 0
50 %ifarch armv7l i686 i586
51 %define tizen_arch32 1
52 %else
53 %define tizen_arch32 0
54 %endif
55
56 %ifarch x86_64 i686 i586
57 %define tizen_emulator 1
58 %else
59 %define tizen_emulator 0
60 %endif
61
62 %if "%{?_prelink_enable}" == "y"
63 %define tizen_feature_prelink 1
64 %else
65 %define tizen_feature_prelink 0
66 %endif
67
68 %description
69 Launchpad for launching applications
70
71 %package devel
72 Summary:    Launchpad for launching applications (devel)
73 Group:      Development/Libraries
74 Requires:   liblaunchpad = %{version}-%{release}
75
76 %description devel
77 Launchpad for launching applications (devel)
78
79 %package -n launchpad-loader
80 Summary:    Launchpad-Loader for launching applications
81 Group:      Application Framework/Application Launcher
82
83 %description -n launchpad-loader
84 Launchpad-Loader for launching applications
85
86 %package -n app-defined-loader
87 Summary:    App-Defined-Loader for launching applications
88 Group:      Application Framework/Application Launcher
89
90 %description -n app-defined-loader
91 App-Defined-Loader for launching applications
92
93 %package -n liblaunchpad
94 Summary:    Launchpad library
95 Group:      Development/Libraries
96
97 %description -n liblaunchpad
98 Launchpad library
99
100 %package -n liblaunchpad-devel
101 Summary:    Launchpad library (devel)
102 Group:      Development/Libraries
103 Requires:   liblaunchpad = %{version}-%{release}
104
105 %description -n liblaunchpad-devel
106 Launchpad library (devel)
107
108 %package unittests
109 Summary:    %{name} unittests binary
110
111 %description unittests
112 unittests binary
113
114 %prep
115 %setup -q
116 cp %{SOURCE1001} .
117 cp %{SOURCE1002} .
118 cp %{SOURCE1003} .
119 cp %{SOURCE1004} .
120
121 %build
122 %if 0%{?sec_build_binary_debug_enable}
123 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
124 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
125 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
126 %endif
127 %if 0%{?tizen_feature_priority_change}
128 _TIZEN_FEATURE_PRIORITY_CHANGE=ON
129 %endif
130 %if 0%{?tizen_arch32}
131 _TIZEN_FEATURE_SET_PERSONALITY_32=ON
132 %else
133 _TIZEN_FEATURE_LOADER_ARCH64=ON
134 %endif
135 %if 0%{?tizen_feature_prelink}
136 _TIZEN_FEATURE_PRELINK=ON
137 %endif
138
139 %if 0%{?tizen_emulator}
140 HW_LOADER_THREADS=7
141 %else
142 HW_LOADER_THREADS=8
143 %endif
144
145 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
146 %cmake -DVERSION=%{version} \
147         -DMAJORVER=${MAJORVER} \
148         -DHW_LOADER_THREADS=${HW_LOADER_THREADS} \
149         -D_TIZEN_FEATURE_PRIORITY_CHANGE:BOOL=${_TIZEN_FEATURE_PRIORITY_CHANGE} \
150         -D_TIZEN_FEATURE_SET_PERSONALITY_32:BOOL=${_TIZEN_FEATURE_SET_PERSONALITY_32} \
151         -D_TIZEN_FEATURE_PRELINK:BOOL=${_TIZEN_FEATURE_PRELINK} \
152         -D_TIZEN_FEATURE_LOADER_ARCH64:BOOL=${_TIZEN_FEATURE_LOADER_ARCH64} \
153         .
154 %__make %{?_smp_mflags}
155
156 %check
157 export LD_LIBRARY_PATH="../../src/lib/launchpad-common/:../../src/lib/launchpad-glib"
158 ctest --verbose %{?_smp_mflags}
159
160 %install
161 rm -rf %{buildroot}
162
163
164 %make_install
165 mkdir -p %{buildroot}%{_unitdir_user}/basic.target.wants
166 mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
167 install -m 0644 %SOURCE101 %{buildroot}%{_unitdir_user}/launchpad-process-pool.service
168 install -m 0644 %SOURCE102 %{buildroot}%{_unitdir_user}/launchpad-process-pool.socket
169 ln -sf ../launchpad-process-pool.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/launchpad-process-pool.socket
170 ln -sf ../launchpad-process-pool.service %{buildroot}%{_unitdir_user}/basic.target.wants/launchpad-process-pool.service
171
172 %post
173 lns -sf /usr/bin/false /usr/bin/process-pool
174
175 %files
176 %manifest launchpad.manifest
177 %license LICENSE
178 %{_prefix}/share/aul/default.debugger
179 %{_unitdir_user}/launchpad-process-pool.service
180 %{_unitdir_user}/launchpad-process-pool.socket
181 %{_unitdir_user}/sockets.target.wants/launchpad-process-pool.socket
182 %{_unitdir_user}/basic.target.wants/launchpad-process-pool.service
183 %{_bindir}/launchpad-process-pool
184 %{_prefix}/share/aul/launchpad.conf
185 %{_sysconfdir}/package-manager/parserlib/liblaunchpad-parser.so
186 %{_datadir}/parser-plugins/*
187 %attr(0644,root,root) %{_libdir}/liblaunchpad-common.so.*
188 %attr(0644,root,root) %{_libdir}/liblaunchpad-glib.so.*
189
190 %files devel
191 %{_includedir}/launchpad/*.h
192 %{_includedir}/launchpad-common/*.hh
193 %{_includedir}/launchpad-glib/*.hh
194 %{_libdir}/*.so
195 %{_libdir}/pkgconfig/launchpad.pc
196 %attr(0644,root,root) %{_libdir}/liblaunchpad-common.so
197 %{_libdir}/pkgconfig/liblaunchpad-common.pc
198 %attr(0644,root,root) %{_libdir}/liblaunchpad-glib.so
199 %{_libdir}/pkgconfig/liblaunchpad-glib.pc
200
201 %files -n launchpad-loader
202 %manifest launchpad-loader.manifest
203 %license LICENSE
204 %{_prefix}/share/aul/default.loader
205 %{_bindir}/launchpad-loader
206
207 %files -n app-defined-loader
208 %manifest app-defined-loader.manifest
209 %license LICENSE
210 %{_prefix}/share/aul/app-defined-loader.conf
211 %{_bindir}/app-defined-loader
212
213 %files -n liblaunchpad
214 %manifest liblaunchpad.manifest
215 %license LICENSE
216 %attr(0644,root,root) %{_libdir}/liblaunchpad.so.*
217 %attr(0644,root,root) %{_libdir}/liblaunchpad-hydra.so.*
218
219 %files -n liblaunchpad-devel
220 %{_includedir}/launchpad/*.h
221 %{_libdir}/*.so
222 %{_libdir}/pkgconfig/liblaunchpad.pc
223 %{_libdir}/pkgconfig/liblaunchpad-hydra.pc
224
225 %files unittests
226 %{_bindir}/launchpad-process-pool-unittest