Gentoo Archives: gentoo-commits

From: "Sergei Trofimovich (slyfox)" <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-im/openfire: openfire-3.9.2-r1.ebuild ChangeLog openfire-3.9.2.ebuild
Date: Thu, 01 May 2014 08:08:47
Message-Id: 20140501080840.7EB1B2004C@flycatcher.gentoo.org
1 slyfox 14/05/01 08:08:40
2
3 Modified: ChangeLog
4 Added: openfire-3.9.2-r1.ebuild
5 Removed: openfire-3.9.2.ebuild
6 Log:
7 Add default 'security.xml' to make upgrade nicer.
8
9 (Portage version: 2.2.10_p15/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
10
11 Revision Changes Path
12 1.58 net-im/openfire/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/openfire/ChangeLog?rev=1.58&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/openfire/ChangeLog?rev=1.58&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/openfire/ChangeLog?r1=1.57&r2=1.58
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-im/openfire/ChangeLog,v
21 retrieving revision 1.57
22 retrieving revision 1.58
23 diff -u -r1.57 -r1.58
24 --- ChangeLog 1 May 2014 07:11:48 -0000 1.57
25 +++ ChangeLog 1 May 2014 08:08:40 -0000 1.58
26 @@ -1,6 +1,12 @@
27 # ChangeLog for net-im/openfire
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-im/openfire/ChangeLog,v 1.57 2014/05/01 07:11:48 slyfox Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-im/openfire/ChangeLog,v 1.58 2014/05/01 08:08:40 slyfox Exp $
31 +
32 +*openfire-3.9.2-r1 (01 May 2014)
33 +
34 + 01 May 2014; Sergei Trofimovich <slyfox@g.o> +openfire-3.9.2-r1.ebuild,
35 + -openfire-3.9.2.ebuild:
36 + Add default 'security.xml' to make upgrade nicer.
37
38 *openfire-3.9.2 (01 May 2014)
39
40
41
42
43 1.1 net-im/openfire/openfire-3.9.2-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/openfire/openfire-3.9.2-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/openfire/openfire-3.9.2-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: openfire-3.9.2-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-im/openfire/openfire-3.9.2-r1.ebuild,v 1.1 2014/05/01 08:08:40 slyfox Exp $
53
54 inherit eutils java-pkg-2 java-ant-2 systemd
55
56 MY_P=${PN}_src_${PV//./_}
57 DESCRIPTION="Openfire (formerly wildfire) real time collaboration (RTC) server"
58 HOMEPAGE="http://www.igniterealtime.org/projects/openfire/"
59 SRC_URI="http://www.igniterealtime.org/builds/openfire/${MY_P}.tar.gz"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~amd64 ~x86"
64 IUSE="doc"
65
66 RDEPEND=">=virtual/jre-1.5"
67 DEPEND="net-im/jabber-base
68 ~dev-java/ant-contrib-1.0_beta2
69 >=virtual/jdk-1.5"
70
71 S=${WORKDIR}/${PN}_src
72
73 QA_PREBUILT="opt/openfire/resources/nativeAuth/*.so"
74
75 pkg_setup() {
76 if [ -f /etc/env.d/98openfire ]; then
77 einfo "This is an upgrade"
78 ewarn "As the plugin API changed, at least these plugins need to be updated also:"
79 ewarn "User Search, IM Gateway, Fastpath, Monitoring"
80 ewarn "they can be downloaded via Admin Console or at"
81 ewarn " ${HOMEPAGE}"
82 else
83 ewarn "If this is an upgrade stop right ( CONTROL-C ) and run the command:"
84 ewarn "echo 'CONFIG_PROTECT=\"/opt/openfire/resources/security/\"' > /etc/env.d/98openfire "
85 ewarn "For more info see bug #139708"
86 sleep 11
87 fi
88 java-pkg-2_pkg_setup
89 }
90
91 src_unpack() {
92 unpack ${A}
93 cd "${S}"
94 epatch "${FILESDIR}"/${PN}-3.8.0-buildxml.patch
95 epatch "${FILESDIR}"/buildxml-ant.patch
96
97 # TODO should replace jars in build/lib with ones packaged by us -nichoj
98 }
99
100 src_compile() {
101 # Jikes doesn't support -source 1.5
102 java-pkg_filter-compiler jikes
103
104 ANT_TASKS="ant-contrib"
105 eant -f build/build.xml openfire plugins $(use_doc)
106 }
107
108 src_install() {
109 dodir /opt/openfire
110
111 newinitd "${FILESDIR}"/openfire-initd openfire
112 newconfd "${FILESDIR}"/openfire-confd openfire
113 systemd_dounit "${FILESDIR}"/${PN}.service
114
115 dodir /opt/openfire/conf
116 insinto /opt/openfire/conf
117 newins target/openfire/conf/openfire.xml openfire.xml.sample
118 newins target/openfire/conf/security.xml security.xml.sample
119
120 dodir /opt/openfire/logs
121 keepdir /opt/openfire/logs
122
123 dodir /opt/openfire/lib
124 insinto /opt/openfire/lib
125 doins target/openfire/lib/*
126
127 dodir /opt/openfire/plugins
128 insinto /opt/openfire/plugins
129 doins -r target/openfire/plugins/*
130
131 dodir /opt/openfire/resources
132 insinto /opt/openfire/resources
133 doins -r target/openfire/resources/*
134
135 if use doc; then
136 dohtml -r documentation/docs/*
137 fi
138 dodoc documentation/dist/*
139
140 #Protect ssl key on upgrade
141 dodir /etc/env.d/
142 echo 'CONFIG_PROTECT="/opt/openfire/resources/security/"' > "${D}"/etc/env.d/98openfire
143 }
144
145 pkg_postinst() {
146 local src
147 local dst
148
149 # http://community.igniterealtime.org/thread/52289
150 for dst in "${ROOT}"/opt/openfire/conf/{openfire,security}.xml
151 do
152 src="${dst}".sample
153 if [[ -f "${dst}" ]]; then
154 einfo "Leaving old '${dst}'"
155 else
156 einfo "Created default '${dst}'. Please edit."
157 cp -v "${src}" "${dst}" || ewarn "cp '${dst}' failed"
158 chmod -v 0600 "${dst}" || ewarn "chmod '${dst}' failed"
159 fi
160 done
161 chown -R jabber:jabber "${ROOT}"/opt/openfire
162 }