Release version 0.17.5
[platform/core/appfw/pkgmgr-info.git] / packaging / pkgmgr-info.spec
1 Name:       pkgmgr-info
2 Summary:    Packager Manager infomation api for package
3 Version:    0.17.5
4 Release:    1
5 Group:      Application Framework/Package Management
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001: pkgmgr-info.manifest
9 BuildRequires: cmake
10 BuildRequires: pkgconfig(dlog)
11 BuildRequires: pkgconfig(glib-2.0)
12 BuildRequires: pkgconfig(gio-2.0)
13 BuildRequires: pkgconfig(vconf)
14 BuildRequires: pkgconfig(sqlite3)
15 BuildRequires: pkgconfig(libxml-2.0)
16 BuildRequires: pkgconfig(libtzplatform-config)
17 BuildRequires: pkgconfig(libsmack)
18 BuildRequires: pkgconfig(bundle)
19 BuildRequires: pkgconfig(capi-system-info)
20 BuildRequires: pkgconfig(minizip)
21
22 %description
23 Packager Manager infomation api for packaging
24
25 %package devel
26 Summary:    Packager Manager infomation api (devel)
27 Requires:   %{name} = %{version}-%{release}
28 %description devel
29 Packager Manager infomation api (devel)
30
31 %package parser
32 Summary:    Library for manifest parser
33 Requires:   %{name} = %{version}-%{release}
34
35 %description parser
36 Library for manifest parser
37
38 %package parser-devel
39 Summary:    Dev package for libpkgmgr-parser
40 Requires:   %{name}-parser = %{version}-%{release}
41 Requires:       pkgconfig(libtzplatform-config)
42
43 %description parser-devel
44 Dev package for libpkgmgr-parser
45
46
47 %prep
48 %setup -q
49 cp %{SOURCE1001} .
50
51 %build
52 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
53 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DUNITDIR=%{_unitdir}
54
55 %__make %{?jobs:-j%jobs}
56
57 %install
58 %make_install
59
60 mkdir -p %{buildroot}%{_unitdir}/basic.target.wants
61 ln -sf ../pkg-db-recovery.service %{buildroot}%{_unitdir}/basic.target.wants/pkg-db-recovery.service
62
63 %post
64 /sbin/ldconfig
65
66 %postun -p /sbin/ldconfig
67
68 %post -n pkgmgr-info-parser -p /sbin/ldconfig
69
70 %postun  -n pkgmgr-info-parser -p /sbin/ldconfig
71
72 %files
73 %manifest %{name}.manifest
74 %license LICENSE
75 %defattr(-,root,root,-)
76 %{_libdir}/libpkgmgr-info.so.*
77 %{_bindir}/pkg-db-recovery
78 %{_bindir}/pkg-db-creator
79 %{_unitdir}/pkg-db-recovery.service
80 %{_unitdir}/basic.target.wants/pkg-db-recovery.service
81
82 %files devel
83 %manifest %{name}.manifest
84 %defattr(-,root,root,-)
85 %{_includedir}/*.h
86 %{_libdir}/pkgconfig/pkgmgr-info.pc
87 %{_libdir}/libpkgmgr-info.so
88
89 %files parser
90 %manifest %{name}.manifest
91 %license LICENSE
92 %defattr(-,root,root,-)
93 %{_libdir}/libpkgmgr_parser.so.*
94 %config %{_sysconfdir}/package-manager/preload/manifest.xsd
95 %config %{_sysconfdir}/package-manager/preload/xml.xsd
96 %config %{_sysconfdir}/package-manager/parser_path.conf
97 %config %{_sysconfdir}/package-manager/parserlib/metadata/mdparser_list.txt
98 %config %{_sysconfdir}/package-manager/parserlib/category/category_parser_list.txt
99 %config %{_sysconfdir}/package-manager/parserlib/tag_parser_list.txt
100 %config %{_sysconfdir}/package-manager/pkg_db_version.txt
101
102 %files parser-devel
103 %manifest %{name}.manifest
104 %defattr(-,root,root,-)
105 %{_includedir}/pkgmgr/*.h
106 %{_libdir}/pkgconfig/pkgmgr-parser.pc
107 %{_libdir}/libpkgmgr_parser.so