summaryrefslogtreecommitdiff
blob: 42ffd36605ae381bb84c3c0d34bc0946904da890 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-news/inn/inn-2.4.1.ebuild,v 1.7 2004/10/17 20:56:51 dholm Exp $

inherit eutils java-pkg

MY_PN="nntprss"
MY_PV="0.5-beta-1"
MY_P="${MY_PN}-src-${MY_PV}.tar.gz"

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="mirror://sourceforge/${PN}/${MY_P}"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86"
IUSE=""

RDEPEND=">=virtual/jre-1.4"

DEPEND="
www-servers/jetty
dev-db/hsqldb
dev-java/jdbm
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
dev-java/sun-j2ee
>=virtual/jdk-1.4
"

S="${WORKDIR}/${MY_PN}"

src_unpack() {

	unpack ${MY_P}
	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

	dosbin 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 "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."
}