summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Picavet (SebastienP) <sebastien.picavet@gmail.com>2012-05-19 21:23:45 +0200
committerSébastien Picavet (SebastienP) <sebastien.picavet@gmail.com>2012-05-19 21:23:45 +0200
commit36f88a9d5eb1ca82b3db84a408157d0d2e39911f (patch)
tree52b9c87f634ca7969f78cb1735fcffe78a683cfe
parentdev-python/yenc: New Ebuild for bug #168192 thanks to Roeland Douma, floppym,... (diff)
downloadsunrise-36f88a9d5eb1ca82b3db84a408157d0d2e39911f.tar.gz
sunrise-36f88a9d5eb1ca82b3db84a408157d0d2e39911f.tar.bz2
sunrise-36f88a9d5eb1ca82b3db84a408157d0d2e39911f.zip
net-nntp/sabnzbd: New Ebuild for bug #132590 thanks to Mekong, Patrick van Dissel, Pandor, Roeland Douma, Chris Volny, Thomas Kuther, hasufell, Aniruddha, Kfir Ozer, Matthew Hamilton, Lyall Pearce, Tommy[D], floppym and octalc0de@aim.com
-rw-r--r--net-nntp/sabnzbd/ChangeLog13
-rw-r--r--net-nntp/sabnzbd/Manifest8
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.conf28
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.ini131
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.init38
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.logrotate8
-rw-r--r--net-nntp/sabnzbd/metadata.xml9
-rw-r--r--net-nntp/sabnzbd/sabnzbd-0.6.15.ebuild92
8 files changed, 327 insertions, 0 deletions
diff --git a/net-nntp/sabnzbd/ChangeLog b/net-nntp/sabnzbd/ChangeLog
new file mode 100644
index 000000000..492d5322f
--- /dev/null
+++ b/net-nntp/sabnzbd/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for net-nntp/sabnzbd
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*sabnzbd-0.6.15 (19 May 2012)
+
+ 19 May 2012; Sébastien Picavet (SebastienP) sebastien.picavet@gmail.com
+ +sabnzbd-0.6.15.ebuild, +files/sabnzbd.conf, +files/sabnzbd.ini,
+ +files/sabnzbd.init, +files/sabnzbd.logrotate, +metadata.xml:
+ New Ebuild for bug #132590 thanks to Mekong, Patrick van Dissel, Pandor,
+ Roeland Douma, Chris Volny, Thomas Kuther, hasufell, Aniruddha, Kfir Ozer,
+ Matthew Hamilton, Lyall Pearce, Tommy[D], floppym and octalc0de@aim.com
+
diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest
new file mode 100644
index 000000000..011fb5b8a
--- /dev/null
+++ b/net-nntp/sabnzbd/Manifest
@@ -0,0 +1,8 @@
+AUX sabnzbd.conf 939 RMD160 97a773a904680faea4e3b096df2ee119052d9f59 SHA1 611c1374d4cd9797795ea75477ccffb0a1661ad1 SHA256 99c7a4259b43e63813f15c130242c991e015315f837517cdd53f7d3db3c500ac
+AUX sabnzbd.ini 2360 RMD160 a543cee8c63781b3dac4b817a738cdbec03dcc07 SHA1 4f88ac6e1f08e6a642e76f4529d0d801678e9b84 SHA256 54120a1f1514bddff0dc8d1a03b815634a64e6c3169d0fd4eb99d2a65da4f3d7
+AUX sabnzbd.init 844 RMD160 c65fce70e7d8b546763820074251cd8a0285c01b SHA1 1fad7196a5928da987886b6e3ee6d9ad9aafc071 SHA256 9d9929badc1e95d62b0fec5a26acc680f963b7a6b483a483f622a212b1e45476
+AUX sabnzbd.logrotate 177 RMD160 94e68615e00bde47898528c8ef6f1d71a2505398 SHA1 e41772a64520c8a84f975f8b6bae246562c86e00 SHA256 0063c24056a2dfaa48192089451adfc6647bbb201f7c64185ee0f710d29af61a
+DIST SABnzbd-0.6.15-src.tar.gz 1949179 RMD160 863c0e42521467ffc52526368a0b9c1b9ba8d864 SHA1 e6d64ec35e837fe634d6e45234ec64c49cbb7e3b SHA256 a1f6cd461123b7787d99d87d509c08a9607f3d01d447af3d0f3826b760bf2eb6
+EBUILD sabnzbd-0.6.15.ebuild 2317 RMD160 048ad3eee4dd5629df61bfe2cfe9397522819750 SHA1 11ec20cf24a950947060880c59f5ffb1e40e7610 SHA256 19f3aaff537f2ef6f4ba543725e9d4758aeb50c0c133bafed936381cef652b64
+MISC ChangeLog 581 RMD160 eef3c10a1baf0087c626b665d23511879071400f SHA1 5ac4601c7877198de8e6404abe056797c211076c SHA256 e6dcb3a7a5f71569e90b0cae1c00ab148593bd1a6cd293b080016bffda223cc3
+MISC metadata.xml 356 RMD160 7f3b94a8ee910890837bbc95646830b502d24dd0 SHA1 e2598f16aa025b61ca640945f963315a504c594d SHA256 50fbec85a2726713c2917c8a088fc25cfee1519c8f387d46987d101e83ee63b9
diff --git a/net-nntp/sabnzbd/files/sabnzbd.conf b/net-nntp/sabnzbd/files/sabnzbd.conf
new file mode 100644
index 000000000..8da7d5a64
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.conf
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Config file for sabnzbd init script
+
+# Version of Python (“2.6”, “2.7” or “2”; default should work for almost everyone)
+SAB_PYTHON="python2"
+
+SAB_PY="SABnzbd.py"
+SAB_PATH="/usr/share/sabnzbd/"
+
+# This overrides the contents of /etc/sabnzbd.conf, needed for shutdown to work in init (short of writing some crazy regex for the config)
+# If you use SSL, SAB_PORT will be “9090” instead of “8080”
+SAB_HOSTNAME="localhost"
+SAB_PORT="8080"
+
+SAB_PID_FOLDER="/var/run/sabnzbd"
+SAB_PID="${SAB_PID_FOLDER}/sabnzbd-${SAB_PORT}.pid"
+
+SAB_LOG_FOLDER="/var/log/sabnzbd"
+
+# Location of config file.
+# Make sure the user specified below can read this file. (if you want to change options from the webUI, give it write)
+SAB_CFG="/var/lib/sabnzbd/config/sabnzbd.ini"
+
+# Which user to run sabnzbd
+SAB_USER="sabnzbd" \ No newline at end of file
diff --git a/net-nntp/sabnzbd/files/sabnzbd.ini b/net-nntp/sabnzbd/files/sabnzbd.ini
new file mode 100644
index 000000000..395fc3a44
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.ini
@@ -0,0 +1,131 @@
+__version__ = 19
+[misc]
+log_dir = /var/log/sabnzbd
+auto_browser = 0
+permissions = 0775
+check_new_rel = 1
+replace_spaces = 0
+fail_on_crc = 0
+enable_filejoin = 0
+enable_unzip = 1
+enable_unrar = 1
+enable_par_cleanup = 1
+par_option = ""
+config_lock = 0
+safe_postproc = 0
+pause_on_post_processing = 0
+cleanup_list = ""
+ignore_samples = 0
+send_group = 0
+download_free = 0
+admin_dir = /var/lib/sabnzbd/admin
+cache_dir = /var/lib/sabnzbd/cache
+complete_dir = /var/lib/sabnzbd/complete
+download_dir = /var/lib/sabnzbd/download
+dirscan_dir = /var/lib/sabnzbd/dirscan
+incomplete_dir = /var/lib/sabnzbd/incomplete
+nzb_backup_dir =
+script_dir =
+dirscan_speed = 5
+refresh_rate = 0
+rss_rate = 60
+bandwith_limit = 0
+cache_limit = 0
+email_server = ""
+email_to = ""
+email_from = ""
+email_account = ""
+email_pwd = ""
+email_endjob = 0
+email_full = 0
+schedlines = ,
+dirscan_opts = 3
+dirscan_script = ""
+top_only = 1
+auto_sort = 0
+enable_tv_sorting = 0
+tv_sort_string = ""
+web_color = ""
+web_color2 = ""
+host = 0.0.0.0
+port = 8080
+web_dir = smpl
+web_dir2 = ""
+username = sabnzbd
+password = secret
+apikey = ""
+[logging]
+enable_cherrypy_logging = 2
+log_level = 2
+max_log_size = 0
+log_backups = 0
+[newzbin]
+username = ""
+password = ""
+bookmarks = 0
+unbookmark = 0
+bookmark_rate = 60
+[servers]
+##example
+#[[news-europe.giganews.com:119]]
+#host = news-europe.giganews.com
+#port = 119
+#username = changeme
+#password = changeme
+#timeout = 120
+#connections = 5
+#fillserver = 0
+## 0 to disable SSL
+#ssl = 0
+## example using SSL
+#[[news-europe.giganews.com:563]]
+#host = news-europe.giganews.com
+#port = 563
+#username = changeme
+#password = changeme
+#timeout = 120
+#connections = 5
+#fillserver = 0
+## 0 to disable SSL
+#ssl = 1
+[rss]
+[categories]
+[[unknown]]
+newzbin = Unknown
+dir = Unknown
+[[anime]]
+newzbin = Anime
+dir = Anime
+[[apps]]
+newzbin = Apps
+dir = Apps
+[[books]]
+newzbin = Books
+dir = Books
+[[consoles]]
+newzbin = Consoles
+dir = Consoles
+[[emulation]]
+newzbin = Emulation
+dir = Emulation
+[[games]]
+newzbin = Games
+dir = Games
+[[misc]]
+newzbin = Misc
+dir = Misc
+[[movies]]
+newzbin = Movies
+dir = Movies
+[[music]]
+newzbin = Music
+dir = Music
+[[pda]]
+newzbin = PDA
+dir = PDA
+[[resources]]
+newzbin = Resources
+dir = Resources
+[[tv]]
+newzbin = TV
+dir = TV
diff --git a/net-nntp/sabnzbd/files/sabnzbd.init b/net-nntp/sabnzbd/files/sabnzbd.init
new file mode 100644
index 000000000..57943f68e
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.init
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting SABnzbd"
+
+ # Control if folders exist and create them
+ if [[ ! -d "${SAB_PID_FOLDER}" ]]
+ then
+ mkdir "${SAB_PID_FOLDER}"
+ chmod 770 "${SAB_PID_FOLDER}"
+ chgrp "${SAB_USER}" "${SAB_PID_FOLDER}"
+
+ fi
+
+ if [[ ! -d "${SAB_LOG_FOLDER}" ]]
+ then
+ mkdir "${SAB_LOG_FOLDER}"
+ chmod 770 "${SAB_LOG_FOLDER}"
+ chgrp "${SAB_USER}" "${SAB_LOG_FOLDER}"
+
+ fi
+
+ start-stop-daemon --start --quiet --user "${SAB_USER}" --pidfile "${SAB_PID}" -d "${SAB_PATH}" --exec "${SAB_PYTHON}" "${SAB_PY}" -- -d -f "${SAB_CFG}" --pid "${SAB_PID_FOLDER}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping SABnzbd"
+ start-stop-daemon --stop --retry 30 --pidfile "${SAB_PID}"
+ eend $?
+}
diff --git a/net-nntp/sabnzbd/files/sabnzbd.logrotate b/net-nntp/sabnzbd/files/sabnzbd.logrotate
new file mode 100644
index 000000000..9bbdab192
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.logrotate
@@ -0,0 +1,8 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+/var/log/sabnzbd/*.log{
+ missingok
+ su sabnzbd sabnzbd
+} \ No newline at end of file
diff --git a/net-nntp/sabnzbd/metadata.xml b/net-nntp/sabnzbd/metadata.xml
new file mode 100644
index 000000000..da3409852
--- /dev/null
+++ b/net-nntp/sabnzbd/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-news</herd>
+ <maintainer>
+ <email>maintainer-wanted@gentoo.org</email>
+ </maintainer>
+ <longdescription>Binary newsgrabber in Python, with web-interface. Successor of old SABnzbd project.</longdescription>
+</pkgmetadata> \ No newline at end of file
diff --git a/net-nntp/sabnzbd/sabnzbd-0.6.15.ebuild b/net-nntp/sabnzbd/sabnzbd-0.6.15.ebuild
new file mode 100644
index 000000000..5b9d9258a
--- /dev/null
+++ b/net-nntp/sabnzbd/sabnzbd-0.6.15.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+# Require python-2 with sqlite USE flag
+PYTHON_DEPEND="2:2.6"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python user
+
+MY_P="${P/sab/SAB}"
+
+DESCRIPTION="Binary newsgrabber in Python, with web-interface. Successor of old SABnzbd project"
+HOMEPAGE="http://www.sabnzbd.org/"
+SRC_URI="mirror://sourceforge/sabnzbdplus/${MY_P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="
+ app-arch/par2cmdline
+ app-arch/unrar
+ app-arch/unzip
+ dev-python/cheetah
+ dev-python/pyopenssl
+ dev-python/yenc
+"
+
+S="${WORKDIR}/${MY_P}"
+DHOMEDIR="/var/lib/${PN}"
+
+pkg_setup() {
+ # Control PYTHON_USE_WITH
+ python_set_active_version 2
+ python_pkg_setup
+
+ # Create sabnzbd group
+ enewgroup ${PN}
+ # Create sabnzbd user, put in sabnzbd group
+ enewuser ${PN} -1 -1 "${DHOMEDIR}" ${PN}
+}
+
+src_install() {
+ dodoc {ABOUT,CHANGELOG,ISSUES,README}.txt Sample-PostProc.sh
+
+ newconfd "${FILESDIR}/${PN}.conf" ${PN}
+
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ # Default configuration file
+ insinto "${DHOMEDIR}/config"
+ doins "${FILESDIR}/${PN}.ini"
+
+ # Assign ownership of SABnzbd default directory
+ fowners -R root:${PN} "${DHOMEDIR}"
+ fperms -R 770 "${DHOMEDIR}"
+
+ # Rotation of logfile
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # Add themes & code into /usr/share
+ insinto /usr/share/${PN}
+ doins -r cherrypy email gntp interfaces locale po sabnzbd SABnzbd.py tools util
+
+ # Adjust permissions in python source directory for root:sabnzbd
+ fowners -R root:${PN} /usr/share/${PN}
+ fperms -R 770 /usr/share/${PN}
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ elog "SABnzbd has been installed with default directories in ${DHOMEDIR}"
+ elog
+ elog "Please configure /etc/conf.d/${PN} before starting as daemon!"
+ elog "If you use SSL connection for SABnzbd WebUi, you have to change SAB_PORT with “9090”."
+ elog
+ elog "Start with ${ROOT}etc/init.d/${PN} start"
+ elog "Visit http://<host ip>:8080 to configure SABnzbd"
+ elog "Default web username/password : sabnzbd/secret"
+ elog
+ elog "Add CONFIG_PROTECT=\"${DHOMEDIR}/config\" to your make.conf. Otherwise, we will lose your personal configuration"
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+} \ No newline at end of file