%define name poldek %define major 0 %define libname %mklibname %name %major %define develname %mklibname %name -d Summary: PLD RPM packages management helper tool Name: %name Version: 0.20 Release: %mkrel 55563 License: GPLv2 Group: System/Configuration/Packaging URL: http://poldek.pld-linux.org/ Source0: http://poldek.pld-linux.org/download/%{name}-%{version}.tar.bz2 Patch0: poldek-0.20-oldtag.patch Patch1: poldek-0.20-sourcepackage.patch Patch2: poldek-rpm-4.4.8.patch Patch3: poldek-0.20-fix-rpmlib-detection.patch Patch4: poldek-0.20-fix-check-detection.patch Patch5: poldek-0.20-fix-format-errors.patch Patch6: poldek-0.20-fix-underlinking.patch Patch7: poldek-0.20-add-missing-header.patch Patch8: poldek-0.20-rpm-4.6-compatibility.patch BuildRequires: bzip2-devel BuildRequires: rpm-devel BuildRequires: openssl-devel BuildRequires: readline-devel BuildRequires: zlib-devel BuildRequires: pcre-devel BuildRequires: ncurses-devel BuildRequires: db4.7-devel BuildRequires: gettext-devel BuildRequires: libxml2-devel BuildRoot: %_tmppath/%name-%version-%release-root %description poldek is an RPM package management tool which allows you to easily perform package verification, installation (including system installation from scratch), upgrading, and removal. Program can be used in batch (like apt-get from Debian's APT) or interactive mode. The interactive mode puts you into a readline interface with command line autocompletion and history, similar to the shell mode of Perl's CPAN. %package -n %libname Summary: Library from poldek Group: System/Libraries Provides: lib%name = %version-%release %description -n %libname poldek is an RPM package management tool which allows you to easily perform package verification, installation (including system installation from scratch), upgrading, and removal. This package contain libraries from poldek %package -n %develname Summary: Development files from poldek Group: Development/Other Provides: %name-devel = %version-%release Obsoletes: develname %mklibname %name -d 0 Requires: %libname = %version-%release %description -n %develname poldek is an RPM package management tool which allows you to easily perform package verification, installation (including system installation from scratch), upgrading, and removal. This package contain development files need to build programs using poldek library. %prep %setup -q %patch0 -p0 -b .oldtag~ %patch1 -p0 -b .sourcepackage~ %patch2 -p0 -b .rpm-448~ %patch3 -p1 -b .rpmlib~ %patch4 -p1 -b .check~ %patch5 -p1 -b .format~ %patch6 -p1 -b .link~ %patch7 -p1 -b .header~ %patch8 -p1 -b .rpm46~ %build autoreconf -f -i %configure2_5x %{?_with_static:--enable-static} echo "#define _RPM_4_4_COMPAT 1" >> config.h %make %install rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir} %{__make} install DESTDIR=%{buildroot} perl -pi -e 's/_distro\s+=\s+pld/_distro = %_vendor/' %buildroot/%_sysconfdir/%name/%name.conf cat > %buildroot/%_sysconfdir/%name/%_vendor-source.conf <<EOF # Your mandriva version _mdv_version = %mandriva_release # Your _mdv_arch = %mandriva_arch # Setup path to repository #_prefix = ftp://server/.../MandrivaLinux/devel [source] name = main type = hdrl url = %{_prefix}/%{_mdv_version}/%{_mdv_arch}/media/main/media_info/hdlist.cz prefix = %{_prefix}/%{_mdv_version}/%{_mdv_arch}/media/main [source] name = contrib type = hdrl url = %{_prefix}/%{_mdv_version}/%{_mdv_arch}/media/contrib/media_info/hdlist.cz prefix = %{_prefix}/%{_mdv_version}/%{_mdv_arch}/media/contrib #[source] #name = jpackage #type = hdrl #url = %{_prefix}/%{_mdv_version}/%{_mdv_arch}/media/jpackage/media_info/hdlist.cz #prefix = %{_prefix}/%{_mdv_version}/%{_mdv_arch}/media/jpackage EOF %find_lang %{name} %clean rm -rf %{buildroot} %post %_install_info %name.info %postun %_remove_install_info %name.info %if %mdkversion < 200900 %post -n %libname -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %libname -p /sbin/ldconfig %endif %files -f %name.lang %defattr(-,root,root) %doc README* *sample* NEWS TODO %dir %{_sysconfdir}/%{name} %attr(644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/* %attr(755,root,root) %{_bindir}/* %{_mandir}/man1/%{name}* %{_mandir}/pl/man1/%{name}* %{_infodir}/poldek.* %files -n %libname %defattr(-,root,root) %doc README* *sample* NEWS TODO %_libdir/*.so.* %_libdir/poldek %files -n %develname %defattr(-,root,root) %doc README* *sample* NEWS TODO %_includedir/* %_libdir/*.a %_libdir/*.la %_libdir/*.so %changelog * Tue Apr 20 2010 Funda Wang <fwang@mandriva.org> 0.20-55563mdv2010.1 + Revision: 536917 - use db 4.7 * Tue Sep 15 2009 Thierry Vignaud <tv@mandriva.org> 0.20-55563mdv2010.0 + Revision: 441888 - rebuild * Thu Mar 05 2009 Per Ãyvind Karlsen <peroyvind@mandriva.org> 0.20-55562mdv2009.1 + Revision: 348737 - add another buildrequires: libxml2-devel - fix remaining string format issues (updates P5) - fix underlinking (P6) - include missing dirent.h for 'DIR' type (P7) - fix build with rpm 4.6.0 (P8) - add missing buildrequires on gettext-devel + Guillaume Rousse <guillomovitch@mandriva.org> - disable --as-needed and --no-undefined linker flags, they break libtool - fix format errors - fix rpmbuild detection - fix check lib detection + Thierry Vignaud <tv@mandriva.org> - rebuild - rebuild + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Mon Mar 10 2008 Gustavo De Nardin <gustavodn@mandriva.com> 0.20-55558mdv2008.1 + Revision: 183251 - rebuild for new rpm - fixed License tag + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tv@mandriva.org> - kill re-definition of %%buildroot on Pixel's request * Sun Jun 10 2007 Olivier Thauvin <nanardon@mandriva.org> 0.20-55557mdv2008.0 + Revision: 37739 - rebuild + patch 2 for rpm 4.4.8 * Tue May 01 2007 Crispin Boylan <crisb@mandriva.org> 0.20-55556mdv2008.0 + Revision: 19919 - Rebuild for new libbeecrypt * Thu Jan 04 2007 Crispin Boylan <crisb@mandriva.org> 0.20-55555mdv2007.0 + Revision: 104045 - Rebuild to kill db4.1 dep + Olivier Thauvin <nanardon@mandriva.org> - poldek-0.20-4mdv2007.0 - poldek-0.20-2mdv2007.0 - import poldek