# ChangeLog for net-irc/psybnc
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/ChangeLog,v 1.4 2006/12/28 12:52:27 hansmi Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/ChangeLog,v 1.5 2007/02/26 00:03:08 gurligebis Exp $
+
+ 26 Feb 2007; Bjarke Istrup Pedersen <gurligebis@gentoo.org>:
+ Moved away from /opt, fixing bug #154164 .
28 Dec 2006; Michael Hanselmann <hansmi@gentoo.org>
psybnc-2.3.2.7-r1.ebuild:
-AUX psybnc-2.3.2.7-r1-gentoo.diff 814 RMD160 4c9989c41072265541b2c85d5b4281fed87d2063 SHA1 ae27819f1d19049bf49c659badc8b75d1427cae2 SHA256 06f45391d2114d8165895e0b5e70a0096653404a4dfbb29df51b82d64a0ea7bd
-MD5 f1c7af9bd1152e0ee6dcbd72c81e7a6b files/psybnc-2.3.2.7-r1-gentoo.diff 814
-RMD160 4c9989c41072265541b2c85d5b4281fed87d2063 files/psybnc-2.3.2.7-r1-gentoo.diff 814
-SHA256 06f45391d2114d8165895e0b5e70a0096653404a4dfbb29df51b82d64a0ea7bd files/psybnc-2.3.2.7-r1-gentoo.diff 814
AUX psybnc.conf 313 RMD160 446813d0753d5b6d3c7592bd90f83f821a993973 SHA1 f9149567abc499474f482ad46b34a16b5bf8dd90 SHA256 e4b04c86a4a1ed910b6cf21fa834eb1eeed166bb372cffbfe9674613f68a080f
MD5 8d8566aeb360bde07a233ba58be31029 files/psybnc.conf 313
RMD160 446813d0753d5b6d3c7592bd90f83f821a993973 files/psybnc.conf 313
SHA256 e4b04c86a4a1ed910b6cf21fa834eb1eeed166bb372cffbfe9674613f68a080f files/psybnc.conf 313
-AUX psybnc.confd 62 RMD160 b19c1985f2e22876f06999ad4a9289a8ebef0871 SHA1 83aef04d84bad32fa53dea028c86381348936c00 SHA256 4bdb5cadd66d7fc361ab452ab572969a6323cc1d1ae358d4722c8c536dd3f568
-MD5 c944e12019b842806750370d9363ffdc files/psybnc.confd 62
-RMD160 b19c1985f2e22876f06999ad4a9289a8ebef0871 files/psybnc.confd 62
-SHA256 4bdb5cadd66d7fc361ab452ab572969a6323cc1d1ae358d4722c8c536dd3f568 files/psybnc.confd 62
-AUX psybnc.initd 564 RMD160 8d35e3b9eb8ccf8373f5b1af42e7dbb7097462b7 SHA1 d3af9b75eab45ce0aa22d1b86420ff37baefc6b3 SHA256 83ebe88abf3167fee1756b23e752fb46be9dc30e2d2c020a233b881698aea3ae
-MD5 2a31dac70369bbcb2b089e712eb1138e files/psybnc.initd 564
-RMD160 8d35e3b9eb8ccf8373f5b1af42e7dbb7097462b7 files/psybnc.initd 564
-SHA256 83ebe88abf3167fee1756b23e752fb46be9dc30e2d2c020a233b881698aea3ae files/psybnc.initd 564
+AUX psybnc.confd 113 RMD160 106f0f680fcd5720ab7eead55b782a271627b81d SHA1 bb64a2eda5953fbdc39653c0612e26e5016dac78 SHA256 5077226f94b59e2e1874b0019d00375f17b73a77a25533275a59f18af6bf24f2
+MD5 97f0834dd6860c800402587c398fbfd8 files/psybnc.confd 113
+RMD160 106f0f680fcd5720ab7eead55b782a271627b81d files/psybnc.confd 113
+SHA256 5077226f94b59e2e1874b0019d00375f17b73a77a25533275a59f18af6bf24f2 files/psybnc.confd 113
+AUX psybnc.initd 1009 RMD160 415cc2b29e9fed2f64b671527583c0666c699121 SHA1 38599f1702c2c5d411ae099cb98b0acb647b5d66 SHA256 6ca56b5cdabae78d19710f46be0524bfd451866f7aae0a9c953cab28fde5fcbd
+MD5 662031e710eb8a24cfaf056fa581d1a2 files/psybnc.initd 1009
+RMD160 415cc2b29e9fed2f64b671527583c0666c699121 files/psybnc.initd 1009
+SHA256 6ca56b5cdabae78d19710f46be0524bfd451866f7aae0a9c953cab28fde5fcbd files/psybnc.initd 1009
DIST psyBNC-2.3.2-7.tar.gz 312177 RMD160 6a7311a3219fa005219a815bbbac188c315bd2b2 SHA1 d3d06e05c447f7366761a85af204222eddb55e2d SHA256 be38468b374b0470a5728b154527019b7d613c90dc23a93053fda7cdd93f6519
-EBUILD psybnc-2.3.2.7-r1.ebuild 2502 RMD160 3b73fcb26714db34200366795d053c0a6bc22043 SHA1 ebe481cc95aee6b11fdcefa21c7fb6c7a2725c35 SHA256 f6c921e6e38fdd15fb0c3052ee5b6cc99ad63c80215dddce60e78c78189191b4
-MD5 17a783b152dc940d66f9e8e36a0a5cd7 psybnc-2.3.2.7-r1.ebuild 2502
-RMD160 3b73fcb26714db34200366795d053c0a6bc22043 psybnc-2.3.2.7-r1.ebuild 2502
-SHA256 f6c921e6e38fdd15fb0c3052ee5b6cc99ad63c80215dddce60e78c78189191b4 psybnc-2.3.2.7-r1.ebuild 2502
-MISC ChangeLog 761 RMD160 3e4b19e9e03217c10502095feceeffa302fed135 SHA1 731bd469485f1da9de964f84358a22863bdbd94a SHA256 8526914ce776da44065546c3de1b04e02fd978dda971b7e97f375b472d608811
-MD5 48afead50fa835d65feb76aadbd316b4 ChangeLog 761
-RMD160 3e4b19e9e03217c10502095feceeffa302fed135 ChangeLog 761
-SHA256 8526914ce776da44065546c3de1b04e02fd978dda971b7e97f375b472d608811 ChangeLog 761
-MISC metadata.xml 367 RMD160 d27fab183bd5537ddb6d546cf1e8e22d30dfe166 SHA1 1141940781391bccb9645a9534ca238b8f5ecbd2 SHA256 8addc1375cc69faafe6892005d9e1e73bd3b670ab4e5610484146fbd8287761f
-MD5 7b6337aba643cf53002436abd1d5495e metadata.xml 367
-RMD160 d27fab183bd5537ddb6d546cf1e8e22d30dfe166 metadata.xml 367
-SHA256 8addc1375cc69faafe6892005d9e1e73bd3b670ab4e5610484146fbd8287761f metadata.xml 367
-MD5 df094001a718a828a55f2ae1176dbeea files/digest-psybnc-2.3.2.7-r1 244
-RMD160 24929b25c5a7708c7db81906a44e655c16e99e86 files/digest-psybnc-2.3.2.7-r1 244
-SHA256 1de63a136d6e99e75dafd6723fb077542bc2e0160917f4d75ac277a49609289e files/digest-psybnc-2.3.2.7-r1 244
+EBUILD psybnc-2.3.2.7-r2.ebuild 3738 RMD160 56f4acfd11fcb63a813e76dfacd979580379a337 SHA1 9d5668ba685aa8873fdff89b4fc60adaba6420db SHA256 110f9d15664d998c373ba04f33ee457042efccddab6210709056a0e7fa5fafb5
+MD5 d34e7e1d80f416999caf7b4c731efa78 psybnc-2.3.2.7-r2.ebuild 3738
+RMD160 56f4acfd11fcb63a813e76dfacd979580379a337 psybnc-2.3.2.7-r2.ebuild 3738
+SHA256 110f9d15664d998c373ba04f33ee457042efccddab6210709056a0e7fa5fafb5 psybnc-2.3.2.7-r2.ebuild 3738
+MISC ChangeLog 874 RMD160 f04d9694e0bd2d6847c8e0d676de521c7f723706 SHA1 88bcb5ef69c89d86a2891dfd7326b93929631dce SHA256 7d1d4343f531946e2fd0a94f4ee1319f51c04f86533197c551fe157e38bfa9b3
+MD5 6b347c321d23b87c424c3c830ea006f1 ChangeLog 874
+RMD160 f04d9694e0bd2d6847c8e0d676de521c7f723706 ChangeLog 874
+SHA256 7d1d4343f531946e2fd0a94f4ee1319f51c04f86533197c551fe157e38bfa9b3 ChangeLog 874
+MISC metadata.xml 367 RMD160 aafca01b315e4aa19e1bab99902c09faa8068f5c SHA1 c644390b912576d2859097b0a4c78854dceee43b SHA256 7995a9d90742808ba93e9f868d1f59d6dd1b4055c69e760f5fce95a4de4a94f1
+MD5 f07e68f84e878a8aeea22e5b2584e886 metadata.xml 367
+RMD160 aafca01b315e4aa19e1bab99902c09faa8068f5c metadata.xml 367
+SHA256 7995a9d90742808ba93e9f868d1f59d6dd1b4055c69e760f5fce95a4de4a94f1 metadata.xml 367
+MD5 df094001a718a828a55f2ae1176dbeea files/digest-psybnc-2.3.2.7-r2 244
+RMD160 24929b25c5a7708c7db81906a44e655c16e99e86 files/digest-psybnc-2.3.2.7-r2 244
+SHA256 1de63a136d6e99e75dafd6723fb077542bc2e0160917f4d75ac277a49609289e files/digest-psybnc-2.3.2.7-r2 244
+++ /dev/null
---- tools/autoconf.c 2004-05-07 01:33:25.956597616 +0200
-+++ tools/autoconf.c 2004-05-07 01:33:43.075995072 +0200
-@@ -462,7 +462,7 @@
- fprintf(makefile," @echo \"* for the sake of correct Cert-Checking *\"\n");
- fprintf(makefile," @echo \"*******************************************\"\n");
- fprintf(makefile," @echo \"Generating certificate request .. \"\n");
-- fprintf(makefile," @%s req -new -config src/ssl.cnf -out key/psybnc.req.pem \\\n",sslbin);
-+ fprintf(makefile," @%s req -batch -new -config src/ssl.cnf -out key/psybnc.req.pem \\\n",sslbin);
- fprintf(makefile," -keyout key/psybnc.key.pem -nodes\n");
- fprintf(makefile," @echo \"Generating self-signed certificate .. \"\n");
- fprintf(makefile," @%s req -x509 -days 365 -in key/psybnc.req.pem \\\n",sslbin);
-# psybnc start-up options
-USER="psybnc"
-BNCPATH="/opt/psybnc"
+# /etc/conf.d/psybnc
+
+PSYBNC_CONFIG="/etc/psybnc/psybnc.conf"
+PSYBNC_HOME="/var/lib/psybnc"
+PSYBNC_USER="psybnc"
#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/files/psybnc.initd,v 1.2 2007/02/26 00:03:08 gurligebis Exp $
depend() {
need net
}
check_config() {
- if [ -z "${USER}" ]
+ if [[ ! -f ${PSYBNC_CONFIG} ]]
then
- eerror "Please set \$USER in /etc/conf.d/psybnc!"
+ eerror "Please set \$PSYBNC_CONFIG in /etc/conf.d/psybnc!"
return 1
fi
- if [ -z "${BNCPATH}" ]
+
+ if [[ ! -d "${PSYBNC_HOME}" ]]
+ then
+ eerror "Please set \$PSYBNC_HOME in /etc/conf.d/psybnc!"
+ return 1
+ fi
+
+ if [[ -z "${PSYBNC_USER}" ]]
then
- eerror "Please set \$BNCPATH in /etc/conf.d/psybnc!"
+ eerror "Please set \$PSYBNC_USER in /etc/conf.d/psybnc!"
return 1
fi
}
start() {
- ebegin "Starting psybnc"
check_config || return 1
- export HOME="${BNCPATH}"
- start-stop-daemon -c ${USER} -S -q --chdir ${BNCPATH} -x ${BNCPATH}/psybnc 1>/dev/null 2>&1
+ ebegin "Starting psyBNC"
+ start-stop-daemon --start --quiet --chuid "${PSYBNC_USER}" --chdir "${PSYBNC_HOME}" --exec /usr/bin/psybnc -- "${PSYBNC_CONFIG}" &>/dev/null
eend $?
}
stop() {
- ebegin "Stopping psybnc"
- start-stop-daemon -K -q --exec ${BNCPATH}/psybnc -s 9
+ check_config || return 1
+ ebegin "Stopping psyBNC"
+ start-stop-daemon --stop --quiet --pidfile "${PSYBNC_HOME}"/psybnc.pid --signal 9
eend $?
}
<email>gurligebis@gentoo.org</email>
<name>Bjarke Istrup Pedersen</name>
</maintainer>
- <longdescription>PsyBNC is a multi-user and multi-server gateway to IRC networks</longdescription>
+ <longdescription>psyBNC is a multi-user and multi-server gateway to IRC networks</longdescription>
</pkgmetadata>
+++ /dev/null
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/psybnc-2.3.2.7-r1.ebuild,v 1.2 2006/12/28 12:52:27 hansmi Exp $
-
-inherit eutils versionator
-MY_PV=$(replace_version_separator 3 '-')
-S=${WORKDIR}/${PN}
-INSTALLDIR="/opt/psybnc"
-
-DESCRIPTION="PsyBNC is a multi-user and multi-server gateway to IRC networks"
-HOMEPAGE="http://www.psybnc.at/index.html"
-SRC_URI="http://www.psybnc.at/download/beta/psyBNC-${MY_PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~sparc ~x86"
-IUSE=""
-DEPEND=">=dev-libs/openssl-0.9.7d"
-
-pkg_setup() {
- enewgroup psybnc
- enewuser psybnc -1 -1 ${INSTALLDIR} psybnc
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/${PF}-gentoo.diff
-}
-
-src_compile() {
- emake || die "emake failed"
-}
-
-src_install() {
- dodoc CHANGES COPYING FAQ README SCRIPTING TODO
- dodir ${INSTALLDIR}/help ${INSTALLDIR}/key ${INSTALLDIR}/lang ${INSTALLDIR}/log ${INSTALLDIR}/motd ${INSTALLDIR}/scripts
-
- insinto ${INSTALLDIR}/help
- doins help/*
- insinto ${INSTALLDIR}/key
- doins key/*
- insinto ${INSTALLDIR}/lang
- doins lang/*
- insinto ${INSTALLDIR}/log
- doins log/*
- insinto ${INSTALLDIR}/motd
- doins motd/*
- insinto ${INSTALLDIR}/scripts
- doins scripts/*
- insinto ${INSTALLDIR}
- doins ${FILESDIR}/psybnc.conf config.h
-
- exeinto ${INSTALLDIR}
- doexe psybnc
- exeinto /etc/init.d
- newexe ${FILESDIR}/psybnc.initd psybnc
- insinto /etc/conf.d
- newins ${FILESDIR}/psybnc.confd psybnc
-
- chown -R psybnc:psybnc ${D}/${INSTALLDIR}
-}
-
-pkg_config() {
- einfo "Generating certificate request..."
- openssl req -new -out ${INSTALLDIR}/key/psybnc.req.pem -keyout ${INSTALLDIR}/key/psybnc.key.pem -nodes
- einfo "Generating self-signed certificate..."
- openssl req -x509 -days 365 -in ${INSTALLDIR}/key/psybnc.req.pem -key ${INSTALLDIR}/key/psybnc.key.pem -out ${INSTALLDIR}/key/psybnc.cert.pem
- einfo "Generating fingerprint..."
- openssl x509 -subject -dates -fingerprint -noout -in ${INSTALLDIR}/key/psybnc.cert.pem
- einfo "Setting permissions on files..."
- chmod 0640 ${INSTALLDIR}/key/psybnc.key.pem
- chmod 0640 ${INSTALLDIR}/key/psybnc.req.pem
- chmod 0640 ${INSTALLDIR}/key/psybnc.cert.pem
-}
-
-pkg_postinst() {
- einfo ""
- einfo "Please run \"emerge --config =psybnc-${PVR}\" to create SSL certificates for your system."
- einfo "You can connect to the bnc on port 23998, user=gentoo, pass=gentoo,"
- einfo "please edit the psybnc configuration in ${INSTALLDIR}/psybnc.conf to change this."
- einfo ""
-}
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/psybnc-2.3.2.7-r2.ebuild,v 1.1 2007/02/26 00:03:08 gurligebis Exp $
+
+inherit eutils versionator toolchain-funcs
+MY_PV="$(replace_version_separator 3 -)"
+PSYBNC_HOME="/var/lib/psybnc"
+
+DESCRIPTION="psyBNC is a multi-user and multi-server gateway to IRC networks"
+HOMEPAGE="http://www.psybnc.at/index.html"
+SRC_URI="http://www.psybnc.at/download/beta/psyBNC-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="ipv6 ssl"
+
+DEPEND="ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}"
+S="${WORKDIR}"/"${PN}"
+
+pkg_setup() {
+ enewgroup psybnc
+ enewuser psybnc -1 -1 ${PSYBNC_HOME} psybnc
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # Useless files
+ rm -f */INFO
+
+ # Prevent stripping the binary
+ sed -i -e "/@strip/ d" tools/autoconf.c
+
+ # Pretend we already have a certificate, we generate it in pkg_config
+ mkdir key
+ touch key/psybnc.cert.pem
+
+ if [[ -f ${ROOT}/usr/share/psybnc/salt.h ]]
+ then
+ einfo "Using existing salt.h for password encryption"
+ cp "${ROOT}"/usr/share/psybnc/salt.h salt.h
+ fi
+}
+
+src_compile() {
+ use ipv6 || rm -f tools/chkipv6.c
+ use ssl || rm -f tools/chkssl.c
+
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin psybnc
+
+ insinto /usr/share/psybnc
+ doins -r help lang salt.h
+ fperms 0600 /usr/share/psybnc/salt.h
+
+ insinto /etc/psybnc
+ doins "${FILESDIR}"/psybnc.conf
+
+ keepdir "${PSYBNC_HOME}"/{log,motd,scripts}
+ dosym /usr/share/psybnc/lang "${PSYBNC_HOME}"/lang
+ dosym /usr/share/psybnc/help "${PSYBNC_HOME}"/help
+
+ fowners psybnc:psybnc "${PSYBNC_HOME}"/{,log,motd,scripts} /etc/psybnc/psybnc.conf
+ fperms 0750 "${PSYBNC_HOME}"/{,log,motd,scripts}
+ fperms 0640 /etc/psybnc/psybnc.conf
+
+ if use ssl
+ then
+ keepdir /etc/psybnc/ssl
+ dosym /etc/psybnc/ssl "${PSYBNC_HOME}"/key
+ else
+ # Drop SSL listener from psybnc.conf
+ sed -i -e "/^# Default SSL listener$/,+4 d" "${D}"/etc/psybnc/psybnc.conf
+ fi
+
+ newinitd "${FILESDIR}"/psybnc.initd psybnc
+ newconfd "${FILESDIR}"/psybnc.confd psybnc
+
+ dodoc CHANGES COPYING FAQ README SCRIPTING TODO
+ docinto example-script
+ dodoc scripts/example/DEFAULT.SCRIPT
+}
+
+pkg_config() {
+ if use ssl
+ then
+ if [[ -f ${ROOT}/etc/psybnc/ssl/psybnc.cert.pem || -f ${ROOT}/etc/psybnc/ssl/psybnc.key.pem ]]
+ then
+ ewarn "Existing /etc/psybnc/psybnc.cert.pem or /etc/psybnc/psybnc.key.pem found!"
+ ewarn "Remove /etc/psybnc/psybnc.*.pem and run emerge --config =${CATEGORY}/${PF} again."
+ return
+ fi
+
+ einfo "Generating certificate request..."
+ openssl req -new -out "${ROOT}"/etc/psybnc/ssl/psybnc.req.pem -keyout "${ROOT}"/etc/psybnc/ssl/psybnc.key.pem -nodes
+ einfo "Generating self-signed certificate..."
+ 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
+ einfo "Setting permissions on files..."
+ chown root:psybnc "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem
+ chmod 0640 "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem
+ fi
+}
+
+pkg_postinst() {
+ if use ssl
+ then
+ einfo
+ einfo "Please run \"emerge --config =${CATEGORY}/${PF}\" to create needed SSL certificates."
+ fi
+
+ einfo
+ einfo "You can connect to psyBNC on port 23998 with user gentoo and password gentoo."
+ einfo "Please edit the psyBNC configuration at /etc/psybnc/psybnc.conf to change this."
+ einfo
+ einfo "To be able to reuse an existing psybnc.conf, you need to make sure that the"
+ einfo "old salt.h is available at /usr/share/psybnc/salt.h when compiling a new"
+ einfo "version of psyBNC. It is needed for password encryption and decryption."
+ einfo
+}