Adopt to new packaging guidelines; Cleanups in spec file
Acked-by: Tomas Mlcoch <tmlcoch@redhat.com> Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1324840 Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
parent
19670f5031
commit
98638e6d85
1
.gitignore
vendored
1
.gitignore
vendored
@ -38,3 +38,4 @@
|
|||||||
/librepo-d9bed0d.tar.xz
|
/librepo-d9bed0d.tar.xz
|
||||||
/librepo-7ba0722.tar.xz
|
/librepo-7ba0722.tar.xz
|
||||||
/librepo-68724dc.tar.xz
|
/librepo-68724dc.tar.xz
|
||||||
|
/librepo-1.7.18.tar.gz
|
||||||
|
102
librepo.spec
102
librepo.spec
@ -1,7 +1,7 @@
|
|||||||
%{!?gitrev: %global gitrev 68724dc}
|
%{!?gitrev: %global gitrev 68724dc}
|
||||||
# gitrev is output of: git rev-parse --short HEAD
|
# gitrev is output of: git rev-parse --short HEAD
|
||||||
|
|
||||||
%if 0%{?rhel} != 0 && 0%{?rhel} <= 7
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||||
# Do not build bindings for python3 for RHEL <= 7
|
# Do not build bindings for python3 for RHEL <= 7
|
||||||
%bcond_with python3
|
%bcond_with python3
|
||||||
# python-flask is not in RHEL7
|
# python-flask is not in RHEL7
|
||||||
@ -13,20 +13,16 @@
|
|||||||
|
|
||||||
Name: librepo
|
Name: librepo
|
||||||
Version: 1.7.18
|
Version: 1.7.18
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Repodata downloading library
|
Summary: Repodata downloading library
|
||||||
|
|
||||||
Group: System Environment/Libraries
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/Tojaj/librepo
|
URL: https://github.com/rpm-software-management/librepo
|
||||||
# Use the following commands to generate the tarball:
|
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||||
# git clone https://github.com/Tojaj/librepo.git
|
|
||||||
# cd librepo
|
|
||||||
# utils/make_tarball.sh %{gitrev}
|
|
||||||
Source0: librepo-%{gitrev}.tar.xz
|
|
||||||
|
|
||||||
BuildRequires: check-devel
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: check-devel
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: expat-devel
|
BuildRequires: expat-devel
|
||||||
BuildRequires: glib2-devel >= 2.26.0
|
BuildRequires: glib2-devel >= 2.26.0
|
||||||
@ -35,28 +31,20 @@ BuildRequires: libattr-devel
|
|||||||
BuildRequires: libcurl-devel >= 7.19.0
|
BuildRequires: libcurl-devel >= 7.19.0
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
|
|
||||||
# prevent provides from nonstandard paths:
|
|
||||||
%filter_provides_in %{python_sitearch}/.*\.so$
|
|
||||||
%if %{with python3}
|
|
||||||
%filter_provides_in %{python3_sitearch}/.*\.so$
|
|
||||||
%endif
|
|
||||||
%filter_setup
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A library providing C and Python (libcURL like) API to downloading repository
|
A library providing C and Python (libcURL like) API to downloading repository
|
||||||
metadata.
|
metadata.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Repodata downloading library
|
Summary: Repodata downloading library
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Development files for librepo.
|
Development files for librepo.
|
||||||
|
|
||||||
%package -n python-librepo
|
%package -n python2-%{name}
|
||||||
Summary: Python bindings for the librepo library
|
Summary: Python bindings for the librepo library
|
||||||
Group: Development/Languages
|
%{?python_provide:%python_provide python2-%{name}}
|
||||||
BuildRequires: pygpgme
|
BuildRequires: pygpgme
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -67,62 +55,65 @@ BuildRequires: python-sphinx
|
|||||||
BuildRequires: pyxattr
|
BuildRequires: pyxattr
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description -n python-librepo
|
%description -n python2-%{name}
|
||||||
Python bindings for the librepo library.
|
Python 2 bindings for the librepo library.
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%package -n python3-librepo
|
%package -n python3-%{name}
|
||||||
Summary: Python 3 bindings for the librepo library
|
Summary: Python 3 bindings for the librepo library
|
||||||
Group: Development/Languages
|
%{?python_provide:%python_provide python3-%{name}}
|
||||||
BuildRequires: python3-pygpgme
|
BuildRequires: python3-pygpgme
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
%if %{with tests}
|
||||||
BuildRequires: python3-flask
|
BuildRequires: python3-flask
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-nose
|
||||||
|
%endif
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-pyxattr
|
BuildRequires: python3-pyxattr
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description -n python3-librepo
|
%description -n python3-%{name}
|
||||||
Python 3 bindings for the librepo library.
|
Python 3 bindings for the librepo library.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n librepo
|
%autosetup -n %{name}-%{name}-%{version}
|
||||||
|
|
||||||
%if %{with python3}
|
mkdir build build-py3
|
||||||
rm -rf py3
|
|
||||||
mkdir ../py3
|
|
||||||
cp -a . ../py3/
|
|
||||||
mv ../py3 ./
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .
|
pushd build
|
||||||
make %{?_smp_mflags}
|
%cmake ..
|
||||||
|
%make_build
|
||||||
|
popd
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
pushd py3
|
pushd build-py3
|
||||||
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3 .
|
%cmake -DPYTHON_DESIRED:str=3 ..
|
||||||
make %{?_smp_mflags}
|
%make_build
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
make ARGS="-V" test
|
%check
|
||||||
|
pushd build
|
||||||
|
ctest -VV
|
||||||
|
popd
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
pushd py3
|
pushd build-py3
|
||||||
make ARGS="-V" test
|
ctest -VV
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
pushd build
|
||||||
|
%make_install
|
||||||
|
popd
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
pushd py3
|
pushd build-py3
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
%make_install
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -131,23 +122,28 @@ popd
|
|||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc COPYING README.md
|
%license COPYING
|
||||||
%{_libdir}/librepo.so.*
|
%doc README.md
|
||||||
|
%{_libdir}/%{name}.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_libdir}/librepo.so
|
%{_libdir}/%{name}.so
|
||||||
%{_libdir}/pkgconfig/librepo.pc
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
%{_includedir}/librepo/
|
%{_includedir}/%{name}/
|
||||||
|
|
||||||
%files -n python-librepo
|
%files -n python2-%{name}
|
||||||
%{python_sitearch}/librepo/
|
%{python2_sitearch}/%{name}/
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%files -n python3-librepo
|
%files -n python3-%{name}
|
||||||
%{python3_sitearch}/
|
%{python3_sitearch}/%{name}/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 07 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.18-2
|
||||||
|
- Adopt to new packaging guidelines
|
||||||
|
- Cleanups in spec file
|
||||||
|
|
||||||
* Fri Mar 4 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.18-1
|
* Fri Mar 4 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.18-1
|
||||||
- Add new option LRO_FTPUSEEPSV
|
- Add new option LRO_FTPUSEEPSV
|
||||||
- Update AUTHORS
|
- Update AUTHORS
|
||||||
|
Loading…
Reference in New Issue
Block a user