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