b8b533df233dc1208f542285326a5e0b5bf696a2
[platform/core/appfw/app-svc.git] / packaging / app-svc.spec
1 %bcond_with x
2 %bcond_with wayland
3
4 Name:       app-svc
5 Summary:    Application Service
6 Version:    0.1.53
7 Release:    0
8 Group:      Application Framework/Service
9 License:    Apache-2.0
10 Source0:    %{name}-%{version}.tar.gz
11 Source1001: app-svc.manifest
12
13 Requires(post):     /sbin/ldconfig
14 Requires(postun):   /sbin/ldconfig
15 BuildRequires:      cmake
16 BuildRequires:      sqlite3
17 BuildRequires:      pkgconfig(dlog)
18 BuildRequires:      pkgconfig(ecore)
19 %if %{with x}
20 BuildRequires:      pkgconfig(x11)
21 BuildRequires:      pkgconfig(ecore-x)
22 %endif
23 BuildRequires:      pkgconfig(libprivilege-control)
24 BuildRequires:      pkgconfig(bundle)
25 BuildRequires:      pkgconfig(dbus-glib-1)
26 BuildRequires:      pkgconfig(xdgmime)
27 BuildRequires:      pkgconfig(aul)
28 BuildRequires:      pkgconfig(glib-2.0)
29 BuildRequires:      pkgconfig(libsoup-2.4)
30 BuildRequires:      pkgconfig(iniparser)
31 BuildRequires:      pkgconfig(pkgmgr-info)
32 BuildRequires:      pkgconfig(libtzplatform-config)
33 BuildRequires:      pkgconfig(sqlite3)
34
35
36 %description
37 Application Service
38
39 %package devel
40 Summary:    App svc
41 Group:      Development/Application Framework
42 Requires:   %{name} = %{version}-%{release}
43 %description devel
44 %devel_desc
45
46 %prep
47 %setup -q
48 sed -i %{SOURCE1001} -e "s|TZ_SYS_DB|%TZ_SYS_DB|g"
49 cp %{SOURCE1001} .
50
51 %build
52 %cmake . \
53 %if %{with wayland} && !%{with x}
54 -Dwith_wayland=TRUE
55 %else
56 -Dwith_x=TRUE
57 %endif
58
59 %__make %{?jobs:-j%jobs}
60
61 %install
62 %make_install
63
64 # Create database
65 mkdir -p %{buildroot}%{TZ_SYS_DB}
66 sqlite3 %{buildroot}%{TZ_SYS_DB}/.appsvc.db < data/appsvc_db.sql
67
68 %post -p /sbin/ldconfig
69
70 %postun -p /sbin/ldconfig
71
72 %files
73 %defattr(-,root,root,-)
74 %manifest %{name}.manifest
75 %license LICENSE
76 %config(noreplace) %verify(not md5 mtime size) %attr(664,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.appsvc.db
77 %config(noreplace) %verify(not md5 mtime size) %attr(664,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.appsvc.db-journal
78 %{_bindir}/appsvc_test
79 %{_libdir}/libappsvc.so.0
80 %{_libdir}/libappsvc.so.0.1.0
81
82 %files devel
83 %defattr(-,root,root,-)
84 %manifest %{name}.manifest
85 %{_libdir}/pkgconfig/appsvc.pc
86 %{_libdir}/libappsvc.so
87 %{_includedir}/appsvc/appsvc.h