| 1 |
|
|---|
| 2 | %define name urlgrabber
|
|---|
| 3 | %define version 3.10.1
|
|---|
| 4 | %define unmangled_version 3.10.1
|
|---|
| 5 |
|
|---|
| 6 | Summary: A high-level cross-protocol url-grabber
|
|---|
| 7 | Name: %{name}
|
|---|
| 8 | Version: %{version}
|
|---|
| 9 | Release: 10%{?dist}
|
|---|
| 10 | Source0: %{name}-%{unmangled_version}.tar.gz
|
|---|
| 11 | Patch0: urlgrabber-os2.patch
|
|---|
| 12 |
|
|---|
| 13 | License: LGPL
|
|---|
| 14 | Group: Development/Libraries
|
|---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|---|
| 16 | Prefix: %{_prefix}
|
|---|
| 17 | BuildArch: noarch
|
|---|
| 18 | Vendor: Michael D. Stenner, Ryan Tomayko <mstenner@linux.duke.edu, rtomayko@naeblis.cx>
|
|---|
| 19 | Url: http://linux.duke.edu/projects/urlgrabber/
|
|---|
| 20 |
|
|---|
| 21 | Requires: python(abi) = %{python_version}
|
|---|
| 22 | Requires: python-pycurl
|
|---|
| 23 |
|
|---|
| 24 | %description
|
|---|
| 25 | A high-level cross-protocol url-grabber.
|
|---|
| 26 |
|
|---|
| 27 | Using urlgrabber, data can be fetched in three basic ways:
|
|---|
| 28 |
|
|---|
| 29 | urlgrab(url) copy the file to the local filesystem
|
|---|
| 30 | urlopen(url) open the remote file and return a file object
|
|---|
| 31 | (like urllib2.urlopen)
|
|---|
| 32 | urlread(url) return the contents of the file as a string
|
|---|
| 33 |
|
|---|
| 34 | When using these functions (or methods), urlgrabber supports the
|
|---|
| 35 | following features:
|
|---|
| 36 |
|
|---|
| 37 | * identical behavior for http://, ftp://, and file:// urls
|
|---|
| 38 | * http keepalive - faster downloads of many files by using
|
|---|
| 39 | only a single connection
|
|---|
| 40 | * byte ranges - fetch only a portion of the file
|
|---|
| 41 | * reget - for a urlgrab, resume a partial download
|
|---|
| 42 | * progress meters - the ability to report download progress
|
|---|
| 43 | automatically, even when using urlopen!
|
|---|
| 44 | * throttling - restrict bandwidth usage
|
|---|
| 45 | * retries - automatically retry a download if it fails. The
|
|---|
| 46 | number of retries and failure types are configurable.
|
|---|
| 47 | * authenticated server access for http and ftp
|
|---|
| 48 | * proxy support - support for authenticated http and ftp proxies
|
|---|
| 49 | * mirror groups - treat a list of mirrors as a single source,
|
|---|
| 50 | automatically switching mirrors if there is a failure.
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 | %prep
|
|---|
| 54 | %setup -n %{name}-%{unmangled_version}
|
|---|
| 55 | %patch0 -p1 -b .os2~
|
|---|
| 56 |
|
|---|
| 57 | %build
|
|---|
| 58 | python setup.py build
|
|---|
| 59 |
|
|---|
| 60 | %install
|
|---|
| 61 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 62 | python setup.py install --root=$RPM_BUILD_ROOT --prefix %{_prefix} --record=INSTALLED_FILES
|
|---|
| 63 |
|
|---|
| 64 | %clean
|
|---|
| 65 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 66 |
|
|---|
| 67 | %files -f INSTALLED_FILES
|
|---|
| 68 | %defattr(-,root,root)
|
|---|
| 69 |
|
|---|
| 70 | %changelog
|
|---|
| 71 | * Sat Feb 28 2015 yd <yd@os2power.com> 3.10.1-10
|
|---|
| 72 | - rebuild with new python, fixes ticket#114.
|
|---|
| 73 |
|
|---|
| 74 | * Mon Feb 16 2015 yd <yd@os2power.com> 3.10.1-9
|
|---|
| 75 | - fix progress bar display for multifile download.
|
|---|
| 76 |
|
|---|
| 77 | * Mon Feb 09 2015 yd <yd@os2power.com> 3.10.1-8
|
|---|
| 78 | - fix progress bar display for multifile download.
|
|---|
| 79 |
|
|---|
| 80 | * Fri Feb 06 2015 yd <yd@os2power.com> 3.10.1-7
|
|---|
| 81 | - add python-curl requirement.
|
|---|
| 82 |
|
|---|
| 83 | * Thu Feb 05 2015 yd <yd@os2power.com> 3.10.1-6
|
|---|
| 84 | - source code update to 3.10.1.
|
|---|
| 85 |
|
|---|
| 86 | * Wed Jun 18 2014 yd
|
|---|
| 87 | - rebuild to fix for http://trac.netlabs.org/rpm/ticket/77
|
|---|
| 88 |
|
|---|
| 89 | * Tue Apr 08 2014 yd
|
|---|
| 90 | - workaround for http://trac.netlabs.org/rpm/ticket/71
|
|---|
| 91 |
|
|---|
| 92 | * Mon Apr 07 2014 yd
|
|---|
| 93 | - build for python 2.7.
|
|---|