teknoraver / rpms / librepo

Forked from rpms/librepo 6 days ago
Clone

Blame librepo.spec

Tomas Mlcoch 8255b8
%global gitrev bc2c8a5
Tomas Mlcoch 2f1b90
# gitrev is output of: git rev-parse --short HEAD
Tomas Mlcoch 2f1b90
Tomas Mlcoch e989a8
Name:		librepo
Tomas Mlcoch 8255b8
Version:	1.2.1
Rex Dieter 8fc54c
Release:	3.%{gitrev}%{?dist}
Tomas Mlcoch e989a8
Summary:	Repodata downloading library
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
Group:		System Environment/Libraries
Tomas Mlcoch e989a8
License:	GPLv2+
Tomas Mlcoch e989a8
URL:		https://github.com/Tojaj/librepo
Tomas Mlcoch e989a8
# Use the following commands to generate the tarball:
Tomas Mlcoch e989a8
#  git clone https://github.com/Tojaj/librepo.git
Tomas Mlcoch e989a8
#  cd librepo
Tomas Mlcoch 2f1b90
#  utils/make_tarball.sh %{gitrev}
Tomas Mlcoch 2f1b90
Source0:	librepo-%{gitrev}.tar.xz
Tomas Mlcoch e989a8
Rex Dieter 8fc54c
# upstreamable patch to install missing mirrorlist.h header
Rex Dieter 8fc54c
# https://bugzilla.redhat.com/show_bug.cgi?id=1018006
Rex Dieter 8fc54c
Patch1: librepo-mirrorlist_h.patch
Rex Dieter 8fc54c
Tomas Mlcoch e989a8
BuildRequires:	check-devel
Tomas Mlcoch e989a8
BuildRequires:	cmake
Tomas Mlcoch e989a8
BuildRequires:	doxygen
Tomas Mlcoch f6676d
BuildRequires:	expat-devel
Tomas Mlcoch 5f933a
BuildRequires:  glib2-devel >= 2.22.0
Tomas Mlcoch e989a8
BuildRequires:	gpgme-devel
Tomas Mlcoch 5f933a
BuildRequires:	libattr-devel
Tomas Mlcoch e989a8
BuildRequires:	libcurl-devel
Tomas Mlcoch e989a8
BuildRequires:	openssl-devel
Tomas Mlcoch e8713e
Tomas Mlcoch e8713e
# prevent provides from nonstandard paths:
Tomas Mlcoch e8713e
%filter_provides_in %{python_sitearch}/.*\.so$
Tomas Mlcoch e8713e
%filter_provides_in %{python3_sitearch}/.*\.so$
Tomas Mlcoch e8713e
%filter_setup
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%description
Tomas Mlcoch e989a8
A library providing C and Python (libcURL like) API to downloading repository
Tomas Mlcoch e989a8
metadata.
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%package devel
Tomas Mlcoch e989a8
Summary:	Repodata downloading library
Tomas Mlcoch e989a8
Group:		Development/Libraries
Tomas Mlcoch e989a8
Requires:	%{name}%{?_isa} = %{version}-%{release}
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%description devel
Tomas Mlcoch e989a8
Development files for librepo.
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%package -n python-librepo
Tomas Mlcoch e989a8
Summary:	Python bindings for the librepo library
Tomas Mlcoch e989a8
Group:		Development/Languages
Tomas Mlcoch e8713e
BuildRequires:	pygpgme
Tomas Mlcoch e8713e
BuildRequires:	python2-devel
Tomas Mlcoch e8713e
BuildRequires:	python-flask
Tomas Mlcoch e8713e
BuildRequires:	python-nose
Tomas Mlcoch e8713e
BuildRequires:	python-sphinx
Tomas Mlcoch e989a8
Requires:	%{name}%{?_isa} = %{version}-%{release}
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%description -n python-librepo
Tomas Mlcoch e989a8
Python bindings for the librepo library.
Tomas Mlcoch e989a8
Tomas Mlcoch e8713e
%package -n python3-librepo
Tomas Mlcoch e8713e
Summary:        Python 3 bindings for the librepo library
Tomas Mlcoch e8713e
Group:          Development/Languages
Tomas Mlcoch e8713e
BuildRequires:	python3-pygpgme
Tomas Mlcoch e8713e
BuildRequires:  python3-devel
Tomas Mlcoch e8713e
BuildRequires:  python3-flask
Tomas Mlcoch e8713e
BuildRequires:  python3-nose
Tomas Mlcoch e8713e
BuildRequires:  python3-sphinx
Tomas Mlcoch e8713e
Requires:       %{name}%{?_isa} = %{version}-%{release}
Tomas Mlcoch e8713e
Tomas Mlcoch e8713e
%description -n python3-librepo
Tomas Mlcoch e8713e
Python 3 bindings for the librepo library.
Tomas Mlcoch e8713e
Tomas Mlcoch e989a8
%prep
Tomas Mlcoch e989a8
%setup -q -n librepo
Tomas Mlcoch e989a8
Rex Dieter 8fc54c
%patch1 -p1 -b .mirrorlist_h
Rex Dieter 8fc54c
Tomas Mlcoch e8713e
rm -rf py3
Tomas Mlcoch e8713e
mkdir ../py3
Tomas Mlcoch e8713e
cp -a . ../py3/
Tomas Mlcoch e8713e
mv ../py3 ./
Tomas Mlcoch e8713e
Tomas Mlcoch e989a8
%build
Tomas Mlcoch e989a8
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .
Tomas Mlcoch e989a8
make %{?_smp_mflags}
Tomas Mlcoch e989a8
Tomas Mlcoch e8713e
pushd py3
Tomas Mlcoch e8713e
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3 .
Tomas Mlcoch e8713e
make %{?_smp_mflags}
Tomas Mlcoch e8713e
popd
Tomas Mlcoch e8713e
Tomas Mlcoch e989a8
%check
Tomas Mlcoch e989a8
make ARGS="-V" test
Tomas Mlcoch e989a8
Tomas Mlcoch e8713e
pushd py3
Tomas Mlcoch e8713e
make ARGS="-V" test
Tomas Mlcoch e8713e
popd
Tomas Mlcoch e8713e
Tomas Mlcoch e989a8
%install
Tomas Mlcoch e989a8
make install DESTDIR=$RPM_BUILD_ROOT
Tomas Mlcoch e8713e
pushd py3
Tomas Mlcoch e8713e
make install DESTDIR=$RPM_BUILD_ROOT
Tomas Mlcoch e8713e
popd
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%post -p /sbin/ldconfig
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%postun -p /sbin/ldconfig
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%files
Tomas Mlcoch e989a8
%doc COPYING README.md
Tomas Mlcoch e989a8
%{_libdir}/librepo.so.*
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%files devel
Tomas Mlcoch e989a8
%{_libdir}/librepo.so
Tomas Mlcoch e989a8
%{_libdir}/pkgconfig/librepo.pc
Tomas Mlcoch e989a8
%{_includedir}/librepo/
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%files -n python-librepo
Tomas Mlcoch e989a8
%{python_sitearch}/librepo/
Tomas Mlcoch e989a8
Tomas Mlcoch e8713e
%files -n python3-librepo
Tomas Mlcoch e8713e
%{python3_sitearch}/
Tomas Mlcoch e8713e
Tomas Mlcoch e989a8
%changelog
Rex Dieter 8fc54c
* Thu Oct 10 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.2.1-3.bc2c8a5
Rex Dieter 8fc54c
- fastestmirror.h:26:24: fatal error: mirrorlist.h: No such file or directory (#1018006)
Rex Dieter 8fc54c
- adjust Release tag to match packaging guidelines
Rex Dieter 8fc54c
Tomas Mlcoch 19fbe2
* Thu Oct  10 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 1.2.1-2
Tomas Mlcoch 19fbe2
- Just release bump
Tomas Mlcoch 19fbe2
Tomas Mlcoch 8255b8
* Mon Oct  07 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 1.2.1-1
Tomas Mlcoch 8255b8
- Open fd right before downloading and close them immediately after
Tomas Mlcoch 8255b8
  download. (RhBug: 1015957)
Tomas Mlcoch 8255b8
Tomas Mlcoch e8713e
* Thu Oct  03 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 1.2.0-2
Tomas Mlcoch e8713e
- Add target for Python 3 to the spec file
Tomas Mlcoch e8713e
- Fix few python3 related issues
Tomas Mlcoch e8713e
Tomas Mlcoch 5ea63a
* Tue Oct  01 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 1.2.0-1
Tomas Mlcoch 5ea63a
- Better detection of bad content of repomd.xml
Tomas Mlcoch 5ea63a
- Close files properly (RhBug: 1012290)
Tomas Mlcoch 5ea63a
- Add fastestmirror module + LRO_FASTESTMIRROR option
Tomas Mlcoch 5ea63a
- downloader: Fix uninitialized total to download variable (GitHub issue 22)
Tomas Mlcoch 5ea63a
- Add LRO_MIRRORLISTURL and LRO_METALINKURL. LRO_MIRRORLIST is deprecated.
Tomas Mlcoch 5ea63a
- Few other small fixes
Tomas Mlcoch 5ea63a
Tomas Mlcoch 03bd13
* Mon Sep  16 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 1.1.0-1
Tomas Mlcoch 03bd13
- New librepo.download_url(url, fd, handle=None) function in Python API.
Tomas Mlcoch 03bd13
- Low-level downloader interface is now public in C API.
Tomas Mlcoch 03bd13
- Small change of API lr_download_packages() and lr_packagetarget_new
Tomas Mlcoch 03bd13
  functions.
Tomas Mlcoch 03bd13
- In python download_packages() changed from method of Handle() to
Tomas Mlcoch 03bd13
  librepo module function without handle param.
Tomas Mlcoch 03bd13
  Param handle was moved to the PackageTarget class that takes handle
Tomas Mlcoch 03bd13
  as a optional param during constrution.
Tomas Mlcoch 03bd13
- Implements checking size of downloaded files (expectedsize
Tomas Mlcoch 03bd13
  param of downloading functions).
Tomas Mlcoch 03bd13
Tomas Mlcoch 35ccc4
* Wed Aug  28 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 1.0.0-1
Tomas Mlcoch 35ccc4
- Huge API changes
Tomas Mlcoch 35ccc4
- Library starts to use GLib2
Tomas Mlcoch 35ccc4
- Support for parallel downloads
Tomas Mlcoch 35ccc4
- Better error reporting
Tomas Mlcoch 35ccc4
- More GLib2 style C api
Tomas Mlcoch 35ccc4
- More descriptive Python exception messages
Tomas Mlcoch 35ccc4
- A lot of bugfixes
Tomas Mlcoch 35ccc4
- Updated examples
Tomas Mlcoch 35ccc4
Tomas Mlcoch 8f0a77
* Thu Jul  25 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.5-3
Tomas Mlcoch 8f0a77
- python: Raise exception if handle has bad repo type configured
Tomas Mlcoch 8f0a77
  (RhBug: 988013)
Tomas Mlcoch 8f0a77
Tomas Mlcoch f6676d
* Mon Jul  22 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.5-2
Tomas Mlcoch f6676d
- Bump version in versioh.h to 0.0.5
Tomas Mlcoch f6676d
- Python: Fix Handle.mirrors to return empty list instead of None if
Tomas Mlcoch f6676d
  no mirrors available (RhBug: 986228)
Tomas Mlcoch f6676d
Tomas Mlcoch 5f933a
* Wed Jul  17 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.5-1
Tomas Mlcoch 5f933a
- Return LRE_ALREADYDOWNLOADED if the file exists even if no resume
Tomas Mlcoch 5f933a
  is specified. (GitHub issue 15)
Tomas Mlcoch 5f933a
- downloadtarget: New module, future replacement for curltarget module.
Tomas Mlcoch 5f933a
- Librepo migrated to lr_LrMirrorlist from lr_InternalMirrorlist.
Tomas Mlcoch 5f933a
- test: Run python unittest verbosely
Tomas Mlcoch 5f933a
- lrmirrorlis: New module. GLib2 ready replacement for the internal_mirrorlist
Tomas Mlcoch 5f933a
  module.
Tomas Mlcoch 5f933a
- package_downloader: Add LRE_ALREADYDOWNLOADED rc code. (GitHub issue 15)
Tomas Mlcoch 5f933a
- handle: After set python SIGINT handler back, check if librepo was
Tomas Mlcoch 5f933a
  interrupted by CTRL+C. (RhBug: 977803)
Tomas Mlcoch 5f933a
- cmake: Set required python version to 2. (GitHub issue 10)
Tomas Mlcoch 5f933a
- Fix missing VAR substitution for mirrorlist. (GitHub issue 11)
Tomas Mlcoch 5f933a
- cmake: Add FindXattr module.
Tomas Mlcoch 5f933a
- Add support for caching checksum as extended file attribute. (GitHub issue 8)
Tomas Mlcoch 5f933a
- util: Add lr_asprintf().
Tomas Mlcoch 5f933a
- util: Add lr_vasprintf().
Tomas Mlcoch 5f933a
- handle: Fix funky logic in internal error handling. (GitHub issue 9)
Tomas Mlcoch 5f933a
- Add lr_yum_repomd_get_age() function. (GitHub issue 6)
Tomas Mlcoch 5f933a
- test: Add test for LR_VERSION_CHECK macro.
Tomas Mlcoch 5f933a
- Add a LR_VERSION_CHECK macro
Tomas Mlcoch 5f933a
Tomas Mlcoch 2f1b90
* Wed Jun 12 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.4-2
Tomas Mlcoch 2f1b90
- examples: Add C example of usage.
Tomas Mlcoch 2f1b90
- Fix predefined lists in types.h (GitHub issue 4). Thank you hughsie
Tomas Mlcoch 2f1b90
- Add LRO_VARSUB and LRI_VARSUB. (RhBug: 965131)
Tomas Mlcoch 2f1b90
- py: Change reported name from _librepo.Exception to librepo.LibrepoException
Tomas Mlcoch 2f1b90
Tomas Mlcoch 806c08
* Thu May  2 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.4-1
Tomas Mlcoch 806c08
- Fix type conversion long long -> long.(RhBug: 957656)
Tomas Mlcoch 806c08
- python: Handle.perfrom() could be called without Result().
Tomas Mlcoch 806c08
- Add LRI_MAXMIRRORTRIES option. (RhBug: 954736)
Tomas Mlcoch 806c08
- py: unittests: Add metalink.xml and mirrorlist files. (RhBug: 954294)
Tomas Mlcoch 806c08
- Fix double free and memory leak. (RhBug: 954294)
Tomas Mlcoch 806c08
- New option LRO_MAXMIRRORTRIES. (RhBug: 949517)
Tomas Mlcoch 806c08
- LRI_MIRRORS return only content of mirrorlist file (without LRO_URL as first item).
Tomas Mlcoch 806c08
- Add LRO_FETCHMIRRORS option.
Tomas Mlcoch 806c08
Tomas Mlcoch 772afb
* Mon Apr  8 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.2-3.git720d68d
Tomas Mlcoch 772afb
- Add CURL_GLOBAL_ACK_EINTR flag to curl init.
Tomas Mlcoch 772afb
- Proper multi handle cleanup. (RhBug: 947388)
Tomas Mlcoch 772afb
- Support for read 'useragent' attr. (RhBug: 947346)
Tomas Mlcoch 772afb
- Add valgrind supress files. (RhBug: 923214)
Tomas Mlcoch 772afb
- Make python bindings interruptible (LRO_INTERRUPTIBLE) (RhBug: 919125)
Tomas Mlcoch 772afb
- Add LRI_MIRRORS option (RhBug: 923198)
Tomas Mlcoch 772afb
- Add LRI_METALINK option. (BzBug: 947767)
Tomas Mlcoch 772afb
Tomas Mlcoch bf07af
* Mon Mar 18 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.2-2.gitb3c3323
Tomas Mlcoch bf07af
- py: Use standard python exception while accessing bad attrs. (RhBug: 920673)
Tomas Mlcoch bf07af
- Default mask for newly created files is 0666. (RhBug: 922557)
Tomas Mlcoch bf07af
Tomas Mlcoch e989a8
* Thu Mar 14 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.2-1.git714e828
Tomas Mlcoch e989a8
- Add LRI_PROGRESSCB and LRI_PROGRESSDATA options (RhBug: 919123)
Tomas Mlcoch e989a8
- Bindings: More pythonic operations with handle's attributes (RhBug: 919124)
Tomas Mlcoch e989a8
Tomas Mlcoch 5f933a
* Tue Oct  9 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.0.1-1.gitc69642e
Tomas Mlcoch e989a8
- Initial package