blob: 2e6b868870211aa89c64b9b547ae292f332efdd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-irc/cyclone/cyclone-0.3.1.1.ebuild,v 1.14 2004/06/24 23:02:43 agriffis Exp $
DESCRIPTION="IRC daemon with hostname cloaking, SOCKS proxy checking and other advanced features"
HOMEPAGE="http://www.slashnet.org"
SRC_URI="ftp://ftp.slashnet.org/pub/cyclone/server/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ppc"
IUSE=""
DEPEND="virtual/glibc"
src_unpack() {
unpack ${P}.tar.gz
cp ${FILESDIR}/res_init.c ${S}/src
}
src_compile() {
# Server administrators are encouraged to customize the following
# variables if actually deploying cyclone in an IRC network. Upon
# merging of this package a config file is created in /etc/cyclone
# which is reused whenever this package is upgraded.
# If you wish to modify this configuration in the future, you can
# either edit this ebuild or edit the created /etc/cyclone/config and
# remerge this ebuild.
if [ -f /etc/cyclone/config ]
then
einfo Reusing compile time configuration stored in /etc/cyclone/config...
einfo To reset the configuration delete the config file and remerge.
cp /etc/cyclone/config ${S}/.config
else
einfo No previous configuration found... using defaults defined in ebuild...
cat << END_OF_CONFIG > ${S}/.config
#
# VERSION: cyclone0.3.1.1
# DATE: `date`
# GENERATED BY: Gentoo - ${P}.ebuild
#
#
# This file was automatically generated by Portage using ${P}.ebuild and
# stored in /etc/cyclone/config for future reuse and modification
#
LAST_VERSION="cyclone0.3.1.1"
NOSPOOF_SEED01="0x12345678"
NOSPOOF_SEED02="0x9abcdef0"
CONTACT_URL=""
CONTACT_EMAIL=""
SERVICES_NAME=""
KLINE_ADDRESS="ADMIN@DID.NOT.READ.MANUAL.OR.EBUILD"
DPATH="/etc/cyclone"
SPATH="/usr/bin"
CRYPT_OPER_PASSWORD="1"
CRYPT_LINK_PASSWORD=""
LISTEN_SIZE="5"
SOCKSPORT="6013"
MAXSENDQLENGTH="3000000"
BUFFERPOOL="(9 * MAXSENDQLENGTH)"
MAXCONNECTIONS="256"
DOMAINNAME="foo"
NICKNAMEHISTORYLENGTH="2000"
SERVICES_NAME="none"
END_OF_CONFIG
fi
# Now we run ./Config which generates the makefiles... This is a
# nasty hack that will probably need to be changed from version to
# version...
mv Config Config.orig
sed -e 's|DEFOPT="-O2"|DEFOPT="${CFLAGS}"|' \
-e 's|more ChangeLog||' \
-e 's|clear||' Config.orig > Config
chmod +x Config
yes "" | ./Config -n
# compile it
emake RES="res_init.o" || die
}
src_install() {
# store generated .config file
dodir /etc/cyclone
cp ${S}/.config ${D}/etc/cyclone/config
# make install
dodir /usr/bin
make DPATH="${D}/etc/cyclone" SPATH="${D}/usr/bin" install || die
# renamed ircd binary to avoid conflicts with other packages
mv ${D}/usr/bin/ircd ${D}/usr/bin/cyclone-ircd
# documentation files
dodoc AUTHORS ChangeLog INSTALL README doc/oper.txt
dodoc doc/NOTICE doc/rfc* doc/Crule.readme doc/cyclone.gif doc/Operators
# install sample configuration file
cp ${S}/doc/example.conf ${D}/etc/cyclone/ircd.conf
# Generate sample motd file
echo "Gentoo Linux - Cyclone ${PV}" > ${D}/etc/cyclone/ircd.motd
# fix permissions
chmod 755 ${D}/usr/bin/cyclone-ircd
chmod 755 ${D}/etc/cyclone/chkconf ${D}/etc/cyclone/encrypt
chmod 644 ${D}/etc/cyclone/example.conf ${D}/etc/cyclone/ircd.motd
chmod 600 ${D}/etc/cyclone/ircd.conf ${D}/etc/cyclone/config
}
pkg_postinst() {
einfo "Please read the documentation. The default /etc/cyclone/ircd.conf"
einfo "will need to be edited and file permissions changed so only root"
einfo "and the account under which the ircd will run can read the plaintext"
einfo "passwords stored in that file."
einfo
einfo "Failure to modify the ircd.conf will result in cyclone-ircd"
einfo "quietly refusing to run. Read the documentation and config file."
}
|