/[gentoo-x86]/net-im/openfire/openfire-3.7.1-r1.ebuild
Gentoo

Contents of /net-im/openfire/openfire-3.7.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Jun 26 19:25:47 2012 UTC (2 years, 3 months ago) by slyfox
Branch: MAIN
Create /var/run/jabber at startup if missing (tmpfs case). Thanks to Timo Rothenpieler who found and analyzed issue in bug #423367.

(Portage version: 2.2.0_alpha110_p5/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-im/openfire/openfire-3.7.1.ebuild,v 1.2 2012/05/16 03:34:45 slyfox Exp $
4
5 inherit eutils java-pkg-2 java-ant-2
6
7 MY_P=${PN}_src_${PV//./_}
8 DESCRIPTION="Openfire (formerly wildfire) real time collaboration (RTC) server"
9 HOMEPAGE="http://www.igniterealtime.org/projects/openfire/"
10 SRC_URI="http://www.igniterealtime.org/builds/openfire/${MY_P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="doc"
16
17 RDEPEND=">=virtual/jre-1.5"
18 DEPEND="net-im/jabber-base
19 ~dev-java/ant-contrib-1.0_beta2
20 >=virtual/jdk-1.5"
21
22 S=${WORKDIR}/${PN}_src
23
24 RESTRICT=""
25
26 pkg_setup() {
27 if [ -f /etc/env.d/98openfire ]; then
28 einfo "This is an upgrade"
29 ewarn "As the plugin API changed, at least these plugins need to be updated also:"
30 ewarn "User Search, IM Gateway, Fastpath, Monitoring"
31 ewarn "hey can be downloaded via Admin Console or at"
32 ewarn "${HOMEPAGE}"
33 else
34 ewarn "If this is an upgrade stop right ( CONTROL-C ) and run the command:"
35 ewarn "echo 'CONFIG_PROTECT=\"/opt/openfire/resources/security/\"' > /etc/env.d/98openfire "
36 ewarn "For more info see bug #139708"
37 sleep 11
38 fi
39 java-pkg-2_pkg_setup
40 }
41
42 src_unpack() {
43 unpack ${A}
44 cd "${S}"
45 epatch "${FILESDIR}"/buildxml.patch
46 epatch "${FILESDIR}"/buildxml-ant.patch
47 epatch "${FILESDIR}"/${P}-buildxml-jdk7.patch
48
49 # TODO should replace jars in build/lib with ones packaged by us -nichoj
50 }
51
52 src_compile() {
53 # Jikes doesn't support -source 1.5
54 java-pkg_filter-compiler jikes
55
56 ANT_TASKS="ant-contrib"
57 eant -f build/build.xml openfire plugins $(use_doc)
58 }
59
60 src_install() {
61 dodir /opt/openfire
62
63 newinitd "${FILESDIR}"/openfire-initd openfire
64 newconfd "${FILESDIR}"/openfire-confd openfire
65
66 dodir /opt/openfire/conf
67 insinto /opt/openfire/conf
68 newins target/openfire/conf/openfire.xml openfire.xml.sample
69
70 dodir /opt/openfire/logs
71 keepdir /opt/openfire/logs
72
73 dodir /opt/openfire/lib
74 insinto /opt/openfire/lib
75 doins target/openfire/lib/*
76
77 dodir /opt/openfire/plugins
78 insinto /opt/openfire/plugins
79 doins -r target/openfire/plugins/*
80
81 dodir /opt/openfire/resources
82 insinto /opt/openfire/resources
83 doins -r target/openfire/resources/*
84
85 if use doc; then
86 dohtml -r documentation/docs/*
87 fi
88 dodoc documentation/dist/*
89
90 #Protect ssl key on upgrade
91 dodir /etc/env.d/
92 echo 'CONFIG_PROTECT="/opt/openfire/resources/security/"' > "${D}"/etc/env.d/98openfire
93 }
94
95 pkg_postinst() {
96 chown -R jabber:jabber /opt/openfire
97
98 ewarn If this is a new install, please edit /opt/openfire/conf/openfire.xml.sample
99 ewarn and save it as /opt/openfire/conf/openfire.xml
100 ewarn
101 ewarn The following must be be owned or writable by the jabber user.
102 ewarn /opt/openfire/conf/openfire.xml
103 }

  ViewVC Help
Powered by ViewVC 1.1.20