%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %if ! 1%{?rhel} # we don't have this in rhel yet... BuildRequires: bash-completion %endif # disable broken /usr/lib/rpm/brp-python-bytecompile %define __os_install_post %{nil} %define compdir %(pkg-config --variable=completionsdir bash-completion) %if "%{compdir}" == "" %define compdir "/opt/freeware/etc/bash_completion.d" %endif Summary: Creates a common metadata repository Name: createrepo Version: 0.10.3 Release: 2 License: GPL Group: System Environment/Base Source: %{name}-%{version}.tar.gz URL: http://createrepo.baseurl.org/ Patch0: createrepo-%{version}-optdir.patch Patch1: createrepo-%{version}-supress_stderr.patch BuildRoot: %{_tmppath}/%{name}-%{version}root BuildArch: noarch Requires: python >= 2.1, libxml2-python >= 2.7.8 Requires: yum-metadata-parser, yum >= 3.2.29, python-deltarpm, xz, xz-libs %description This utility will generate a common metadata repository from a directory of rpm packages %prep %setup -q %patch0 %patch1 %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install echo "######### $RPM_BUILD_ROOT" ( cd $RPM_BUILD_ROOT # same as %{buildroot} for dir in bin do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done mkdir -p usr/lib cd usr/lib ln -sf ../..%{_prefix}/lib/* . cd - ) %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %pre rpm -qa | grep rpm-4.9.1.3 if [[ $? -eq 0 ]] then rpm -qa | grep rpm-devel-python if [[ $? -ne 0 ]] then echo "You seems to have installed rpm package rpm-4.9.1.3" echo "For createrepo you need to install rpm-devel-python as well" exit 1 fi else rpm_rte_ver=`lslpp -L | grep rpm.rte | awk '{print $2}'` if [[ $rpm_rte_ver != "4.9.1.3" ]] then echo "You doesn't seem to have installed rpm.rte-4.9.1.3 which is required for createrepo" echo "Please install the rpm.rte" exit 1 fi fi %files %defattr(-, root, root) %dir %{_datadir}/%{name} %doc ChangeLog README COPYING COPYING.lib %(dirname %{compdir}) %{_datadir}/%{name}/* %{_bindir}/%{name} %{_bindir}/modifyrepo %{_bindir}/mergerepo /usr/bin/* %{_mandir}/man8/createrepo.8* %{_mandir}/man1/modifyrepo.1* %{_mandir}/man1/mergerepo.1* #%{_datadir}/man8/createrepo.8* #%{_datadir}/man1/modifyrepo.1* #%{_datadir}/man1/mergerepo.1* %{python_sitelib}/createrepo %changelog * Thu Oct 6 2016 Sangamesh Mallayya - Add LIBPATH as /opt/freeware/lib:/usr/lib:/lib to createrepo wrapper script - so that creatrepo works fine. * Tue May 13 2014 Sangamesh Mallayya - Adapted for AIX Toolbox * Fri Sep 9 2011 Seth Vidal - add lzma dep * Wed Jan 26 2011 Seth Vidal - bump to 0.9.9 - add worker.py * Thu Aug 19 2010 Seth Vidal - increase yum requirement for the modifyrepo use of RepoMD, RepoData and RepoMDError * Fri Aug 28 2009 Seth Vidal - 0.9.8 * Tue Mar 24 2009 Seth Vidal - 0.9.7 * Fri Oct 17 2008 Seth Vidal - add mergerepo - 0.9.6 * Mon Feb 18 2008 Seth Vidal - 0.9.5 * Mon Jan 28 2008 Seth Vidal - 0.9.4 * Tue Jan 22 2008 Seth Vidal - 0.9.3 * Thu Jan 17 2008 Seth Vidal - significant api changes * Tue Jan 8 2008 Seth Vidal - 0.9.1 - lots of fixes - cleanup changelog, too * Thu Dec 20 2007 Seth Vidal - beginning of the new version