Name: pkgmgr-info
Summary: Packager Manager infomation api for package
-Version: 0.0.107
+Version: 0.8.0
Release: 1
Group: Application Framework/Package Management
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-BuildRequires: cmake
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(sqlite3)
-BuildRequires: pkgconfig(db-util)
-BuildRequires:pkgconfig(libxml-2.0)
+Source1001: pkgmgr-info.manifest
+BuildRequires: cmake
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(sqlite3)
+BuildRequires: pkgconfig(db-util)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(libsmack)
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(minizip)
%description
Packager Manager infomation api for packaging
%package devel
Summary: Packager Manager infomation api (devel)
-Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Packager Manager infomation api (devel)
%package parser
Summary: Library for manifest parser
-Group: Application Framework/Package Management
Requires: %{name} = %{version}-%{release}
%description parser
%package parser-devel
Summary: Dev package for libpkgmgr-parser
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-parser = %{version}-%{release}
+Requires: pkgconfig(libtzplatform-config)
%description parser-devel
Dev package for libpkgmgr-parser
%prep
%setup -q
+cp %{SOURCE1001} .
%build
-%cmake .
-make %{?jobs:-j%jobs}
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
+ -DTIZEN_MAJOR_VER=%{tizen_version_major} \
+ -DTIZEN_MINOR_VER=%{tizen_version_minor} \
+ -DTIZEN_PATCH_VER=%{tizen_version_patch} \
+ -DUNITDIR=%{_unitdir}
+
+%__make %{?jobs:-j%jobs}
%install
%make_install
-%post
-
-mkdir -p /opt/usr/apps/tmp
-chown 5100:5100 /opt/usr/apps/tmp
-chmod 771 /opt/usr/apps/tmp
-chsmack -a '*' /opt/usr/apps/tmp
-chsmack -t /opt/usr/apps/tmp
+mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
+ln -sf ../pkg-db-recovery.service %{buildroot}%{_unitdir}/multi-user.target.wants/pkg-db-recovery.service
-touch /opt/usr/apps/tmp/pkgmgr_tmp.txt
+%post
+/sbin/ldconfig
-chsmack -a 'pkgmgr::db' /opt/usr/apps/tmp/pkgmgr_tmp.txt
+%postun -p /sbin/ldconfig
-%postun
+%post -n pkgmgr-info-parser -p /sbin/ldconfig
+%postun -n pkgmgr-info-parser -p /sbin/ldconfig
%files
-%manifest pkgmgr-info.manifest
+%manifest %{name}.manifest
+%license LICENSE
%defattr(-,root,root,-)
%{_libdir}/libpkgmgr-info.so.*
+%{_bindir}/pkg-db-recovery
+%{_unitdir}/pkg-db-recovery.service
+%{_unitdir}/multi-user.target.wants/pkg-db-recovery.service
%files devel
+%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{_includedir}/pkgmgr-info.h
+%{_includedir}/*.h
%{_libdir}/pkgconfig/pkgmgr-info.pc
%{_libdir}/libpkgmgr-info.so
%files parser
-%manifest pkgmgr-parser.manifest
+%manifest %{name}.manifest
+%license LICENSE
%defattr(-,root,root,-)
%{_libdir}/libpkgmgr_parser.so.*
-%{_prefix}/etc/package-manager/preload/preload_list.txt
-%{_prefix}/etc/package-manager/preload/manifest.xsd
-%{_prefix}/etc/package-manager/preload/xml.xsd
-%{_prefix}/etc/package-manager/parser_path.conf
+%config %{_sysconfdir}/package-manager/preload/manifest.xsd
+%config %{_sysconfdir}/package-manager/preload/xml.xsd
+%config %{_sysconfdir}/package-manager/parser_path.conf
+%config %{_sysconfdir}/package-manager/parserlib/metadata/mdparser_list.txt
+%config %{_sysconfdir}/package-manager/parserlib/category/category_parser_list.txt
+%config %{_sysconfdir}/package-manager/parserlib/tag_parser_list.txt
%files parser-devel
+%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{_includedir}/pkgmgr/pkgmgr_parser.h
-%{_includedir}/pkgmgr/pkgmgr_parser_db.h
+%{_includedir}/pkgmgr/*.h
%{_libdir}/pkgconfig/pkgmgr-parser.pc
%{_libdir}/libpkgmgr_parser.so