Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/psybnc/
Date: Sat, 06 Oct 2018 17:45:47
Message-Id: 1538847931.e8b7e1c1a36b3f9b915fecc3fd976c61a9a8db92.bman@gentoo
1 commit: e8b7e1c1a36b3f9b915fecc3fd976c61a9a8db92
2 Author: Aaron Bauman <bman <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 6 17:45:01 2018 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 6 17:45:31 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8b7e1c1
7
8 net-irc/psybnc: drop old EAPI
9
10 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
11
12 net-irc/psybnc/psybnc-2.3.2.9-r2.ebuild | 158 --------------------------------
13 1 file changed, 158 deletions(-)
14
15 diff --git a/net-irc/psybnc/psybnc-2.3.2.9-r2.ebuild b/net-irc/psybnc/psybnc-2.3.2.9-r2.ebuild
16 deleted file mode 100644
17 index 22fce24e47d..00000000000
18 --- a/net-irc/psybnc/psybnc-2.3.2.9-r2.ebuild
19 +++ /dev/null
20 @@ -1,158 +0,0 @@
21 -# Copyright 1999-2013 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -
24 -EAPI="2"
25 -
26 -inherit eutils versionator toolchain-funcs flag-o-matic user
27 -MY_PV="$(replace_version_separator 3 -)"
28 -PSYBNC_HOME="/var/lib/psybnc"
29 -
30 -DESCRIPTION="psyBNC is a multi-user and multi-server gateway to IRC networks"
31 -HOMEPAGE="http://www.psybnc.at/index.html"
32 -SRC_URI="http://www.psybnc.at/download/beta/psyBNC-${MY_PV}.tar.gz"
33 -
34 -LICENSE="GPL-2"
35 -SLOT="0"
36 -KEYWORDS="~amd64 ~sparc ~x86 ~ppc"
37 -IUSE="ipv6 ssl oidentd scripting multinetwork"
38 -
39 -DEPEND="ssl? ( >=dev-libs/openssl-0.9.7d )
40 - oidentd? ( >=net-misc/oidentd-2.0 )"
41 -RDEPEND="${DEPEND}"
42 -S="${WORKDIR}"/"${PN}"
43 -
44 -pkg_setup() {
45 - enewgroup psybnc
46 - enewuser psybnc -1 -1 ${PSYBNC_HOME} psybnc
47 -}
48 -
49 -src_unpack() {
50 - unpack ${A}
51 - cd "${S}"
52 -
53 - # Useless files
54 - rm -f */INFO
55 -
56 - # Pretend we already have a certificate, we generate it in pkg_config
57 - mkdir key
58 - touch key/psybnc.cert.pem
59 -
60 - if [[ -f ${ROOT}/usr/share/psybnc/salt.h ]]
61 - then
62 - einfo "Using existing salt.h for password encryption"
63 - cp "${ROOT}"/usr/share/psybnc/salt.h salt.h
64 - fi
65 -}
66 -
67 -src_prepare() {
68 - epatch "${FILESDIR}/compile.diff"
69 - epatch "${FILESDIR}/ldflags-fix.patch"
70 -
71 - # add oidentd
72 - use oidentd && epatch "${FILESDIR}/${P}-oidentd.patch"
73 -
74 - # add scripting support
75 - use scripting && epatch "${FILESDIR}/${P}-scripting.patch"
76 -
77 - # add multinetwork support
78 - use multinetwork && epatch "${FILESDIR}/${P}-multinetwork.patch"
79 -
80 - # Prevent stripping the binary
81 - sed -i -e "/@strip/ d" tools/autoconf.c
82 -}
83 -
84 -src_compile() {
85 - use ipv6 || rm -f tools/chkipv6.c
86 - use ssl || rm -f tools/chkssl.c
87 -
88 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed"
89 -}
90 -
91 -src_install() {
92 - dobin psybnc
93 -
94 - insinto /usr/share/psybnc
95 - doins -r help lang salt.h
96 - fperms 0600 /usr/share/psybnc/salt.h
97 -
98 - insinto /etc/psybnc
99 - doins "${FILESDIR}"/psybnc.conf
100 -
101 - keepdir "${PSYBNC_HOME}"/{log,motd,scripts}
102 - dosym /usr/share/psybnc/lang "${PSYBNC_HOME}"/lang
103 - dosym /usr/share/psybnc/help "${PSYBNC_HOME}"/help
104 -
105 - fowners psybnc:psybnc "${PSYBNC_HOME}"/{,log,motd,scripts} /etc/psybnc/psybnc.conf
106 - fperms 0750 "${PSYBNC_HOME}"/{,log,motd,scripts}
107 - fperms 0640 /etc/psybnc/psybnc.conf
108 -
109 - if use ssl
110 - then
111 - keepdir /etc/psybnc/ssl
112 - dosym /etc/psybnc/ssl "${PSYBNC_HOME}"/key
113 - else
114 - # Drop SSL listener from psybnc.conf
115 - sed -i -e "/^# Default SSL listener$/,+4 d" "${D}"/etc/psybnc/psybnc.conf
116 - fi
117 -
118 - if use oidentd
119 - then
120 - insinto /etc
121 - doins "${FILESDIR}"/oidentd.conf.psybnc
122 - fperms 640 /etc/oidentd.conf.psybnc
123 - # install init-script with oidentd-support
124 - newinitd "${FILESDIR}"/psybnc-oidentd.initd psybnc
125 - else
126 - # install init-script without oidentd-support
127 - newinitd "${FILESDIR}"/psybnc.initd psybnc
128 - fi
129 -
130 - newconfd "${FILESDIR}"/psybnc.confd psybnc
131 -
132 - dodoc CHANGES FAQ README SCRIPTING TODO
133 - docinto example-script
134 - dodoc scripts/example/DEFAULT.SCRIPT
135 -}
136 -
137 -pkg_config() {
138 - if use ssl
139 - then
140 - if [[ -f ${ROOT}/etc/psybnc/ssl/psybnc.cert.pem || -f ${ROOT}/etc/psybnc/ssl/psybnc.key.pem ]]
141 - then
142 - ewarn "Existing /etc/psybnc/psybnc.cert.pem or /etc/psybnc/psybnc.key.pem found!"
143 - ewarn "Remove /etc/psybnc/psybnc.*.pem and run emerge --config =${CATEGORY}/${PF} again."
144 - return
145 - fi
146 -
147 - einfo "Generating certificate request..."
148 - openssl req -new -out "${ROOT}"/etc/psybnc/ssl/psybnc.req.pem -keyout "${ROOT}"/etc/psybnc/ssl/psybnc.key.pem -nodes
149 - einfo "Generating self-signed certificate..."
150 - openssl req -x509 -days 365 -in "${ROOT}"/etc/psybnc/ssl/psybnc.req.pem -key "${ROOT}"/etc/psybnc/ssl/psybnc.key.pem -out "${ROOT}"/etc/psybnc/ssl/psybnc.cert.pem
151 - einfo "Setting permissions on files..."
152 - chown root:psybnc "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem
153 - chmod 0640 "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem
154 - fi
155 -}
156 -
157 -pkg_postinst() {
158 - if use ssl
159 - then
160 - elog
161 - elog "Please run \"emerge --config =${CATEGORY}/${PF}\" to create needed SSL certificates."
162 - fi
163 - if use oidentd
164 - then
165 - elog
166 - elog "You have enabled oidentd-support. You will need to set"
167 - elog "up your /etc/oident.conf file before running psybnc. An example"
168 - elog "for psyBNC can be found under /etc/oidentd.conf.psybnc"
169 - fi
170 - elog
171 - elog "You can connect to psyBNC on port 23998 with user gentoo and password gentoo."
172 - elog "Please edit the psyBNC configuration at /etc/psybnc/psybnc.conf to change this."
173 - elog
174 - elog "To be able to reuse an existing psybnc.conf, you need to make sure that the"
175 - elog "old salt.h is available at /usr/share/psybnc/salt.h when compiling a new"
176 - elog "version of psyBNC. It is needed for password encryption and decryption."
177 - elog
178 -}