summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2010-08-27 10:00:43 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2010-08-27 10:00:43 +0000
commit807f9fd5a5a346152d505041eec6738cf46de5ac (patch)
tree316e31af6d570cc3d8e406b5b944b37a0a80e84d /net-irc
parentFix LDFLAGS for bug #334755 (diff)
downloadgentoo-2-807f9fd5a5a346152d505041eec6738cf46de5ac.tar.gz
gentoo-2-807f9fd5a5a346152d505041eec6738cf46de5ac.tar.bz2
gentoo-2-807f9fd5a5a346152d505041eec6738cf46de5ac.zip
Add support for --config action.
(Portage version: 2.2_rc68/cvs/Linux x86_64)
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/quassel/ChangeLog5
-rw-r--r--net-irc/quassel/quassel-9999.ebuild39
2 files changed, 32 insertions, 12 deletions
diff --git a/net-irc/quassel/ChangeLog b/net-irc/quassel/ChangeLog
index 3d8cfdbbb214..ee3d9d4cc82a 100644
--- a/net-irc/quassel/ChangeLog
+++ b/net-irc/quassel/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-irc/quassel
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/ChangeLog,v 1.98 2010/08/27 09:44:57 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/ChangeLog,v 1.99 2010/08/27 10:00:43 scarabeus Exp $
+
+ 27 Aug 2010; Tomáš Chvátal <scarabeus@gentoo.org> quassel-9999.ebuild:
+ Add support for --config action.
27 Aug 2010; Tomáš Chvátal <scarabeus@gentoo.org> quassel-9999.ebuild:
Move dbus deps to proper section, add missing dep.
diff --git a/net-irc/quassel/quassel-9999.ebuild b/net-irc/quassel/quassel-9999.ebuild
index 81054d4d128a..a14aed66f619 100644
--- a/net-irc/quassel/quassel-9999.ebuild
+++ b/net-irc/quassel/quassel-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/quassel-9999.ebuild,v 1.45 2010/08/27 09:44:57 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/quassel-9999.ebuild,v 1.46 2010/08/27 10:00:43 scarabeus Exp $
EAPI="2"
@@ -124,26 +124,43 @@ src_install() {
}
pkg_postinst() {
- if use server && use ssl; then
- # inform about genreating ssl certificate
- elog "If you want to use ssl connection to your core, please generate ssl key, with following command:"
- elog "# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ${QUASSEL_DIR}/quasselCert.pem -out ${QUASSEL_DIR}/quasselCert.pem"
- echo
- elog "Also remember that with the above command the key is valid only for 1 year."
- fi
-
if ( use monolithic || [[ "${FORCED_MONO}" == "yes" ]] ) && use ssl ; then
- echo
elog "Information on how to enable SSL support for client/core connections"
elog "is available at http://bugs.quassel-irc.org/wiki/quassel-irc."
fi
+ if use server; then
+ einfo "If you want to generate SSL certificate remember to run:"
+ einfo " emerge --config =${CATEGORY}/${PF}"
+ fi
+
# temporary info mesage
if use server; then
+ echo
ewarn "Please note that all configuration moved from"
ewarn "/home/\${QUASSEL_USER}/.config/quassel-irc.org/"
ewarn "to: ${QUASSEL_DIR}."
echo
- ewarn "For migration, stop the core, move quasselcore files (pretty much everything apart from quasselclient.conf and settings.qss) into new location and then start server again."
+ ewarn "For migration, stop the core, move quasselcore files (pretty much"
+ ewarn "everything apart from quasselclient.conf and settings.qss) into"
+ ewarn "new location and then start server again."
+ fi
+}
+
+pkg_config() {
+ if use server && use ssl; then
+ # generate the pem file only when it does not already exist
+ if [ ! -f "${QUASSEL_DIR}/quasselCert.pem" ]; then
+ einfo "Generating QUASSEL SSL certificate to: \"${QUASSEL_DIR}/quasselCert.pem\""
+ openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
+ -keyout "${QUASSEL_DIR}/quasselCert.pem" \
+ -out "${QUASSEL_DIR}/quasselCert.pem"
+ # permissions for the key
+ chown ${QUASSEL_USER}:${QUASSEL_USER} "${QUASSEL_DIR}/quasselCert.pem"
+ chmod 400 "${QUASSEL_DIR}/quasselCert.pem"
+ else
+ einfo "Certificate \"${QUASSEL_DIR}/quasselCert.pem\" already exists."
+ einfo "Remove it if you want to create new one."
+ fi
fi
}