2016-07-04 17:02:35 +02:00
|
|
|
#
|
|
|
|
# spec file for package createrepo_c
|
|
|
|
#
|
2017-03-02 13:43:52 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
# Copyright (c) 2015-2017 Neal Gompa <ngompa13@gmail.com>.
|
2016-07-04 17:02:35 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2017-03-02 14:49:48 +01:00
|
|
|
|
2017-03-02 13:43:52 +01:00
|
|
|
# Enable Python bindings selectively
|
|
|
|
%if (0%{?suse_version} == 1315 && 0%{?is_opensuse}) || 0%{?leap_version} || 0%{?suse_version} >= 1330
|
|
|
|
# Python bindings are enabled for openSUSE Leap and Tumbleweed
|
|
|
|
%bcond_without python
|
|
|
|
%bcond_without python3
|
|
|
|
%else
|
|
|
|
# Python bindings are disabled for older SUSE
|
|
|
|
%bcond_with python
|
|
|
|
%bcond_with python3
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Enable enhanced DeltaRPM support
|
|
|
|
%bcond_with drpm
|
2016-07-04 17:02:35 +02:00
|
|
|
|
2016-03-24 10:11:06 +01:00
|
|
|
%define major 0
|
|
|
|
%define libname lib%{name}%{major}
|
|
|
|
%define devname lib%{name}-devel
|
|
|
|
|
2017-03-02 13:43:52 +01:00
|
|
|
%define version_unconverted 0.10.0.git20170131.04828e6
|
2016-04-11 11:25:49 +02:00
|
|
|
|
2016-03-24 10:11:06 +01:00
|
|
|
Name: createrepo_c
|
|
|
|
Summary: Creates a common metadata repository
|
2017-03-02 13:43:52 +01:00
|
|
|
License: GPL-2.0+
|
2016-03-24 10:11:06 +01:00
|
|
|
Group: System/Packages
|
2017-03-02 13:43:52 +01:00
|
|
|
Version: 0.10.0.git20170131.04828e6
|
2016-03-24 10:11:06 +01:00
|
|
|
Release: 0
|
2016-07-04 17:02:35 +02:00
|
|
|
Url: https://github.com/rpm-software-management/createrepo_c
|
2016-07-05 00:41:19 +02:00
|
|
|
Source0: %{name}-%{version}.tar.gz
|
2017-03-02 13:43:52 +01:00
|
|
|
|
2016-07-04 17:02:35 +02:00
|
|
|
BuildRequires: bash-completion
|
2016-07-04 22:01:29 +02:00
|
|
|
|
2017-03-02 13:43:52 +01:00
|
|
|
%if 0%{?suse_version} >= 1330
|
2016-07-04 21:44:33 +02:00
|
|
|
BuildRequires: bash-completion-devel
|
|
|
|
%endif
|
2016-07-04 22:01:29 +02:00
|
|
|
|
2016-03-24 10:11:06 +01:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: doxygen
|
2016-10-31 14:15:00 +01:00
|
|
|
BuildRequires: fdupes
|
2016-03-24 10:11:06 +01:00
|
|
|
BuildRequires: file-devel
|
|
|
|
BuildRequires: glib2-devel >= 2.22.0
|
2016-07-04 17:02:35 +02:00
|
|
|
BuildRequires: libbz2-devel
|
2016-03-24 10:11:06 +01:00
|
|
|
BuildRequires: libcurl-devel
|
2016-07-04 17:02:35 +02:00
|
|
|
BuildRequires: libexpat-devel
|
2016-03-24 10:11:06 +01:00
|
|
|
BuildRequires: libxml2-devel
|
2016-07-04 17:02:35 +02:00
|
|
|
BuildRequires: lzma-devel
|
2016-03-24 10:11:06 +01:00
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: rpm-devel >= 4.9.0
|
|
|
|
BuildRequires: sqlite3-devel
|
|
|
|
BuildRequires: zlib-devel
|
2017-03-02 13:43:52 +01:00
|
|
|
%if %{with python}
|
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: python-nose
|
|
|
|
%if %{with python3}
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-nose
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%if %{with drpm}
|
|
|
|
BuildRequires: drpm-devel
|
|
|
|
%endif
|
2016-03-24 10:11:06 +01:00
|
|
|
|
|
|
|
Requires: %{libname} = %{version}-%{release}
|
|
|
|
|
|
|
|
# prevent provides from nonstandard paths:
|
|
|
|
%global __provides_exclude ^(%{python_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so)$
|
|
|
|
|
|
|
|
%description
|
|
|
|
C implementation of Createrepo.
|
|
|
|
A set of utilities (createrepo_c, mergerepo_c, modifyrepo_c)
|
|
|
|
for generating a common metadata repository from a directory of
|
|
|
|
rpm packages and maintaining it.
|
|
|
|
|
|
|
|
%package -n %{libname}
|
2016-07-04 17:02:35 +02:00
|
|
|
Summary: Library for repodata manipulation
|
2016-03-24 10:11:06 +01:00
|
|
|
# The function to create DeltaRPMs calls /usr/bin/makedeltarpm,
|
|
|
|
# which is part of the 'deltarpm' package
|
2017-03-02 13:43:52 +01:00
|
|
|
Group: System/Libraries
|
2016-07-04 17:02:35 +02:00
|
|
|
Requires: deltarpm
|
2016-03-24 10:11:06 +01:00
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
Libraries for applications using the createrepo_c library
|
|
|
|
for easy manipulation with a repodata.
|
|
|
|
|
|
|
|
%package -n %{devname}
|
2016-07-04 17:02:35 +02:00
|
|
|
Summary: Library for repodata manipulation
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Provides: %{name}-devel = %{version}-%{release}
|
|
|
|
Requires: %{libname} = %{version}-%{release}
|
|
|
|
Requires: pkg-config
|
2016-03-24 10:11:06 +01:00
|
|
|
|
|
|
|
%description -n %{devname}
|
|
|
|
This package contains the createrepo_c C library and header files.
|
|
|
|
These development files are for easy manipulation with a repodata.
|
|
|
|
|
2017-03-02 13:43:52 +01:00
|
|
|
%if %{with python}
|
|
|
|
%package -n python2-%{name}
|
2017-03-02 14:49:48 +01:00
|
|
|
Summary: Python 2 bindings for the createrepo_c library
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Provides: python-%{name} = %{version}-%{release}
|
|
|
|
Requires: %{libname} = %{version}-%{release}
|
2017-03-02 13:43:52 +01:00
|
|
|
|
|
|
|
%description -n python2-createrepo_c
|
|
|
|
Python 2 bindings for the createrepo_c library.
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
%package -n python3-%{name}
|
2017-03-02 14:49:48 +01:00
|
|
|
Summary: Python 3 bindings for the createrepo_c library
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{libname} = %{version}-%{release}
|
2017-03-02 13:43:52 +01:00
|
|
|
|
|
|
|
%description -n python3-createrepo_c
|
|
|
|
Python 3 bindings for the createrepo_c library.
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2016-03-24 10:11:06 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
rm -rf py3
|
|
|
|
mkdir py3
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%build
|
2017-03-02 13:43:52 +01:00
|
|
|
%cmake -DENABLE_LEGACY_WEAKTAGS=1 %{!?with_drpm:-DENABLE_DRPM=OFF} %{!?with_python:-DENABLE_PYTHON=OFF}
|
2016-03-24 10:11:06 +01:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
make doc-c
|
|
|
|
|
2017-03-02 13:43:52 +01:00
|
|
|
%if %{with python}
|
|
|
|
%if %{with python3}
|
|
|
|
pushd ../py3
|
|
|
|
%cmake -DPYTHON_DESIRED:str=3 ../../
|
|
|
|
make %{?_smp_mflags}
|
2016-03-24 10:11:06 +01:00
|
|
|
popd
|
2017-03-02 13:43:52 +01:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%check
|
|
|
|
make tests -C build
|
|
|
|
make ARGS="-V" test -C build
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
%if %{with python3}
|
|
|
|
make tests -C py3/build
|
|
|
|
make ARGS="-V" test -C py3/build
|
|
|
|
%endif
|
|
|
|
%endif
|
2016-03-24 10:11:06 +01:00
|
|
|
|
|
|
|
%install
|
2017-03-02 13:43:52 +01:00
|
|
|
%make_install -C build
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
%if %{with python3}
|
|
|
|
%make_install -C py3/build
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%fdupes %{buildroot}%{_prefix}
|
2016-03-24 10:11:06 +01:00
|
|
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md COPYING
|
2017-03-02 13:43:52 +01:00
|
|
|
%{_mandir}/man8/createrepo_c.8*
|
|
|
|
%{_mandir}/man8/mergerepo_c.8*
|
|
|
|
%{_mandir}/man8/modifyrepo_c.8*
|
|
|
|
%{_mandir}/man8/sqliterepo_c.8*
|
2016-03-24 10:11:06 +01:00
|
|
|
%{_datadir}/bash-completion/completions/
|
|
|
|
%{_bindir}/createrepo_c
|
|
|
|
%{_bindir}/mergerepo_c
|
|
|
|
%{_bindir}/modifyrepo_c
|
|
|
|
%{_bindir}/sqliterepo_c
|
|
|
|
|
|
|
|
%files -n %{libname}
|
|
|
|
%doc COPYING
|
|
|
|
%{_libdir}/libcreaterepo_c.so.%{major}
|
|
|
|
%{_libdir}/libcreaterepo_c.so.%{major}.*
|
|
|
|
|
|
|
|
%files -n %{devname}
|
2017-03-02 13:43:52 +01:00
|
|
|
%doc build/doc/html COPYING
|
2016-03-24 10:11:06 +01:00
|
|
|
%{_libdir}/libcreaterepo_c.so
|
|
|
|
%{_libdir}/pkgconfig/createrepo_c.pc
|
|
|
|
%{_includedir}/createrepo_c/
|
2017-03-02 13:43:52 +01:00
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
%files -n python2-%{name}
|
|
|
|
%doc COPYING
|
|
|
|
%{python_sitearch}/createrepo_c/
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
%files -n python3-%{name}
|
|
|
|
%doc COPYING
|
|
|
|
%{python3_sitearch}/createrepo_c/
|
|
|
|
%endif
|
|
|
|
%endif
|
2016-03-24 10:11:06 +01:00
|
|
|
|
|
|
|
%changelog
|