rpms/hellanzb/devel hellanzb-README.Fedora, NONE, 1.1 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 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Conrad Meyer (konradm) fedora-extras-commits at redhat.com
Sun Aug 10 15:26:20 UTC 2008


Author: konradm

Update of /cvs/pkgs/rpms/hellanzb/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26869/devel

Modified Files:
	.cvsignore sources 
Added Files:
	hellanzb-README.Fedora hellanzb-configuration-location3.patch 
	hellanzb-remove-bogus-shebang.patch 
	hellanzb-unrar-is-optional.patch hellanzb.spec import.log 
Log Message:
Initial import into Fedora.



--- NEW FILE hellanzb-README.Fedora ---
Thanks for installing the Fedora package of hellanzb. To configure
the client for use, copy /usr/share/doc/hellanzb/hellanzb.conf.sample to
$HOME/.hellanzb.conf and edit it appropriately. To start hellanzb, just
run 'hellanzb -D'. To enqueue nzbs, drop them in the queue directory as
configured in your $HOME/.hellanzb.conf.

If you want Hellanzb to automatically unrar downloaded files, install
the 'unrar' from a repository that provides packages Fedora can't.

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.


--- NEW FILE import.log ---
hellanzb-0_13-5_fc9:HEAD:hellanzb-0.13-5.fc9.src.rpm:1218381246


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/hellanzb/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	10 Aug 2008 01:06:03 -0000	1.1
+++ .cvsignore	10 Aug 2008 15:25:50 -0000	1.2
@@ -0,0 +1 @@
+hellanzb-0.13.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/hellanzb/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	10 Aug 2008 01:06:03 -0000	1.1
+++ sources	10 Aug 2008 15:25:50 -0000	1.2
@@ -0,0 +1 @@
+d3510c6b1b2c7b935332a469fdc8e7e2  hellanzb-0.13.tar.gz




More information about the fedora-extras-commits mailing list