blob: 7ff1f70ff24fe38f26927484824916ddf8b5d83b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils java-pkg
MY_P="${PN}-src-${PVR:0:3}-${PVR/*_/}-${PVR:4:1}"
DESCRIPTION="nntp//rss is a Java-based bridge between RSS feeds and NNTP clients, enabling you to read your favorite RSS syndicated content within your existing NNTP newsreader"
HOMEPAGE="http://www.methodize.org/nntprss/"
SRC_URI="http://www.gunnarwrobel.de/downloads/${MY_P}.tar.gz"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86"
IUSE=""
RDEPEND=">=virtual/jre-1.4"
DEPEND="
www-servers/jetty
dev-db/hsqldb
>=dev-java/jdbm-1.0
dev-java/log4j
dev-java/crimson
dev-java/xmlrpc
dev-java/ant-core
dev-java/commons-httpclient
dev-java/commons-dbcp
<=dev-java/jdbc-mysql-3.0.17
dev-java/sun-j2ee
>=virtual/jdk-1.4
"
S="${WORKDIR}/${PN}"
src_unpack() {
unpack ${A}
cd ${S}
rm LICENSE.TXT
cd src/org/methodize/nntprss/
## Windows Systray? Be gone...
rm Startup.java WindowsSysTray.java
## No derby in Gentoo yet. Have to stick to MySQL.
rm feed/db/DerbyChannelDAO.java
cd ../../../../
## Fixes for removed systray and gentoo
## java package structure
epatch ${FILESDIR}/nntprss-sanitize.patch
}
src_compile() {
local antflags="all"
ant ${antflags} || die "Compilation failed!"
}
src_install() {
dodoc README.TXT CHANGELOG
rm README.TXT CHANGELOG
java-pkg_dojar ${S}/nntprss.jar
XMLDIR=${shareroot}/xml
ETCDIR=/etc/${PN}
INIDIR=/etc/init.d
dodir ${XMLDIR}
insinto ${XMLDIR}
doins ${S}/src/xml/publish-config.xml
cd ${FILESDIR}
dodir ${ETCDIR}
insinto ${ETCDIR}
doins nntprss-config.xml
doins log4j.properties
insinto ${INIDIR}
newins nntprss-init nntprss
dobin nntprss
}
pkg_postinst() {
einfo "You need to create a mysql database for your"
einfo "nntprss installation and correct the settings"
einfo "in ${ETCDIR}/nntprss-config.xml"
einfo ""
einfo "> mysql -u root -p -e \"CREATE DATABASE nntprss;"
einfo " GRANT ALL PRIVILEGES ON nntprss.* TO 'nntprss'@'localhost' "
einfo " IDENTIFIED BY 'w0rldn3ws';"
einfo " FLUSH PRIVILEGES;\""
einfo ""
einfo "Then you can start nntprss using the init"
einfo "script. The application can be controlled"
einfo "by a web frontend that is configured to "
einfo "listen on port 7810."
einfo ""
einfo "The default port for the news server has been"
einfo "set to 9119. You can change it to 119 (the"
einfo "default news port) in case you have no other"
einfo "news server running."
}
|