Gentoo Archives: gentoo-commits

From: "Bjarke Istrup Pedersen (gurligebis)" <gurligebis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-irc/anope: ChangeLog anope-1.8.7.ebuild anope-1.8.5.ebuild
Date: Wed, 28 Dec 2011 20:26:03
Message-Id: 20111228202549.388EA2004C@flycatcher.gentoo.org
1 gurligebis 11/12/28 20:25:49
2
3 Modified: ChangeLog
4 Added: anope-1.8.7.ebuild
5 Removed: anope-1.8.5.ebuild
6 Log:
7 Bumping to 1.8.7, removing old version and moving out of /opt.
8 Thanks to everybody who helped out. Fixing bug #395089
9
10 (Portage version: 2.2.0_alpha83/cvs/Linux i686)
11
12 Revision Changes Path
13 1.19 net-irc/anope/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/anope/ChangeLog?rev=1.19&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/anope/ChangeLog?rev=1.19&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/anope/ChangeLog?r1=1.18&r2=1.19
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/net-irc/anope/ChangeLog,v
22 retrieving revision 1.18
23 retrieving revision 1.19
24 diff -u -r1.18 -r1.19
25 --- ChangeLog 18 Jan 2011 21:34:37 -0000 1.18
26 +++ ChangeLog 28 Dec 2011 20:25:48 -0000 1.19
27 @@ -1,6 +1,16 @@
28 # ChangeLog for net-irc/anope
29 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/ChangeLog,v 1.18 2011/01/18 21:34:37 gurligebis Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/ChangeLog,v 1.19 2011/12/28 20:25:48 gurligebis Exp $
32 +
33 +*anope-1.8.7 (28 Dec 2011)
34 +
35 + 28 Dec 2011; <gurligebis@g.o> -anope-1.8.5.ebuild,
36 + +anope-1.8.7.ebuild, +files/anope-1.8.7-ldflags-fix.patch,
37 + +files/anope-1.8.7-libdir-gentoo.patch, +files/anope-conf.d,
38 + +files/anope-init.d, -files/anope.confd, -files/anope.initd,
39 + -files/ldflags-fix.patch:
40 + Bumping to 1.8.7, removing old version and moving out of /opt.
41 + Thanks to everybody who helped out. Fixing bug #395089
42
43 18 Jan 2011; <gurligebis@g.o> files/ldflags-fix.patch:
44 Fixing patch to work with portage-multilib, fixing bug #351414
45
46
47
48 1.1 net-irc/anope/anope-1.8.7.ebuild
49
50 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/anope/anope-1.8.7.ebuild?rev=1.1&view=markup
51 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/anope/anope-1.8.7.ebuild?rev=1.1&content-type=text/plain
52
53 Index: anope-1.8.7.ebuild
54 ===================================================================
55 # Copyright 1999-2011 Gentoo Foundation
56 # Distributed under the terms of the GNU General Public License v2
57 # $Header: /var/cvsroot/gentoo-x86/net-irc/anope/anope-1.8.7.ebuild,v 1.1 2011/12/28 20:25:48 gurligebis Exp $
58
59 EAPI=4
60
61 inherit autotools eutils multilib versionator
62
63 DESCRIPTION="Anope IRC Services"
64 HOMEPAGE="http://www.anope.org"
65 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
66
67 LICENSE="GPL-2"
68 SLOT="0"
69 KEYWORDS="~amd64 ~x86"
70 IUSE="mysql"
71
72 DEPEND="mysql? ( virtual/mysql )"
73 RDEPEND="${DEPEND}"
74
75 pkg_pretend() {
76 local replaced_version
77 for replaced_version in ${REPLACING_VERSIONS} ; do
78 if ! version_is_at_least 1.8.7 ${replaced_version} && [[ -f ${ROOT}opt/anope/data/nick.db ]]; then
79 eerror "It looks like you have an older version of Anope installed."
80 eerror "To upgrade, shut down Anope and copy your databases to"
81 eerror "${ROOT}var/lib/anope and your configuration to ${ROOT}etc/anope"
82 eerror "You can do this by:"
83 eerror "# mkdir -p ${ROOT}var/lib/anope ${ROOT}etc/anope"
84 eerror "# chown anope:anope ${ROOT}var/lib/anope"
85 eerror "# mv ${ROOT}opt/anope/data/*.db ${ROOT}var/lib/anope"
86 eerror "# mv ${ROOT}opt/anope/data/services.conf ${ROOT}etc/anope"
87 die "Please move your anope database files from /opt/anope/data"
88 fi
89 done
90 }
91
92 pkg_setup() {
93 enewgroup anope
94 enewuser anope -1 -1 -1 anope
95 }
96
97 src_prepare() {
98 epatch "${FILESDIR}/pid-patch.diff"
99 epatch "${FILESDIR}/${P}-ldflags-fix.patch"
100 epatch "${FILESDIR}/${P}-libdir-gentoo.patch"
101 eautoconf
102 }
103
104 src_configure() {
105 local myconf
106 if ! use mysql; then
107 myconf="${myconf} --without-mysql"
108 fi
109
110 econf \
111 ${myconf} \
112 --with-bindir=/usr/bin/ \
113 --with-datadir=/var/lib/anope \
114 --with-libdir=/usr/$(get_libdir)/anope/ \
115 --with-rungroup=anope \
116 --with-permissions=077
117
118 sed -i -e "/^build:/s:$: language:g" "${S}"/Makefile || die "sed failed"
119 }
120
121 src_install() {
122 keepdir /var/{lib,log,run}/anope
123 fowners anope:anope /var/{lib,log,run}/anope
124
125 local baselibdir
126 baselibdir="${D}/usr/$(get_libdir)/anope"
127
128 dodir /usr/$(get_libdir)/anope/{lang,modules}
129 emake DATDEST="${baselibdir}" \
130 BINDEST="${D}/usr/bin" \
131 MODULE_PATH="${baselibdir}/modules" \
132 install
133
134 newinitd "${FILESDIR}/anope-init.d" anope
135 newconfd "${FILESDIR}/anope-conf.d" anope
136
137 dodoc Changes Changes.conf Changes.lang Changes.mysql docs/* data/example.conf
138 use mysql && dodoc data/tables.sql
139
140 insinto /etc/anope
141 newins data/example.conf services.conf
142 }
143
144 pkg_preinst() {
145 if has_version net-irc/anope ; then
146 local directory
147 directory="${ROOT}"var/lib/anope/pre-update
148 elog "Making a backup of your databases to ${directory}"
149 if [ ! -d "${directory}" ]; then
150 mkdir -p "${directory}" || die "failed to create backup directory"
151 chown anope:anope "${directory}"/../ || die "failed to chown data directory"
152 fi
153 # don't die otherwise merge will fail if there are no existing databases
154 cp "${ROOT}"/var/lib/anope/*.db "${directory}"
155 fi
156 }
157
158 pkg_postinst() {
159 echo
160 ewarn "Anope won't run out of the box, you still have to configure it to match your IRCD's configuration."
161 ewarn "Edit /etc/anope/services.conf to configure Anope."
162
163 if use mysql; then
164 echo
165 ewarn "!!! ATTENTION !!!"
166 ewarn "Be sure to read Changes.mysql to update your MySQL"
167 ewarn "tables or anope will break after restart"
168 ewarn "!!! ATTENTION !!!"
169 echo
170 einfo "The mysql script for updating the tables is located in the"
171 einfo "/usr/share/doc/${PF} directory"
172 fi
173 }