summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2011-12-28 20:25:49 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2011-12-28 20:25:49 +0000
commit94313e5eab59b44e1beda371ef30bc615f7cd6df (patch)
tree4c09aa1fffc6a0bdac0aa18f44b78c90a18c7dc3 /net-irc/anope
parentppc stable (bug 396325) (diff)
downloadgentoo-2-94313e5eab59b44e1beda371ef30bc615f7cd6df.tar.gz
gentoo-2-94313e5eab59b44e1beda371ef30bc615f7cd6df.tar.bz2
gentoo-2-94313e5eab59b44e1beda371ef30bc615f7cd6df.zip
Bumping to 1.8.7, removing old version and moving out of /opt.
Thanks to everybody who helped out. Fixing bug #395089 (Portage version: 2.2.0_alpha83/cvs/Linux i686)
Diffstat (limited to 'net-irc/anope')
-rw-r--r--net-irc/anope/ChangeLog12
-rw-r--r--net-irc/anope/anope-1.8.5.ebuild155
-rw-r--r--net-irc/anope/anope-1.8.7.ebuild119
-rw-r--r--net-irc/anope/files/anope-1.8.7-ldflags-fix.patch (renamed from net-irc/anope/files/ldflags-fix.patch)11
-rw-r--r--net-irc/anope/files/anope-1.8.7-libdir-gentoo.patch91
-rw-r--r--net-irc/anope/files/anope-conf.d (renamed from net-irc/anope/files/anope.confd)4
-rw-r--r--net-irc/anope/files/anope-init.d33
-rw-r--r--net-irc/anope/files/anope.initd21
8 files changed, 267 insertions, 179 deletions
diff --git a/net-irc/anope/ChangeLog b/net-irc/anope/ChangeLog
index 08e118cc638d..7ece6391ca9c 100644
--- a/net-irc/anope/ChangeLog
+++ b/net-irc/anope/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-irc/anope
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/ChangeLog,v 1.18 2011/01/18 21:34:37 gurligebis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/ChangeLog,v 1.19 2011/12/28 20:25:48 gurligebis Exp $
+
+*anope-1.8.7 (28 Dec 2011)
+
+ 28 Dec 2011; <gurligebis@gentoo.org> -anope-1.8.5.ebuild,
+ +anope-1.8.7.ebuild, +files/anope-1.8.7-ldflags-fix.patch,
+ +files/anope-1.8.7-libdir-gentoo.patch, +files/anope-conf.d,
+ +files/anope-init.d, -files/anope.confd, -files/anope.initd,
+ -files/ldflags-fix.patch:
+ Bumping to 1.8.7, removing old version and moving out of /opt.
+ Thanks to everybody who helped out. Fixing bug #395089
18 Jan 2011; <gurligebis@gentoo.org> files/ldflags-fix.patch:
Fixing patch to work with portage-multilib, fixing bug #351414
diff --git a/net-irc/anope/anope-1.8.5.ebuild b/net-irc/anope/anope-1.8.5.ebuild
deleted file mode 100644
index dc43e525afa6..000000000000
--- a/net-irc/anope/anope-1.8.5.ebuild
+++ /dev/null
@@ -1,155 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/anope-1.8.5.ebuild,v 1.1 2010/10/10 18:07:36 gurligebis Exp $
-
-EAPI="2"
-
-inherit eutils versionator
-
-MY_PV=$(replace_version_separator 3 '-')
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-DESCRIPTION="Anope IRC Services"
-HOMEPAGE="http://www.anope.org"
-SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="mysql"
-
-DEPEND="mysql? ( virtual/mysql )"
-
-INSTALL_DIR="/opt/anope"
-
-pkg_setup() {
- enewgroup anope
- enewuser anope -1 -1 "${INSTALL_DIR}" anope
- if has_version net-irc/anope ; then
- ewarn
- ewarn "Make backups before updating as they will be overwritten"
- ewarn
- ebeep 10
- fi
-}
-
-src_prepare() {
- epatch "${FILESDIR}/pid-patch.diff"
- epatch "${FILESDIR}/ldflags-fix.patch"
-}
-
-src_configure() {
- local myconf
- if ! use mysql; then
- myconf="${myconf} --without-mysql"
- fi
-
- econf \
- ${myconf} \
- --bindir ${INSTALL_DIR} \
- --with-bindir=${INSTALL_DIR} \
- --with-datadir=${INSTALL_DIR}/data \
- --with-modules=${INSTALL_DIR}/modules \
- --with-encryption \
- --with-rungroup=anope \
- --with-permissions=077 \
- || die "Configuration failed."
-
- sed -i -e "/^build:/s:$: language:g" "${S}"/Makefile || die "sed failed"
-}
-
-src_install() {
- dodir ${INSTALL_DIR}
- dodir ${INSTALL_DIR}/data
- dodir ${INSTALL_DIR}/data/logs
- dodir ${INSTALL_DIR}/data/languages
- dodir ${INSTALL_DIR}/data/modules
- dodir ${INSTALL_DIR}/data/modules/runtime
-
- dodir /var/run/anope
- fowners anope:anope /var/run/anope
- keepdir /var/run/anope
-
- fowners anope:anope ${INSTALL_DIR}
- fowners anope:anope ${INSTALL_DIR}/data
- fowners anope:anope ${INSTALL_DIR}/data/logs
- fowners anope:anope ${INSTALL_DIR}/data/languages
- fowners anope:anope ${INSTALL_DIR}/data/modules
- fowners anope:anope ${INSTALL_DIR}/data/modules/runtime
-
- exeinto ${INSTALL_DIR}
- doexe src/services
- insinto ${INSTALL_DIR}/data
- newins data/example.conf services.conf.example
-
- newinitd "${FILESDIR}"/anope.initd anope
- newconfd "${FILESDIR}"/anope.confd anope
-
- insinto ${INSTALL_DIR}/data/modules
- doins src/modules/*.so
-
- keepdir ${INSTALL_DIR}/data/logs
-
- insinto ${INSTALL_DIR}/data/languages
- doins lang/cat
- doins lang/de
- doins lang/en_us
- doins lang/es
- doins lang/fr
- doins lang/gr
- doins lang/hun
- doins lang/it
- doins lang/nl
- doins lang/pl
- doins lang/pt
- doins lang/ru
- doins lang/tr
-
- keepdir ${INSTALL_DIR}/data/modules/runtime
-
- insinto ${INSTALL_DIR}/data/modules
- doins src/protocol/*.so
- doins src/core/*.so
-
- fowners anope:anope ${INSTALL_DIR}/services
- fowners anope:anope ${INSTALL_DIR}/data/languages/cat
- fowners anope:anope ${INSTALL_DIR}/data/languages/de
- fowners anope:anope ${INSTALL_DIR}/data/languages/en_us
- fowners anope:anope ${INSTALL_DIR}/data/languages/fr
- fowners anope:anope ${INSTALL_DIR}/data/languages/gr
- fowners anope:anope ${INSTALL_DIR}/data/languages/hun
- fowners anope:anope ${INSTALL_DIR}/data/languages/it
- fowners anope:anope ${INSTALL_DIR}/data/languages/nl
- fowners anope:anope ${INSTALL_DIR}/data/languages/pl
- fowners anope:anope ${INSTALL_DIR}/data/languages/pt
- fowners anope:anope ${INSTALL_DIR}/data/languages/ru
- fowners anope:anope ${INSTALL_DIR}/data/languages/tr
-
- dodoc Changes Changes.conf Changes.lang Changes.mysql docs/*
-
- use mysql && dodoc data/tables.sql
-}
-
-pkg_preinst() {
- if has_version net-irc/anope ; then
- elog "Making a backup of your config to data/pre-update"
- mkdir "${ROOT}"opt/anope/data/pre-update
- cp "${ROOT}"opt/anope/data/* "${ROOT}"opt/anope/data/pre-update
- fi
-}
-
-pkg_postinst() {
- echo
- ewarn "Anope won't run out of the box, you still have to configure it to match your IRCDs configuration."
- ewarn "Edit ${INSTALL_DIR}/data/services.conf to configure Anope."
- echo
- ewarn "!!! ATTENTION !!!"
- ewarn "Be sure to read Changes.mysql to update your MySQL"
- ewarn "tables or anope will break after restart"
- ewarn "!!! ATTENTION !!!"
-
- if use mysql; then
- einfo "The mysql script for updating the tables is located in the"
- einfo "/usr/share/doc/${P} directory"
- fi
-}
diff --git a/net-irc/anope/anope-1.8.7.ebuild b/net-irc/anope/anope-1.8.7.ebuild
new file mode 100644
index 000000000000..fe37b080c677
--- /dev/null
+++ b/net-irc/anope/anope-1.8.7.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/anope-1.8.7.ebuild,v 1.1 2011/12/28 20:25:48 gurligebis Exp $
+
+EAPI=4
+
+inherit autotools eutils multilib versionator
+
+DESCRIPTION="Anope IRC Services"
+HOMEPAGE="http://www.anope.org"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="mysql"
+
+DEPEND="mysql? ( virtual/mysql )"
+RDEPEND="${DEPEND}"
+
+pkg_pretend() {
+ local replaced_version
+ for replaced_version in ${REPLACING_VERSIONS} ; do
+ if ! version_is_at_least 1.8.7 ${replaced_version} && [[ -f ${ROOT}opt/anope/data/nick.db ]]; then
+ eerror "It looks like you have an older version of Anope installed."
+ eerror "To upgrade, shut down Anope and copy your databases to"
+ eerror "${ROOT}var/lib/anope and your configuration to ${ROOT}etc/anope"
+ eerror "You can do this by:"
+ eerror "# mkdir -p ${ROOT}var/lib/anope ${ROOT}etc/anope"
+ eerror "# chown anope:anope ${ROOT}var/lib/anope"
+ eerror "# mv ${ROOT}opt/anope/data/*.db ${ROOT}var/lib/anope"
+ eerror "# mv ${ROOT}opt/anope/data/services.conf ${ROOT}etc/anope"
+ die "Please move your anope database files from /opt/anope/data"
+ fi
+ done
+}
+
+pkg_setup() {
+ enewgroup anope
+ enewuser anope -1 -1 -1 anope
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/pid-patch.diff"
+ epatch "${FILESDIR}/${P}-ldflags-fix.patch"
+ epatch "${FILESDIR}/${P}-libdir-gentoo.patch"
+ eautoconf
+}
+
+src_configure() {
+ local myconf
+ if ! use mysql; then
+ myconf="${myconf} --without-mysql"
+ fi
+
+ econf \
+ ${myconf} \
+ --with-bindir=/usr/bin/ \
+ --with-datadir=/var/lib/anope \
+ --with-libdir=/usr/$(get_libdir)/anope/ \
+ --with-rungroup=anope \
+ --with-permissions=077
+
+ sed -i -e "/^build:/s:$: language:g" "${S}"/Makefile || die "sed failed"
+}
+
+src_install() {
+ keepdir /var/{lib,log,run}/anope
+ fowners anope:anope /var/{lib,log,run}/anope
+
+ local baselibdir
+ baselibdir="${D}/usr/$(get_libdir)/anope"
+
+ dodir /usr/$(get_libdir)/anope/{lang,modules}
+ emake DATDEST="${baselibdir}" \
+ BINDEST="${D}/usr/bin" \
+ MODULE_PATH="${baselibdir}/modules" \
+ install
+
+ newinitd "${FILESDIR}/anope-init.d" anope
+ newconfd "${FILESDIR}/anope-conf.d" anope
+
+ dodoc Changes Changes.conf Changes.lang Changes.mysql docs/* data/example.conf
+ use mysql && dodoc data/tables.sql
+
+ insinto /etc/anope
+ newins data/example.conf services.conf
+}
+
+pkg_preinst() {
+ if has_version net-irc/anope ; then
+ local directory
+ directory="${ROOT}"var/lib/anope/pre-update
+ elog "Making a backup of your databases to ${directory}"
+ if [ ! -d "${directory}" ]; then
+ mkdir -p "${directory}" || die "failed to create backup directory"
+ chown anope:anope "${directory}"/../ || die "failed to chown data directory"
+ fi
+ # don't die otherwise merge will fail if there are no existing databases
+ cp "${ROOT}"/var/lib/anope/*.db "${directory}"
+ fi
+}
+
+pkg_postinst() {
+ echo
+ ewarn "Anope won't run out of the box, you still have to configure it to match your IRCD's configuration."
+ ewarn "Edit /etc/anope/services.conf to configure Anope."
+
+ if use mysql; then
+ echo
+ ewarn "!!! ATTENTION !!!"
+ ewarn "Be sure to read Changes.mysql to update your MySQL"
+ ewarn "tables or anope will break after restart"
+ ewarn "!!! ATTENTION !!!"
+ echo
+ einfo "The mysql script for updating the tables is located in the"
+ einfo "/usr/share/doc/${PF} directory"
+ fi
+}
diff --git a/net-irc/anope/files/ldflags-fix.patch b/net-irc/anope/files/anope-1.8.7-ldflags-fix.patch
index 21d0414a9ff9..98500509693b 100644
--- a/net-irc/anope/files/ldflags-fix.patch
+++ b/net-irc/anope/files/anope-1.8.7-ldflags-fix.patch
@@ -34,3 +34,14 @@ diff -aurp a/src/protocol/Makefile b/src/protocol/Makefile
@$(TOUCH) $*.s
subs:
+--- a/src/tools/Makefile 2011-12-28 20:00:00.646427623 +0000
++++ b/src/tools/Makefile 2011-12-28 20:00:41.030430806 +0000
+@@ -10,7 +10,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}'
+ 'RUNGROUP=${RUNGROUP}'
+
+ .c.o:
+- $(CC) $(CFLAGS) -I../include/ $< -o $*
++ $(CC) $(LDFLAGS) $(CFLAGS) -I../include/ $< -o $*
+
+ all: ${OBJS}
+
diff --git a/net-irc/anope/files/anope-1.8.7-libdir-gentoo.patch b/net-irc/anope/files/anope-1.8.7-libdir-gentoo.patch
new file mode 100644
index 000000000000..7a86d0f517b9
--- /dev/null
+++ b/net-irc/anope/files/anope-1.8.7-libdir-gentoo.patch
@@ -0,0 +1,91 @@
+--- configure.in
++++ configure.in
+@@ -286,6 +286,15 @@
+ ])
+
+ AC_SUBST(DATDEST)
++
++AC_ARG_WITH(libdir, [ --with-libdir=libdir Specify the location of the services lib folder], [
++ AC_DEFINE_UNQUOTED(LIB_DIR,"$withval","services lib dir")
++ AC_DEFINE_UNQUOTED(MODULE_PATH,"${withval}/modules/","Module dir")
++ DATDEST=$withval
++ MODULE_PATH=${withval}/modules/
++])
++
++AC_SUBST(LIB_PATH)
+ AC_SUBST(MODULE_PATH)
+
+ AC_CONFIG_FILES( \
+--- src/Makefile
++++ src/Makefile
+@@ -115,10 +115,6 @@
+ ln $(BINDEST)/services $(BINDEST)/listnicks
+ ln $(BINDEST)/services $(BINDEST)/listchans
+ (cd ../lang ; $(MAKE) install)
+- $(CP) ../data/* $(DATDEST)
+- $(INSTALL) bin/mydbgen $(DATDEST)/mydbgen
+- test -d $(DATDEST)/backups || mkdir $(DATDEST)/backups
+- test -d $(DATDEST)/logs || mkdir $(DATDEST)/logs
+ @if [ "$(MODULE_PATH)" ] ; then \
+ test -d ${MODULE_PATH} || mkdir ${MODULE_PATH} ; \
+ test -d ${MODULE_PATH}/runtime || mkdir ${MODULE_PATH}/runtime ; \
+--- include/sysconf.h.in
++++ include/sysconf.h.in
+@@ -96,6 +96,9 @@
+ /* "Module dir" */
+ #undef MODULE_PATH
+
++/* "Lib dir" */
++#undef LIB_DIR
++
+ /* "Has mysql/mysql.h" */
+ #undef MYSQL_HEADER_PREFIX
+
+--- include/config.h
++++ include/config.h
+@@ -22,10 +22,10 @@
+ /******* General configuration *******/
+
+ /* Name of configuration file (in Services directory) */
+-#define SERVICES_CONF "services.conf"
++#define SERVICES_CONF "/etc/anope/services.conf"
+
+ /* Name of log file (in Services directory) */
+-#define LOG_FILENAME "services.log"
++#define LOG_FILENAME "/var/log/anope/services.log"
+
+ /* Maximum amount of data from/to the network to buffer (bytes). */
+ #define NET_BUFSIZE 65536
+--- src/log.c
++++ src/log.c
+@@ -33,7 +33,7 @@
+
+ /* fix bug 577 */
+ strftime(timestamp, sizeof(timestamp), "%Y%m%d", tm);
+- snprintf(name, count, "logs/%s.%s", log_filename, timestamp);
++ snprintf(name, count, "%s.%s", log_filename, timestamp);
+ curday = tm->tm_yday;
+
+ return 1;
+--- src/modules.c
++++ src/modules.c
+@@ -2846,7 +2846,7 @@
+
+
+ #ifndef _WIN32
+- snprintf(dirbuf, BUFSIZE, "%s/modules/runtime", services_dir);
++ snprintf(dirbuf, BUFSIZE, "%s/modules/runtime", LIB_DIR);
+ #else
+ snprintf(dirbuf, BUFSIZE, "\\%s", "modules/runtime");
+ #endif
+--- src/language.c
++++ src/language.c
+@@ -71,7 +71,7 @@
+ alog("debug: Loading language %d from file `languages/%s'",
+ index, filename);
+ }
+- snprintf(buf, sizeof(buf), "languages/%s", filename);
++ snprintf(buf, sizeof(buf), "%s/languages/%s", LIB_DIR, filename);
+ #ifndef _WIN32
+ if (!(f = fopen(buf, "r"))) {
+ #else
diff --git a/net-irc/anope/files/anope.confd b/net-irc/anope/files/anope-conf.d
index 6985da7a52b0..749dd3d160af 100644
--- a/net-irc/anope/files/anope.confd
+++ b/net-irc/anope/files/anope-conf.d
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/files/anope.confd,v 1.1 2006/08/29 22:54:17 gurligebis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/files/anope-conf.d,v 1.1 2011/12/28 20:25:48 gurligebis Exp $
# user to run ultimate-ircd as
ANOPE_USER="anope"
diff --git a/net-irc/anope/files/anope-init.d b/net-irc/anope/files/anope-init.d
new file mode 100644
index 000000000000..a7a529626dd5
--- /dev/null
+++ b/net-irc/anope/files/anope-init.d
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/files/anope-init.d,v 1.1 2011/12/28 20:25:48 gurligebis Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ use net mysql ircd
+ provide irc-services
+}
+
+start() {
+ ebegin "Starting Anope IRC Services"
+ start-stop-daemon --start --exec /usr/bin/services \
+ --user ${ANOPE_USER} --pidfile /var/run/anope/services.pid \
+ -- ${ANOPE_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Anope IRC Services"
+ start-stop-daemon --stop --pidfile /var/run/anope/services.pid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading Anope IRC Services"
+ start-stop-daemon --signal USR2 --exec /usr/bin/services \
+ --pidfile /var/run/anope/services.pid
+ eend $?
+}
+
diff --git a/net-irc/anope/files/anope.initd b/net-irc/anope/files/anope.initd
deleted file mode 100644
index 69eadfe4cf4c..000000000000
--- a/net-irc/anope/files/anope.initd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/files/anope.initd,v 1.1 2006/08/29 22:54:17 gurligebis Exp $
-
-depend() {
- use net mysql
-}
-
-start() {
- ebegin "Starting Anope IRC Services"
- start-stop-daemon --start --quiet --oknodo --exec /opt/anope/services \
- --chuid ${ANOPE_USER} -- ${ANOPE_OPTS} #&>/dev/null
- eend $?
-}
-
-stop() {
- ebegin "Stopping Anope IRC Services"
- start-stop-daemon --stop --pidfile /var/run/anope/services.pid
- eend $?
-}