Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/automatic/, net-p2p/automatic/files/
Date: Thu, 27 Oct 2016 21:34:15
Message-Id: 1477604047.4400c1f56ec027d6a472c25ae6ccd6805291ed35.monsieurp@gentoo
1 commit: 4400c1f56ec027d6a472c25ae6ccd6805291ed35
2 Author: Vladimir Pavljuchenko (SpiderX) <spiderx <AT> spiderx <DOT> dp <DOT> ua>
3 AuthorDate: Thu Oct 27 09:45:58 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 27 21:34:07 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4400c1f5
7
8 net-p2p/automatic: new ebuild.
9
10 Automatic is a RSS daemon that downloads torrent files matching regular
11 expression patterns at certain intervals. It is capable of adding downloaded
12 torrents directly to Transmission (www.transmissionbt.com), making it an
13 auto-downloader.
14
15 Base for ebuild from https://github.com/SpiderX/portage-overlay/tree/master/net-p2p/automatic
16
17 Gentoo-Bug: https://bugs.gentoo.org/477112
18
19 Package-Manager: portage-2.3.0
20 Closes: https://github.com/gentoo/gentoo/pull/2635
21
22 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
23
24 net-p2p/automatic/Manifest | 1 +
25 net-p2p/automatic/automatic-0.8.3.ebuild | 65 +++++++++++++++++++++++++++++
26 net-p2p/automatic/files/automatic.confd | 8 ++++
27 net-p2p/automatic/files/automatic.initd | 36 ++++++++++++++++
28 net-p2p/automatic/files/automatic.logrotate | 8 ++++
29 net-p2p/automatic/metadata.xml | 23 ++++++++++
30 6 files changed, 141 insertions(+)
31
32 diff --git a/net-p2p/automatic/Manifest b/net-p2p/automatic/Manifest
33 new file mode 100644
34 index 00000000..0186de5
35 --- /dev/null
36 +++ b/net-p2p/automatic/Manifest
37 @@ -0,0 +1 @@
38 +DIST automatic-0.8.3.tar.gz 102181 SHA256 1b5c5c65989d12dc7dcdd031dd7d0c1efad80062d615f63836ac86bd010908b8 SHA512 34061065d53ab362c9bfab9b66aebf7090b7079e5988b1984398410ab07ca2bdfdf3c65dd90bb076b6189120877784294484803d4ce5fa813d3bc13207aeebdd WHIRLPOOL 1c5703919b9009887c2b51428839b5e90fae493e6b5216e1e5aa199448c65ed71086c9e5308b874c8021a0a26aa01e41ea87cfa83d9e9f5bed56c144b5354939
39
40 diff --git a/net-p2p/automatic/automatic-0.8.3.ebuild b/net-p2p/automatic/automatic-0.8.3.ebuild
41 new file mode 100644
42 index 00000000..7ebedfa
43 --- /dev/null
44 +++ b/net-p2p/automatic/automatic-0.8.3.ebuild
45 @@ -0,0 +1,65 @@
46 +# Copyright 1999-2016 Gentoo Foundation
47 +# Distributed under the terms of the GNU General Public License v2
48 +# $Id$
49 +
50 +EAPI=6
51 +
52 +inherit autotools user
53 +
54 +DESCRIPTION="RSS downloader for Tranmission"
55 +HOMEPAGE="https://github.com/1100101/Automatic"
56 +SRC_URI="https://github.com/1100101/Automatic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
57 +
58 +LICENSE="GPL-2"
59 +SLOT="0"
60 +KEYWORDS="~amd64 ~x86"
61 +S="${WORKDIR}/${P^}"
62 +
63 +RDEPEND="dev-libs/libxml2:2
64 + dev-libs/libpcre:3
65 + net-misc/curl"
66 +DEPEND="${RDEPEND}
67 + app-admin/logrotate"
68 +
69 +src_prepare() {
70 + default
71 +
72 + # https://bugs.gentoo.org/426262
73 + mv configure.{in,ac} || die "rename failed"
74 +
75 + # Remove CFLAGS and CXXFLAGS defined by upstream
76 + sed -i \
77 + -e 's/CFLAGS="-Wdeclaration-after-statement -O3 -funroll-loops"/CFLAGS+=""/' \
78 + -e 's/CXXFLAGS="-O3 -funroll-loops"/CXXFLAGS+=""/' \
79 + configure.ac || die "sed for CXXFLAGS and CFLAGS failed"
80 +
81 + eautoreconf
82 +}
83 +
84 +src_install() {
85 + # Install and copy documentation
86 + default
87 +
88 + # Install Gentoo init script and its config
89 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
90 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
91 +
92 + # Create automatic related directories
93 + keepdir /var/lib/${PN}/
94 + keepdir /var/log/${PN}/
95 +
96 + # Install logrotate for automatic
97 + insinto /etc/logrotate.d
98 + newins "${FILESDIR}"/${PN}.logrotate ${PN}
99 +}
100 +
101 +pkg_postinst() {
102 + # Add automatic group and user to system
103 + enewgroup ${PN}
104 + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
105 +
106 + elog ""
107 + elog "To run automatic you should move /etc/automatic.conf-sample to /etc/automatic.conf and config it."
108 + elog "If things go wrong, increase verbose level in /etc/conf.d/automatic and check log file in /var/log/automatic/"
109 + elog ""
110 +}
111
112 diff --git a/net-p2p/automatic/files/automatic.confd b/net-p2p/automatic/files/automatic.confd
113 new file mode 100644
114 index 00000000..5e9ae5d
115 --- /dev/null
116 +++ b/net-p2p/automatic/files/automatic.confd
117 @@ -0,0 +1,8 @@
118 +# Config file for /etc/init.d/automatic
119 +
120 +# Various options.
121 +# run `samplicator -h` for valid cmdline options
122 +OPTS="-v 1 -a -l /var/log/automatic/automatic.log"
123 +
124 +# Receiver config file
125 +CONFIG="-c /etc/automatic.conf"
126
127 diff --git a/net-p2p/automatic/files/automatic.initd b/net-p2p/automatic/files/automatic.initd
128 new file mode 100644
129 index 00000000..a5c6189
130 --- /dev/null
131 +++ b/net-p2p/automatic/files/automatic.initd
132 @@ -0,0 +1,36 @@
133 +#!/sbin/openrc-run
134 +
135 +NAME=${SVCNAME##*.}
136 +if [ -n "${NAME}" -a "${SVCNAME}" != "automatic" ]; then
137 + PID="/run/automatic.${NAME}.pid"
138 + PNAME=$(echo ${RC_SVCNAME} | sed 's/\..*//g')
139 + CONF_DEFAULT="/etc/conf.d/automatic.${NAME}"
140 +else
141 + PID="/run/automatic.pid"
142 + PNAME=${RC_SVCNAME}
143 + CONF_DEFAULT="/etc/conf.d/automatic"
144 +fi
145 +CONF=${CONF:-${CONF_DEFAULT}}
146 +EXEC=${EXEC:-/usr/bin/automatic}
147 +
148 +depend() {
149 + need net
150 + provide automatic
151 +}
152 +
153 +start() {
154 + ebegin "Starting automatic"
155 + start-stop-daemon --start --quiet --make-pidfile --pidfile ${PID} --exec ${EXEC} -- ${OPTS} ${CONFIG}
156 + eend $?
157 +}
158 +
159 +start_post() {
160 + pgrep -n $(echo ${PNAME}) > ${PID}
161 +}
162 +
163 +stop() {
164 + ebegin "Stopping automatic"
165 + start-stop-daemon --stop --quiet --pidfile ${PID}
166 + rm -f ${PID}
167 + eend $?
168 +}
169
170 diff --git a/net-p2p/automatic/files/automatic.logrotate b/net-p2p/automatic/files/automatic.logrotate
171 new file mode 100644
172 index 00000000..1af9c5c
173 --- /dev/null
174 +++ b/net-p2p/automatic/files/automatic.logrotate
175 @@ -0,0 +1,8 @@
176 +/var/log/automatic/*.log {
177 + daily
178 + missingok
179 + rotate 90
180 + compress
181 + notifempty
182 + copytruncate
183 +}
184
185 diff --git a/net-p2p/automatic/metadata.xml b/net-p2p/automatic/metadata.xml
186 new file mode 100644
187 index 00000000..6c232fd
188 --- /dev/null
189 +++ b/net-p2p/automatic/metadata.xml
190 @@ -0,0 +1,23 @@
191 +<?xml version="1.0" encoding="UTF-8"?>
192 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
193 +<pkgmetadata>
194 + <maintainer type="person">
195 + <email>spiderx@××××××××××.ua</email>
196 + <name>Vladimir Pavljuchenkov</name>
197 + <description>Proxied maintainer; set to assignee in all bugs</description>
198 + </maintainer>
199 + <maintainer type="project">
200 + <email>proxy-maint@g.o</email>
201 + <name>Proxy Maintainers</name>
202 + </maintainer>
203 + <longdescription lang="en">
204 +Automatic is a RSS daemon that downloads torrent files
205 +matching regular expression patterns at certain intervals.
206 +It is capable of adding downloaded torrents directly to Transmission.
207 + </longdescription>
208 + <upstream>
209 + <changelog>https://github.com/1100101/Automatic/blob/master/ChangeLog</changelog>
210 + <bugs-to>https://github.com/1100101/Automatic/issues</bugs-to>
211 + <remote-id type="github">1100101/Automatic</remote-id>
212 + </upstream>
213 +</pkgmetadata>