rpms/hellanzb/EL-5 hellanzb-configuration-location3.patch, NONE, 1.1 hellanzb-remove-bogus-shebang.patch, NONE, 1.1 hellanzb-unrar-is-optional.patch, NONE, 1.1 hellanzb.spec, NONE, 1.1
Conrad Meyer (konradm)
fedora-extras-commits at redhat.com
Sun Aug 10 15:38:57 UTC 2008
- Previous message (by thread): rpms/hellanzb/F-9 hellanzb-configuration-location3.patch, NONE, 1.1 hellanzb-remove-bogus-shebang.patch, NONE, 1.1 hellanzb-unrar-is-optional.patch, NONE, 1.1 hellanzb.spec, NONE, 1.1
- Next message (by thread): rpms/hellanzb/F-8 hellanzb-configuration-location3.patch, NONE, 1.1 hellanzb-remove-bogus-shebang.patch, NONE, 1.1 hellanzb-unrar-is-optional.patch, NONE, 1.1 hellanzb.spec, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: konradm
Update of /cvs/pkgs/rpms/hellanzb/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28386
Added Files:
hellanzb-configuration-location3.patch
hellanzb-remove-bogus-shebang.patch
hellanzb-unrar-is-optional.patch hellanzb.spec
Log Message:
Initial import (try two).
hellanzb-configuration-location3.patch:
--- NEW FILE hellanzb-configuration-location3.patch ---
--- Hellanzb/Core.py.orig 2008-08-05 23:50:37.000000000 -0700
+++ Hellanzb/Core.py 2008-08-06 00:02:39.000000000 -0700
@@ -32,14 +32,13 @@
return
else:
error('Unable to load specified config file: ' + optionalConfigFile)
sys.exit(1)
- # look for conf in this order: sys.prefix, ./, or ./etc/
- confDirs = [os.path.join(sys.prefix, 'etc')]
+ # look for conf in this order: $HOME/, /etc, or ./
+ confDirs = [os.environ['HOME'], '/etc']
try:
- confDirs.append(os.path.join(os.getcwd(), 'etc'))
confDirs.append(os.getcwd())
except OSError, ose:
if ose.errno != 2:
raise
# OSError: [Errno 2] No such file or directory. cwd doesn't exist
@@ -49,16 +48,22 @@
if Hellanzb.SYSNAME == "Darwin":
confDirs[0] = '/opt/local/etc'
for dir in confDirs:
file = os.path.join(dir, 'hellanzb.conf')
+ file2 = os.path.join(dir, '.hellanzb.conf')
if loadConfig(file):
Hellanzb.CONFIG_FILENAME = file
return
+ elif loadConfig(file2):
+ Hellanzb.CONFIG_FILENAME = file2
+ return
error('Could not find configuration file in the following dirs: ' + str(confDirs))
+ readmeFedora = "*DOCDIR*/*PKGNAME*/README.Fedora"
+ print open(readmeFedora).read().strip()
sys.exit(1)
def loadConfig(fileName):
""" Attempt to load the specified config file. If successful, clean the variables/data the
config file has setup """
hellanzb-remove-bogus-shebang.patch:
--- NEW FILE hellanzb-remove-bogus-shebang.patch ---
--- Hellanzb/Growl.py.orig 2008-07-19 18:08:13.000000000 -0700
+++ Hellanzb/Growl.py 2008-07-19 18:08:45.000000000 -0700
@@ -1,7 +1,5 @@
-#!/usr/bin/env python
-
"""Growl 0.6 Network Protocol Client for Python"""
__version__ = "0.6" # will always match Growl version
__author__ = "Rui Carmo (http://the.taoofmac.com)"
__copyright__ = "(C) 2004 Rui Carmo. Code under BSD License."
__contributors__ = "Ingmar J Stein (Growl Team)"
hellanzb-unrar-is-optional.patch:
--- NEW FILE hellanzb-unrar-is-optional.patch ---
--- Hellanzb/Core.py.orig 2008-07-21 06:05:16.000000000 -0700
+++ Hellanzb/Core.py 2008-07-21 06:06:23.000000000 -0700
@@ -94,11 +94,18 @@
Hellanzb.MAX_RATE = 0
else:
Hellanzb.MAX_RATE = int(Hellanzb.MAX_RATE)
if not hasattr(Hellanzb, 'UNRAR_CMD') or Hellanzb.UNRAR_CMD is None:
- Hellanzb.UNRAR_CMD = assertIsExe(['rar', 'unrar'])
+ # unrar is optional when it is not installed or not specified in conf
+ Hellanzb.UNRAR_CMD = None
+ try:
+ Hellanzb.UNRAR_CMD = assertIsExe(['rar', 'unrar'])
+ except FatalError:
+ # if unrar isn't available, skip it and warn the user
+ print "Warning -- unrar was not found. Disabling unraring."
+ Hellanzb.SKIP_UNRAR = True
else:
Hellanzb.UNRAR_CMD = assertIsExe([Hellanzb.UNRAR_CMD])
if not hasattr(Hellanzb, 'PAR2_CMD') or Hellanzb.PAR2_CMD is None:
Hellanzb.PAR2_CMD = assertIsExe(['par2'])
--- NEW FILE hellanzb.spec ---
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: hellanzb
Version: 0.13
Release: 5%{?dist}
Summary: Hands-free nzb downloader and post processor
Group: Applications/Internet
License: BSD
URL: http://www.hellanzb.com/trac/
Source0: http://www.hellanzb.com/distfiles/hellanzb-%{version}.tar.gz
Source1: hellanzb-README.Fedora
# Make hellanzb check in $HOME, then /etc, then cwd. Print Fedora-specific
# README if no config is found.
Patch0: hellanzb-configuration-location3.patch
# Disable unrar functionality if the command is not found in PATH.
Patch1: hellanzb-unrar-is-optional.patch
# Remove a bogus shebang from a library that rpmlint doesn't like.
Patch2: hellanzb-remove-bogus-shebang.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildArch: noarch
Requires: par2cmdline
Requires: python-twisted
Requires: python-twisted-web
Requires: python-yenc
%description
hellanzb is an easy to use application designed to retrieve nzb files
and fully process them. The goal being to make getting files from Usenet
as hands-free as possible. Once fully installed, all that's required
is moving an nzb file to the queue directory. The rest: downloading,
par-checking, un-raring, etc. is done automatically by hellanzb.
%prep
%setup -q
%patch0
sed --in-place 's|\*DOCDIR\*|%{_docdir}|' Hellanzb/Core.py
sed --in-place 's|\*PKGNAME\*|%{name}|' Hellanzb/Core.py
%patch1
%patch2
%build
%{__python} -c 'import setuptools; execfile("setup.py")' build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root $RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT/%{_bindir}/%{name}.py $RPM_BUILD_ROOT/%{_bindir}/%{name}
rm $RPM_BUILD_ROOT/usr/etc/%{name}.conf.sample
mv etc/hellanzb.conf.sample $RPM_BUILD_ROOT/%{_docdir}/%{name}/
cp %{SOURCE1} $RPM_BUILD_ROOT/%{_docdir}/%{name}/README.Fedora
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_docdir}/%{name}/
%{python_sitelib}/*
%{_bindir}/%{name}
%changelog
* Wed Aug 6 2008 Conrad Meyer <konrad at tylerc.org> - 0.13-5
- Re-seperated unrar and configuration patches.
* Tue Aug 5 2008 Conrad Meyer <konrad at tylerc.org> - 0.13-4
- Add missing BR to build in mock/koji.
- Patched to look in /etc instead of /usr/etc for configuration.
- Patched to inform user that configuration is needed if no configuration
can be found.
* Mon Jul 21 2008 Conrad Meyer <konrad at tylerc.org> - 0.13-3
- Patch to make unrar optional.
* Sat Jul 19 2008 Conrad Meyer <konrad at tylerc.org> - 0.13-2
- Look for configuration on a per-user basis (~/.hellanzb.conf).
- Move sample config to %%doc.
- Add a README.RPMFusion.
* Mon Jun 2 2008 Conrad Meyer <konrad at tylerc.org> - 0.13-1
- Initial revision.
- Previous message (by thread): rpms/hellanzb/F-9 hellanzb-configuration-location3.patch, NONE, 1.1 hellanzb-remove-bogus-shebang.patch, NONE, 1.1 hellanzb-unrar-is-optional.patch, NONE, 1.1 hellanzb.spec, NONE, 1.1
- Next message (by thread): rpms/hellanzb/F-8 hellanzb-configuration-location3.patch, NONE, 1.1 hellanzb-remove-bogus-shebang.patch, NONE, 1.1 hellanzb-unrar-is-optional.patch, NONE, 1.1 hellanzb.spec, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list