forked from pool/createrepo_c
Accepting request 579021 from home:M0ses:branches:system:packagemanager
- Disable tests on SLE12 due to the python-nose requirements - Switch to singlespec buidling of python bindings - Make sure to use cmake macros to have it easier to gork what is happending by overriding %__builddir - Sort out with spec-cleaner - Fix embedding of date and time to documentation OBS-URL: https://build.opensuse.org/request/show/579021 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/createrepo_c?expand=0&rev=19
This commit is contained in:
parent
3833179bb2
commit
beadcff91a
@ -4,6 +4,20 @@ Wed Feb 21 15:58:06 UTC 2018 - FSchreiner@suse.com
|
|||||||
- changed to provide createrepo as update-alternatives [bnc#1075670]
|
- changed to provide createrepo as update-alternatives [bnc#1075670]
|
||||||
- also provide createrepo-implementation
|
- also provide createrepo-implementation
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 13 11:53:58 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Disable tests on SLE12 due to the python-nose requirements
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 22 11:58:46 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Switch to singlespec buidling of python bindings
|
||||||
|
- Make sure to use cmake macros to have it easier to gork what is
|
||||||
|
happending by overriding %__builddir
|
||||||
|
- Sort out with spec-cleaner
|
||||||
|
- Fix embedding of date and time to documentation
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Feb 19 12:57:21 UTC 2017 - ngompa13@gmail.com
|
Sun Feb 19 12:57:21 UTC 2017 - ngompa13@gmail.com
|
||||||
|
|
||||||
|
@ -17,41 +17,44 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Enable Python bindings selectively
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%if (0%{?suse_version} == 1315 && 0%{?is_opensuse}) || 0%{?leap_version} || 0%{?suse_version} >= 1330
|
%if 0%{?is_opensuse} || 0%{?suse_version} >= 1330
|
||||||
# Python bindings are enabled for openSUSE Leap and Tumbleweed
|
|
||||||
%bcond_without python
|
|
||||||
%bcond_without python3
|
%bcond_without python3
|
||||||
|
%bcond_without tests
|
||||||
%else
|
%else
|
||||||
# Python bindings are disabled for older SUSE
|
%define skip_python3 1
|
||||||
%bcond_with python
|
%bcond_with tests
|
||||||
%bcond_with python3
|
%bcond_with python3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Enable enhanced DeltaRPM support
|
|
||||||
%bcond_with drpm
|
|
||||||
|
|
||||||
%define major 0
|
%define major 0
|
||||||
%define libname lib%{name}%{major}
|
%define libname lib%{name}%{major}
|
||||||
%define devname lib%{name}-devel
|
%define devname lib%{name}-devel
|
||||||
|
|
||||||
%define version_unconverted 0.10.0.git20170131.04828e6
|
%define version_unconverted 0.10.0.git20170131.04828e6
|
||||||
|
# prevent provides from nonstandard paths:
|
||||||
|
%global __provides_exclude ^(%{python_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so)$
|
||||||
|
# Enable Python bindings selectively
|
||||||
|
%bcond_without python2
|
||||||
|
# Enable enhanced DeltaRPM support
|
||||||
|
%bcond_with drpm
|
||||||
Name: createrepo_c
|
Name: createrepo_c
|
||||||
|
Version: 0.10.0.git20170131.04828e6
|
||||||
|
Release: 0
|
||||||
Summary: Creates a common metadata repository
|
Summary: Creates a common metadata repository
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: System/Packages
|
Group: System/Packages
|
||||||
Version: 0.10.0.git20170131.04828e6
|
|
||||||
Release: 0
|
|
||||||
Url: https://github.com/rpm-software-management/createrepo_c
|
Url: https://github.com/rpm-software-management/createrepo_c
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
%if 0%{?is_opensuse} || 0%{?suse_version} >= 1330
|
||||||
BuildRequires: bash-completion
|
BuildRequires: %{python_module devel}
|
||||||
|
%else
|
||||||
%if 0%{?suse_version} >= 1330
|
%if %{with python2}
|
||||||
BuildRequires: bash-completion-devel
|
BuildRequires: python-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
BuildRequires: bash-completion
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -63,16 +66,18 @@ BuildRequires: libexpat-devel
|
|||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: lzma-devel
|
BuildRequires: lzma-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
|
%if 0%{?is_opensuse} || 0%{?suse_version} >= 1330
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
%endif
|
||||||
BuildRequires: rpm-devel >= 4.9.0
|
BuildRequires: rpm-devel >= 4.9.0
|
||||||
BuildRequires: sqlite3-devel
|
BuildRequires: sqlite3-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
%if %{with python}
|
Requires: %{libname} = %{version}-%{release}
|
||||||
BuildRequires: python-devel
|
%if %{with tests}
|
||||||
BuildRequires: python-nose
|
BuildRequires: %{python_module nose}
|
||||||
%if %{with python3}
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-nose
|
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?suse_version} >= 1330
|
||||||
|
BuildRequires: bash-completion-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with drpm}
|
%if %{with drpm}
|
||||||
BuildRequires: drpm-devel
|
BuildRequires: drpm-devel
|
||||||
@ -108,25 +113,23 @@ for easy manipulation with a repodata.
|
|||||||
%package -n %{devname}
|
%package -n %{devname}
|
||||||
Summary: Library for repodata manipulation
|
Summary: Library for repodata manipulation
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Provides: %{name}-devel = %{version}-%{release}
|
|
||||||
Requires: %{libname} = %{version}-%{release}
|
Requires: %{libname} = %{version}-%{release}
|
||||||
Requires: pkg-config
|
Requires: pkgconfig
|
||||||
|
Provides: %{name}-devel = %{version}-%{release}
|
||||||
|
|
||||||
%description -n %{devname}
|
%description -n %{devname}
|
||||||
This package contains the createrepo_c C library and header files.
|
This package contains the createrepo_c C library and header files.
|
||||||
These development files are for easy manipulation with a repodata.
|
These development files are for easy manipulation with a repodata.
|
||||||
|
|
||||||
%if %{with python}
|
|
||||||
%package -n python2-%{name}
|
%package -n python2-%{name}
|
||||||
Summary: Python 2 bindings for the createrepo_c library
|
Summary: Python 2 bindings for the createrepo_c library
|
||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
Provides: python-%{name} = %{version}-%{release}
|
|
||||||
Requires: %{libname} = %{version}-%{release}
|
Requires: %{libname} = %{version}-%{release}
|
||||||
|
Provides: python-%{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description -n python2-createrepo_c
|
%description -n python2-createrepo_c
|
||||||
Python 2 bindings for the createrepo_c library.
|
Python 2 bindings for the createrepo_c library.
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%package -n python3-%{name}
|
%package -n python3-%{name}
|
||||||
Summary: Python 3 bindings for the createrepo_c library
|
Summary: Python 3 bindings for the createrepo_c library
|
||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
@ -134,44 +137,50 @@ Requires: %{libname} = %{version}-%{release}
|
|||||||
|
|
||||||
%description -n python3-createrepo_c
|
%description -n python3-createrepo_c
|
||||||
Python 3 bindings for the createrepo_c library.
|
Python 3 bindings for the createrepo_c library.
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
# do not hardcode date in the docs
|
||||||
%if %{with python3}
|
sed -i -e '/HTML_TIMESTAMP/d' doc/Doxyfile.in.in
|
||||||
rm -rf py3
|
|
||||||
mkdir py3
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake -DENABLE_LEGACY_WEAKTAGS=1 %{!?with_drpm:-DENABLE_DRPM=OFF} %{!?with_python:-DENABLE_PYTHON=OFF}
|
%define __builddir build
|
||||||
|
%cmake \
|
||||||
|
-DENABLE_LEGACY_WEAKTAGS=1 \
|
||||||
|
%{!?with_drpm:-DENABLE_DRPM=OFF} \
|
||||||
|
%{!?with_python2:-DENABLE_PYTHON=OFF}
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
make doc-c
|
make %{?_smp_mflags} doc-c
|
||||||
|
|
||||||
%if %{with python}
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
pushd ../py3
|
cd ..
|
||||||
%cmake -DPYTHON_DESIRED:str=3 ../../
|
%define __builddir build-py3
|
||||||
|
%cmake \
|
||||||
|
-DENABLE_LEGACY_WEAKTAGS=1 \
|
||||||
|
%{!?with_drpm:-DENABLE_DRPM=OFF} \
|
||||||
|
%{!?with_python3:-DENABLE_PYTHON=OFF} \
|
||||||
|
-DPYTHON_DESIRED:str=3
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make tests -C build
|
%if %{with tests}
|
||||||
make ARGS="-V" test -C build
|
%define __builddir build
|
||||||
|
%ctest
|
||||||
%if %{with python}
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
make tests -C py3/build
|
%define __builddir build-py3
|
||||||
make ARGS="-V" test -C py3/build
|
%ctest
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install -C build
|
%define __builddir build
|
||||||
|
%cmake_install
|
||||||
|
%if %{with python3}
|
||||||
|
%define __builddir build-py3
|
||||||
|
%cmake_install
|
||||||
|
%endif
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
ln -s -f %{_sysconfdir}/alternatives/createrepo %{buildroot}%{_bindir}/createrepo
|
ln -s -f %{_sysconfdir}/alternatives/createrepo %{buildroot}%{_bindir}/createrepo
|
||||||
ln -s -f %{_sysconfdir}/alternatives/mergerepo %{buildroot}%{_bindir}/mergerepo
|
ln -s -f %{_sysconfdir}/alternatives/mergerepo %{buildroot}%{_bindir}/mergerepo
|
||||||
@ -182,16 +191,8 @@ ln -s -f %{_sysconfdir}/alternatives/mergerepo.8.gz %{buildroot}%{_mandir}/man8
|
|||||||
ln -s -f %{_sysconfdir}/alternatives/modifyrepo.8.gz %{buildroot}%{_mandir}/man8/modifyrepo.8.gz
|
ln -s -f %{_sysconfdir}/alternatives/modifyrepo.8.gz %{buildroot}%{_mandir}/man8/modifyrepo.8.gz
|
||||||
ln -s -f %{_sysconfdir}/alternatives/sqliterepo.8.gz %{buildroot}%{_mandir}/man8/sqliterepo.8.gz
|
ln -s -f %{_sysconfdir}/alternatives/sqliterepo.8.gz %{buildroot}%{_mandir}/man8/sqliterepo.8.gz
|
||||||
|
|
||||||
%if %{with python}
|
|
||||||
%if %{with python3}
|
|
||||||
%make_install -C py3/build
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%fdupes %{buildroot}%{_prefix}
|
%fdupes %{buildroot}%{_prefix}
|
||||||
%fdupes build/doc/html
|
%fdupes build/doc/html
|
||||||
%clean
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
update-alternatives --install \
|
update-alternatives --install \
|
||||||
@ -210,7 +211,6 @@ if [ ! -f %{_bindir}/createrepo_c ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%post -n %{libname} -p /sbin/ldconfig
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n %{libname} -p /sbin/ldconfig
|
%postun -n %{libname} -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -255,11 +255,12 @@ fi
|
|||||||
%{_libdir}/pkgconfig/createrepo_c.pc
|
%{_libdir}/pkgconfig/createrepo_c.pc
|
||||||
%{_includedir}/createrepo_c/
|
%{_includedir}/createrepo_c/
|
||||||
|
|
||||||
%if %{with python}
|
%if %{with python2}
|
||||||
%files -n python2-%{name}
|
%files -n python2-%{name}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
%{python_sitearch}/createrepo_c/
|
%{python_sitearch}/createrepo_c/
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%files -n python3-%{name}
|
%files -n python3-%{name}
|
||||||
@ -267,6 +268,5 @@ fi
|
|||||||
%doc COPYING
|
%doc COPYING
|
||||||
%{python3_sitearch}/createrepo_c/
|
%{python3_sitearch}/createrepo_c/
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user