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