From ddddf73a7382c41c29f34299cb5721d2f11f4d89 Mon Sep 17 00:00:00 2001 From: Raúl Porcel Date: Mon, 14 Jul 2008 14:41:54 +0000 Subject: Fix log files dir, make it run as ircd user, etc, bug #218052, enhancements by Ville Mattila (Portage version: 2.2_rc1/cvs/Linux 2.6.24-gentoo-r8 i686) --- net-irc/irc-server/ChangeLog | 12 ++- net-irc/irc-server/files/ircd.confd | 10 +++ net-irc/irc-server/files/ircd.rc | 19 +++- net-irc/irc-server/irc-server-2.11.1_p1-r1.ebuild | 101 --------------------- net-irc/irc-server/irc-server-2.11.1_p1-r2.ebuild | 103 ++++++++++++++++++++++ 5 files changed, 138 insertions(+), 107 deletions(-) create mode 100644 net-irc/irc-server/files/ircd.confd delete mode 100644 net-irc/irc-server/irc-server-2.11.1_p1-r1.ebuild create mode 100644 net-irc/irc-server/irc-server-2.11.1_p1-r2.ebuild (limited to 'net-irc/irc-server') diff --git a/net-irc/irc-server/ChangeLog b/net-irc/irc-server/ChangeLog index c8a623026bd5..7d663e0f86ba 100644 --- a/net-irc/irc-server/ChangeLog +++ b/net-irc/irc-server/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-irc/irc-server -# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/ChangeLog,v 1.12 2007/02/22 12:21:51 armin76 Exp $ +# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/ChangeLog,v 1.13 2008/07/14 14:41:53 armin76 Exp $ + +*irc-server-2.11.1_p1-r2 (14 Jul 2008) + + 14 Jul 2008; Raúl Porcel +files/ircd.confd, + files/ircd.rc, -irc-server-2.11.1_p1-r1.ebuild, + +irc-server-2.11.1_p1-r2.ebuild: + Fix log files dir, make it run as ircd user, etc, bug #218052, enhancements + by Ville Mattila 22 Feb 2007; Raúl Porcel irc-server-2.11.1_p1-r1.ebuild: diff --git a/net-irc/irc-server/files/ircd.confd b/net-irc/irc-server/files/ircd.confd new file mode 100644 index 000000000000..19766668e76c --- /dev/null +++ b/net-irc/irc-server/files/ircd.confd @@ -0,0 +1,10 @@ +# /etc/conf.d/ircd: configuration for /etc/init.d/ircd + +# User account to run ircd as. + +#IRCD_USER="ircd" + +# Put any additional options for ircd here. +# See ircd(8) for more information. + +#IRCD_OPTS="" diff --git a/net-irc/irc-server/files/ircd.rc b/net-irc/irc-server/files/ircd.rc index 0ed3fbc92066..33a659bfd72e 100644 --- a/net-irc/irc-server/files/ircd.rc +++ b/net-irc/irc-server/files/ircd.rc @@ -1,20 +1,31 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/files/ircd.rc,v 1.4 2005/09/02 15:10:50 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/files/ircd.rc,v 1.5 2008/07/14 14:41:54 armin76 Exp $ depend() { use net } +IRCD_USER=${IRCD_USER:-ircd} + +checkconfig() { + if [ ! -e /etc/ircd/ircd.conf ] ; then + eerror "You need to create /etc/ircd/ircd.conf first." + eerror "An example can be found in /etc/ircd/ircd.conf.example" + return 1 + fi +} + start() { + checkconfig || return $? ebegin "Starting ircd" - start-stop-daemon --start --quiet --exec /usr/sbin/ircd - eend ${?} + start-stop-daemon --start --quiet --chuid "${IRCD_USER}" --exec /usr/sbin/ircd -- ${IRCD_OPTS} + eend $? } stop() { ebegin "Stopping ircd" start-stop-daemon --stop --quiet --pidfile /var/run/ircd/ircd.pid - eend ${?} + eend $? } diff --git a/net-irc/irc-server/irc-server-2.11.1_p1-r1.ebuild b/net-irc/irc-server/irc-server-2.11.1_p1-r1.ebuild deleted file mode 100644 index 045807ee676a..000000000000 --- a/net-irc/irc-server/irc-server-2.11.1_p1-r1.ebuild +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/irc-server-2.11.1_p1-r1.ebuild,v 1.2 2007/02/22 12:21:51 armin76 Exp $ - -inherit eutils versionator flag-o-matic - -MY_P=irc${PV/_/} - -DESCRIPTION="RFC compliant IRC server" -HOMEPAGE="http://www.irc.org/" -SRC_URI="ftp://ftp.irc.org/irc/server/${MY_P}.tgz - ftp://ftp.irc.org/irc/server/Old/irc$(get_version_component_range 1-2)/${MY_P}.tgz" - -LICENSE="GPL-1" -SLOT="0" -KEYWORDS="~x86 ~ppc" -IUSE="zlib ipv6" - -RDEPEND="sys-libs/ncurses - zlib? ( sys-libs/zlib )" -DEPEND="${RDEPEND} - sys-apps/sed - sys-apps/grep" - -S=${WORKDIR}/${MY_P} - -pkg_setup() { - enewgroup ircd - enewuser ircd -1 -1 -1 ircd -} - -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}"/2.10.3_p3-gentoo.patch -} - -src_compile () { - append-ldflags -lm - - sed -i \ - -e "s/^#undef\tOPER_KILL$/#define\tOPER_KILL/" \ - -e "s/^#undef\tOPER_RESTART$/#define\tOPER_RESTART/" \ - -e "s/^#undef TIMEDKLINES$/#define\tTIMEDKLINES\t60/" \ - -e "s/^#undef\tR_LINES$/#define\tR_LINES/" \ - -e "s/^#undef\tCRYPT_OPER_PASSWORD$/#define\tCRYPT_OPER_PASSWORD/" \ - -e "s/^#undef\tCRYPT_LINK_PASSWORD$/#define\tCRYPT_LINK_PASSWORD/" \ - -e "s/^#undef\tIRC_UID$/#define\tIRC_UID\t$IRCUID/" \ - -e "s/^#undef\tIRC_GID$/#define\tIRC_GID\t$IRCGID/" \ - -e "s/^#undef USE_SERVICES$/#define\tUSE_SERVICES/" \ - "${S}"/support/config.h.dist - - use zlib && sed -i -e "s/^#undef\tZIP_LINKS$/#define\tZIP_LINKS/" ${S}/support/config.h.dist - - econf \ - --sysconfdir=/etc/ircd \ - --localstatedir=/var/run/ircd \ - --mandir='${prefix}/share/man' \ - $(use_with zlib) \ - $(use_enable ipv6 ip6) \ - || die "econf failed" - - cd $(support/config.guess) - emake ircd iauth chkconf ircd-mkpasswd ircdwatch tkserv || die "emake failed" -} - -src_install() { - cd $(support/config.guess) - - make \ - prefix=${D}/usr \ - ircd_conf_dir=${D}/etc/ircd \ - ircd_var_dir=${D}/var/run/ircd \ - ircd_log_dir=${D}/var/log \ - install-server \ - install-tkserv \ - || die "make install failed" - - fowners ircd:ircd /var/run/ircd - - cd ../doc - dodoc \ - *-New alt-irc-faq Authors BUGS ChangeLog Etiquette example.conf \ - iauth-internals.txt INSTALL.appendix INSTALL.* LICENSE \ - m4macros README RELEASE* rfc* SERVICE* - - docinto Juped - dodoc Juped/Advertisement Juped/ChangeLog.* Juped/INSTALL - - docinto Juped/US-Admin - dodoc Juped/US-Admin/Networking - - docinto Nets - dodoc Nets/IRCNet - - docinto Nets/Europe - dodoc Nets/Europe/* - - newinitd "${FILESDIR}"/ircd.rc ircd -} diff --git a/net-irc/irc-server/irc-server-2.11.1_p1-r2.ebuild b/net-irc/irc-server/irc-server-2.11.1_p1-r2.ebuild new file mode 100644 index 000000000000..50129bfc2cb8 --- /dev/null +++ b/net-irc/irc-server/irc-server-2.11.1_p1-r2.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/irc-server-2.11.1_p1-r2.ebuild,v 1.1 2008/07/14 14:41:53 armin76 Exp $ + +inherit eutils versionator flag-o-matic + +MY_P=irc${PV/_/} + +DESCRIPTION="RFC compliant IRC server" +HOMEPAGE="http://www.irc.org/" +SRC_URI="ftp://ftp.irc.org/irc/server/${MY_P}.tgz + ftp://ftp.irc.org/irc/server/Old/irc$(get_version_component_range 1-2)/${MY_P}.tgz" + +LICENSE="GPL-1" +SLOT="0" +KEYWORDS="~x86 ~ppc" +IUSE="zlib ipv6" + +RDEPEND="sys-libs/ncurses + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + sys-apps/sed + sys-apps/grep" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup ircd + enewuser ircd -1 -1 -1 ircd +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/2.10.3_p3-gentoo.patch +} + +src_compile () { + sed -i \ + -e "s/^#undef\tOPER_KILL$/#define\tOPER_KILL/" \ + -e "s/^#undef\tOPER_RESTART$/#define\tOPER_RESTART/" \ + -e "s/^#undef TIMEDKLINES$/#define\tTIMEDKLINES\t60/" \ + -e "s/^#undef\tR_LINES$/#define\tR_LINES/" \ + -e "s/^#undef\tCRYPT_OPER_PASSWORD$/#define\tCRYPT_OPER_PASSWORD/" \ + -e "s/^#undef\tCRYPT_LINK_PASSWORD$/#define\tCRYPT_LINK_PASSWORD/" \ + -e "s/^#undef\tIRC_UID$/#define\tIRC_UID\t$IRCUID/" \ + -e "s/^#undef\tIRC_GID$/#define\tIRC_GID\t$IRCGID/" \ + -e "s/^#undef USE_SERVICES$/#define\tUSE_SERVICES/" \ + "${S}"/support/config.h.dist + + use zlib && sed -i -e "s/^#undef\tZIP_LINKS$/#define\tZIP_LINKS/" "${S}"/support/config.h.dist + + econf \ + --sysconfdir=/etc/ircd \ + --localstatedir=/var/run/ircd \ + --with-logdir=/var/log/ircd \ + --with-rundir=/var/run/ircd \ + --mandir='${prefix}/share/man' \ + $(use_with zlib) \ + $(use_enable ipv6 ip6) \ + || die "econf failed" + + cd $(support/config.guess) + emake ircd iauth chkconf ircd-mkpasswd ircdwatch tkserv || die "emake failed" +} + +src_install() { + cd $(support/config.guess) + + make \ + prefix=${D}/usr \ + ircd_conf_dir=${D}/etc/ircd \ + ircd_var_dir=${D}/var/run/ircd \ + ircd_log_dir=${D}/var/log/ircd \ + install-server \ + install-tkserv \ + || die "make install failed" + + fowners ircd:ircd /var/run/ircd + fowners ircd:ircd /var/log/ircd + + cd ../doc + dodoc \ + *-New alt-irc-faq Authors BUGS ChangeLog Etiquette \ + iauth-internals.txt INSTALL.appendix INSTALL.* LICENSE \ + m4macros README RELEASE* rfc* SERVICE* + + docinto Juped + dodoc Juped/Advertisement Juped/ChangeLog.* Juped/INSTALL + + docinto Juped/US-Admin + dodoc Juped/US-Admin/Networking + + docinto Nets + dodoc Nets/IRCNet + + docinto Nets/Europe + dodoc Nets/Europe/* + + newinitd "${FILESDIR}"/ircd.rc ircd + newconfd "${FILESDIR}"/ircd.confd ircd +} -- cgit v1.2.3-65-gdbad