From b082805e7344c42c24516fca9769e0d0133e84be Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Thu, 5 Dec 2024 21:43:39 -0500 Subject: [PATCH] * Thu Dec 05 2019 josef radinger - 0.1-1 - initial version --- .gitattributes | 1 + python2-rpmUtils.spec | 81 +++++++++++++++++++++---------------------- rpmUtils-0.1.tar.bz2 | 3 ++ 3 files changed, 43 insertions(+), 42 deletions(-) create mode 100644 rpmUtils-0.1.tar.bz2 diff --git a/.gitattributes b/.gitattributes index a3b625f..6d9820c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ *.tar.gz filter=lfs diff=lfs merge=lfs -text *.tgz filter=lfs diff=lfs merge=lfs -text *.tar.xz filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text diff --git a/python2-rpmUtils.spec b/python2-rpmUtils.spec index 5c8c595..ba3d418 100644 --- a/python2-rpmUtils.spec +++ b/python2-rpmUtils.spec @@ -1,54 +1,51 @@ -%define name python2-rpmUtils -%define version 1.0 -%define release 1 -Summary: This is what python2-rpmUtils does. -Name: %{name} -Version: %{version} -Release: %{release}%{?dist} -Source: %{name}-%{version}.tar.gz -License: GNU GPL version 2 -Group: SMEserver/addon -BuildRoot: %{_tmppath}/%{name}-buildroot -Prefix: %{_prefix} -BuildArchitectures: noarch -BuildRequires: smeserver-devtools -Requires: smeserver-release >= 11.0 -AutoReqProv: no +Name: python-rpmUtils +Version: 0.1 +Release: 1%{?dist} +Summary: python rpmUtils + +License: GPLv2+ +URL: none +Source0: rpmUtils-%{version}.tar.bz2 +BuildArch: noarch %description -python2-rpmUtils - python rpmUtils +taken from yum with slightly adaptions in Makefile +Needed for eg. repoview, or for checking rpm-versions (taken from +https://stackoverflow.com/questions/3206319/how-do-i-compare-rpm-versions-in-python): -%changelog -* Day MMMM DD YYYY 1.0-1.sme -- Initial code - create RPM [SME:99999] +import rpmUtils.miscutils +>>> rpmUtils.miscutils.compareEVR(("foo", "3.7.4", "1"), ("foo", "3.7.4", "1")) +0 +>>> rpmUtils.miscutils.compareEVR(("foo", "3.7.4", "1"), ("foo", "3.7.4a", "1")) +-1 +>>> rpmUtils.miscutils.compareEVR(("foo", "3.7.4a", "1"), ("foo", "3.7.4", "1")) +1 + +%package -n python2-rpmUtils +Summary: %{summary} +%{?python_provide:%python_provide python2-rpmUtils} +BuildRequires: python2-devel +BuildRequires: make + +%description -n python2-rpmUtils +%{description} + +Python 2 version. %prep - -%setup -q +%autosetup -n rpmUtils-%{version} %build +# empty %install -rm -rf $RPM_BUILD_ROOT -(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) -rm -f %{name}-%{version}-filelist -/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ -> %{name}-%{version}-filelist -#echo "%doc COPYING" >> %{name}-%{version}-filelist -#--dir 'attr(755,user,grp)' \ -#--file 'attr(755,root,root)' \ +make DESTDIR=$RPM_BUILD_ROOT install -%clean -cd .. -rm -rf %{name}-%{version} +%files -n python2-rpmUtils +%{python2_sitelib}/rpmUtils/* +%dir %{python2_sitelib}/rpmUtils/ -%pre +%changelog +* Thu Dec 05 2019 josef radinger - 0.1-1 +- initial version -%preun - -%post - -%postun -#uninstall -%files -f %{name}-%{version}-filelist -%defattr(-,root,root) diff --git a/rpmUtils-0.1.tar.bz2 b/rpmUtils-0.1.tar.bz2 new file mode 100644 index 0000000..43c81a6 --- /dev/null +++ b/rpmUtils-0.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4d4f3e4d02c8b6514ed71c35cdc547a9fcfb9d630939302eb7610b8ca2d3bc3 +size 17908