%{!?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: 3 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 ( 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 #check if rpm.rte installp is installed. typeset -i rpm_ht_3=0 rpm_rte_ver=`lslpp -Lc rpm.rte | awk 'FNR==2' | awk -F':' '{print $3}' | cut -d'.' -f1` if [[ $rpm_rte_ver -ge 4 ]] then rpm_ht_3=1 fi rpm -qa | grep "^rpm-4.9.1.3" if [[ $? -eq 0 ]] then rpm_ht_3=1 fi if [[ $rpm_ht_3 -ne 1 ]] then print "You doesn't seems to have rpm.rte 4.9.1.3 or higher version." print "Please update rpm.rte to latest version from ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/INSTALLP/ppc/" exit 1 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 * Wed Sep 6 2017 Sangamesh Mallayya - 0.10.3-3 - Modify pre install script to install if rpm installed is higher than - 4.9.1.3 * 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