You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
2.9 KiB
111 lines
2.9 KiB
9 years ago
|
# Copyright 1999-2016 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
9 years ago
|
EAPI=6
|
||
|
|
||
8 years ago
|
inherit versionator user
|
||
13 years ago
|
|
||
8 years ago
|
MY_P="irc${PV/_/}"
|
||
13 years ago
|
|
||
|
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"
|
||
|
|
||
8 years ago
|
# GPL-2 is for the init script, bug 426038.
|
||
|
LICENSE="GPL-1 GPL-2"
|
||
13 years ago
|
SLOT="0"
|
||
9 years ago
|
KEYWORDS="~amd64 ~ppc ~x86"
|
||
13 years ago
|
IUSE="zlib ipv6"
|
||
|
|
||
8 years ago
|
RDEPEND="sys-libs/ncurses:0
|
||
13 years ago
|
zlib? ( sys-libs/zlib )"
|
||
|
DEPEND="${RDEPEND}
|
||
|
sys-apps/sed
|
||
|
sys-apps/grep"
|
||
|
|
||
8 years ago
|
S="${WORKDIR}/${MY_P}"
|
||
|
|
||
|
PATCHES=( "${FILESDIR}"/2.10.3_p3-gentoo.patch )
|
||
13 years ago
|
|
||
|
pkg_setup() {
|
||
|
enewgroup ircd
|
||
|
enewuser ircd -1 -1 -1 ircd
|
||
|
}
|
||
|
|
||
9 years ago
|
src_configure () {
|
||
13 years ago
|
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/" \
|
||
8 years ago
|
"${S}"/support/config.h.dist \
|
||
|
|| die "failed to sed definitions in config.h.dist"
|
||
13 years ago
|
|
||
8 years ago
|
if use zlib ; then
|
||
|
sed -i -e "s/^#undef\tZIP_LINKS$/#define\tZIP_LINKS/" \
|
||
|
"${S}"/support/config.h.dist \
|
||
|
|| die "failed to sed ZIP_LINKS definition in config.h.dist"
|
||
|
fi
|
||
13 years ago
|
|
||
8 years ago
|
# The --mandir has single quotes around it, the $prefix is NOT
|
||
|
# interpolated into the string.
|
||
13 years ago
|
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) \
|
||
9 years ago
|
$(use_enable ipv6 ip6)
|
||
|
}
|
||
13 years ago
|
|
||
9 years ago
|
src_compile() {
|
||
8 years ago
|
cd $(support/config.guess) \
|
||
|
|| die "failed to change into the source directory in src_compile"
|
||
9 years ago
|
emake ircd iauth chkconf ircd-mkpasswd ircdwatch tkserv
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
8 years ago
|
cd $(support/config.guess) \
|
||
|
|| die "failed to change into the source directory in src_install"
|
||
13 years ago
|
|
||
|
emake \
|
||
9 years ago
|
prefix="${D}"/usr \
|
||
|
ircd_conf_dir="${D}"/etc/ircd \
|
||
|
ircd_var_dir="${D}"/var/run/ircd \
|
||
|
ircd_log_dir="${D}"/var/log/ircd \
|
||
13 years ago
|
install-server \
|
||
9 years ago
|
install-tkserv
|
||
13 years ago
|
|
||
|
fowners ircd:ircd /var/run/ircd
|
||
|
fowners ircd:ircd /var/log/ircd
|
||
|
|
||
8 years ago
|
cd ../doc || die "failed to change into the doc directory in src_install"
|
||
|
|
||
13 years ago
|
dodoc \
|
||
|
*-New alt-irc-faq Authors BUGS ChangeLog Etiquette \
|
||
9 years ago
|
iauth-internals.txt INSTALL.appendix INSTALL.* \
|
||
13 years ago
|
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
|
||
|
}
|