From 7f28a2ed0a5a16bab9c834fe4cb43d9dcc1347d14555c72e93e6e2f9d4eb58ea Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 26 Jun 2017 13:06:07 +0000 Subject: [PATCH] Initial import of librepo OBS-URL: https://build.opensuse.org/package/show/system:packagemanager:dnf/librepo?expand=0&rev=1 --- .gitattributes | 23 ++++++ .gitignore | 1 + librepo-1.7.20.tar.gz | 3 + librepo.changes | 15 ++++ librepo.spec | 179 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 221 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 librepo-1.7.20.tar.gz create mode 100644 librepo.changes create mode 100644 librepo.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/librepo-1.7.20.tar.gz b/librepo-1.7.20.tar.gz new file mode 100644 index 0000000..d715fe7 --- /dev/null +++ b/librepo-1.7.20.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:104f77503b2e4a1d9e11af311a1cada50f4e62c5250ccaff0cdeaae3c7a98026 +size 571989 diff --git a/librepo.changes b/librepo.changes new file mode 100644 index 0000000..44d682f --- /dev/null +++ b/librepo.changes @@ -0,0 +1,15 @@ +------------------------------------------------------------------- +Mon Feb 20 14:35:02 UTC 2017 - ngompa13@gmail.com + +- Update to 1.7.20 + +------------------------------------------------------------------- +Mon Feb 1 06:28:16 UTC 2016 - ngompa13@gmail.com + +- Use SUSE-specific groups and tags + +------------------------------------------------------------------- +Mon Feb 1 06:15:57 UTC 2016 - ngompa13@gmail.com + +- Initial packaging of librepo derived from Mageia packaging + diff --git a/librepo.spec b/librepo.spec new file mode 100644 index 0000000..842cf7e --- /dev/null +++ b/librepo.spec @@ -0,0 +1,179 @@ +# +# spec file for package librepo +# +# Copyright (c) 2017 Neal Gompa . +# +# 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/ +# + + +# Disable python3 due to missing deps +%if 0%{?suse_version} >= 1330 +%bcond_without python3 +%else +%bcond_with python3 +%endif + +%bcond_without tests + +%define major 0 +%define libname %{name}%{major} +%define devname %{name}-devel + +%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}} + +Name: librepo +Version: 1.7.20 +Release: 0 +Summary: Repodata downloading library +License: LGPL-2.0+ +Group: System/Libraries + +Url: https://github.com/rpm-software-management/librepo +Source0: https://github.com/rpm-software-management/librepo/archive/%{name}-%{version}.tar.gz + +BuildRequires: check-devel +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: glib2-devel >= 2.26.0 +BuildRequires: gpgme-devel +BuildRequires: libattr-devel +BuildRequires: libcurl-devel >= 7.19.0 +BuildRequires: libexpat-devel +BuildRequires: openssl-devel +%if 0%{?suse_version} >= 1330 || 0%{?leap_version} >= 420300 +BuildRequires: python-rpm-macros +%endif + +# prevent provides from nonstandard paths: +%global __provides_exclude ^(%{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so)$ + +%description +A library providing C and Python (libcURL like) API to downloading repository +metadata. + +%package -n %{libname} +Summary: Libraries for %{name} +Group: System/Libraries + +%description -n %{libname} +Libraries for %{name} + +%package -n %{devname} +Summary: Repodata downloading library +Group: Development/Languages/C and C++ +Provides: %{name}-devel = %{version}-%{release} +Requires: %{libname}%{?_isa} = %{version}-%{release} + +%description -n %{devname} +Development files for %{name}. + +%package -n python2-librepo +Summary: Python bindings for the librepo library +Group: Development/Languages/Python +BuildRequires: python-devel +BuildRequires: python-gpgme +%if %{with tests} +BuildRequires: python-Flask +BuildRequires: python-nose +%endif +BuildRequires: python-Sphinx +BuildRequires: python-xattr +Provides: python-%{name} = %{version}-%{release} +Requires: %{libname}%{?_isa} = %{version}-%{release} + +%description -n python2-librepo +Python 2 bindings for the librepo library. + +%if %{with python3} +%package -n python3-librepo +Summary: Python 3 bindings for the librepo library +Group: Development/Languages/Python +BuildRequires: python3-devel +BuildRequires: python3-gpgme +%if %{with tests} +BuildRequires: python3-Flask +BuildRequires: python3-nose +%endif +BuildRequires: python3-Sphinx +BuildRequires: python3-xattr +Requires: %{libname}%{?_isa} = %{version}-%{release} + +%description -n python3-librepo +Python 3 bindings for the librepo library. +%endif + +%prep +%setup -q -n %{name}-%{name}-%{version} + +%if %{with python3} +rm -rf py3 +mkdir py3 +%endif + +%build +%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo +make %{?_smp_mflags} + +%if %{with python3} +pushd ../py3 +%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3 ../../ +make %{?_smp_mflags} +popd +%endif + +%check +%if %{with tests} +pushd ./build +make ARGS="-V" test +make clean +popd + +%if %{with python3} +pushd ./py3/build +make ARGS="-V" test +popd +%endif +%endif + +%install +pushd ./build +%make_install +popd +%if %{with python3} +pushd ./py3/build +%make_install +popd +%endif + +%post -n %{libname} -p /sbin/ldconfig + +%postun -n %{libname} -p /sbin/ldconfig + +%files -n %{libname} +%doc COPYING README.md +%{_libdir}/librepo.so.%{major} + +%files -n %{devname} +%{_libdir}/librepo.so +%{_libdir}/pkgconfig/librepo.pc +%{_includedir}/librepo/ + +%files -n python2-librepo +%{python2_sitearch}/librepo + +%if %{with python3} +%files -n python3-librepo +%{python3_sitearch}/librepo +%endif + +%changelog