diff --git a/.gitignore b/.gitignore index 30b8cb8..21e7229 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/hawkey-1f8334eed146f26c290780c33e77dd3eba72b49c.tar.gz +SOURCES/hawkey-0.5.6.tar.gz diff --git a/.hawkey.metadata b/.hawkey.metadata index 5f7e770..4d66969 100644 --- a/.hawkey.metadata +++ b/.hawkey.metadata @@ -1 +1 @@ -1a5ae6edcf17040928d7191774ac588933bab0df SOURCES/hawkey-1f8334eed146f26c290780c33e77dd3eba72b49c.tar.gz +b4a4c42e8f57b31b1477ab4dd26369fb11e71728 SOURCES/hawkey-0.5.6.tar.gz diff --git a/SPECS/hawkey.spec b/SPECS/hawkey.spec index 7358302..4b05e39 100644 --- a/SPECS/hawkey.spec +++ b/SPECS/hawkey.spec @@ -1,21 +1,31 @@ -%global gitrev 1f8334eed146f26c290780c33e77dd3eba72b49c %global libsolv_version 0.6.4-1 +%if 0%{?rhel} <= 7 +%bcond_with python3 +%endif + Name: hawkey -Version: 0.5.0 -Release: 2%{?dist} +Version: 0.5.6 +Release: 3.atomic.0%{?dist} Summary: Library providing simplified C and Python API to libsolv Group: System Environment/Libraries License: LGPLv2+ URL: https://github.com/rpm-software-management/%{name} -Source0: https://github.com/rpm-software-management/%{name}/archive/%{gitrev}/%{name}-%{gitrev}.tar.gz +# git clone https://github.com/rpm-software-management/hawkey.git && cd hawkey && tito build --tgz +Source0: https://github.com/rpm-software-management/%{name}/archive/%{name}-%{version}.tar.gz BuildRequires: libsolv-devel >= %{libsolv_version} BuildRequires: cmake expat-devel rpm-devel zlib-devel check-devel Requires: libsolv%{?_isa} >= %{libsolv_version} # prevent provides from nonstandard paths: %filter_provides_in %{python_sitearch}/.*\.so$ +%if %{with python3} +%filter_provides_in %{python3_sitearch}/.*\.so$ +%endif # filter out _hawkey_testmodule.so DT_NEEDED _hawkeymodule.so: %filter_requires_in %{python_sitearch}/hawkey/test/.*\.so$ +%if %{with python3} +%filter_requires_in %{python3_sitearch}/hawkey/test/.*\.so$ +%endif %filter_setup %description @@ -35,25 +45,65 @@ Summary: Python 2 bindings for the hawkey library Group: Development/Languages BuildRequires: python2-devel BuildRequires: python-nose -BuildRequires: python-sphinx +%if %{with python3} +BuildRequires: python-sphinx >= 1.1.3-9 +%else +BuildRequires: python-sphinx +%endif Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python-hawkey Python 2 bindings for the hawkey library. +%if %{with python3} +%package -n python3-hawkey +Summary: Python 3 bindings for the hawkey library +Group: Development/Languages +BuildRequires: python3-devel +BuildRequires: python3-nose +BuildRequires: python3-sphinx >= 1.1.3-9 +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n python3-hawkey +Python 3 bindings for the hawkey library. +%endif + %prep -%setup -q -n %{name}-%{gitrev} +%setup -q -n %{name}-%{version} + +%if %{with python3} +rm -rf py3 +mkdir ../py3 +cp -a . ../py3/ +mv ../py3 ./ +%endif %build %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo . make %{?_smp_mflags} make doc-man +%if %{with python3} +pushd py3 +%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3. +make %{?_smp_mflags} +make doc-man +popd +%endif + %check make ARGS="-V" test +%if %{with python3} +./py3/tests/python/tests/run_nosetests.sh +%endif %install make install DESTDIR=$RPM_BUILD_ROOT +%if %{with python3} +pushd py3 +make install DESTDIR=$RPM_BUILD_ROOT +popd +%endif %post -p /sbin/ldconfig @@ -72,13 +122,25 @@ make install DESTDIR=$RPM_BUILD_ROOT %files -n python-hawkey %{python_sitearch}/ +%if %{with python3} +%files -n python3-hawkey +%{python3_sitearch}/ +%exclude %{python3_sitearch}/hawkey/__pycache__ +%exclude %{python3_sitearch}/hawkey/test/__pycache__ +%endif + %changelog +* Mon May 18 2015 Colin Walters - 0.5.6-3.atomic.0 +- Add .atomic disttag to clearly distinguish from mainline + +* Sun May 17 2015 Colin Walters - 0.5.6-2 +- Import from http://pkgs.fedoraproject.org/cgit/hawkey.git/commit/?id=04299b605b0b9ac8e82f6f14a1c74924498144e2 -* Tue Dec 9 2014 Radek Holý - 0.5.0-2 -- rebase to upstream 1f8334eed146f26c290780c33e77dd3eba72b49c +* Thu May 14 2015 Colin Walters - 0.5.3-3 +- Import from http://pkgs.fedoraproject.org/cgit/libsolv.git/commit/?h=epel7&id=1b7c9c6efd2098cf6747b96f70b7472f1888ea9d -* Wed Sep 3 2014 Aleš Kozumplik - 0.5.0-1 -- rebase to upstream 15c1dbe +* Fri Dec 19 2014 Colin Walters - 0.4.12-4.atomic.1 +- Rebuild for 7.1 * Fri Mar 14 2014 Jan Silhan - 0.4.12-1 - Fix hy_stringarray_length. (Radek Holy)