]> Pileus Git - ~andy/sunrise/commitdiff
new category: www-servers
authorStefan Garthe (the_mgt) <themgt@uncensored.citadel.org>
Sun, 4 Oct 2009 22:18:21 +0000 (22:18 +0000)
committerStefan Garthe (the_mgt) <themgt@uncensored.citadel.org>
Sun, 4 Oct 2009 22:18:21 +0000 (22:18 +0000)
svn path=/sunrise/; revision=9329

mail-mta/citadel/ChangeLog [new file with mode: 0644]
mail-mta/citadel/Manifest [new file with mode: 0644]
mail-mta/citadel/citadel-7.66.ebuild [new file with mode: 0644]
mail-mta/citadel/files/citadel.confd [new file with mode: 0644]
mail-mta/citadel/files/citadel.init [new file with mode: 0644]
mail-mta/citadel/files/mailer.conf [new file with mode: 0644]
mail-mta/citadel/metadata.xml [new file with mode: 0644]

diff --git a/mail-mta/citadel/ChangeLog b/mail-mta/citadel/ChangeLog
new file mode 100644 (file)
index 0000000..e8d4cf3
--- /dev/null
@@ -0,0 +1,14 @@
+# ChangeLog for mail-mta/citadel
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+  04 Oct 2009; the_mgt themgt@mail.ru +citadel-7.66.ebuild,
+  +files/citadel.confd, +files/citadel.init, +files/mailer.conf,
+  +metadata.xml:
+  New Ebuild for bug 62119 Thanks for the reviews and help to the people of
+  #gentoo-sunrise
+
+  04 Oct 2009; the_mgt themgt@mail.ru +citadel-7.66.ebuild, +metadata.xml:
+  New Ebuild for bug 62119 Thanks for the reviews and help to the people of
+  #gentoo-sunrise
+
diff --git a/mail-mta/citadel/Manifest b/mail-mta/citadel/Manifest
new file mode 100644 (file)
index 0000000..658cd35
--- /dev/null
@@ -0,0 +1,7 @@
+AUX citadel.confd 957 RMD160 50f8ade88eb6b0c88aa94b42e13f81b725099027 SHA1 091d9223315c5d390ecd18bba44198ed6dfe2c22 SHA256 ef9309d200cb0617b91ee0983db41b53e424a9b4095e0f5ec76112866865871f
+AUX citadel.init 797 RMD160 4da67fb04e802d06391b1bf990421ba9dc8a8376 SHA1 ee6068c4ca88b214b8fa16e05592495dd2101bd2 SHA256 2e233de7a7cb5af342449e062df8ca47e35fa9b029a5ad1565f4fa16764686d0
+AUX mailer.conf 236 RMD160 a01981ea92dfafa4039c7f09f41a9b5722bf56d6 SHA1 5e8e0cd326bda077831a309ff3825897b3156279 SHA256 f0df591d761bb078447d666fdf18c42e511fb5765a4ddc2fca2bc96f7df50be8
+DIST citadel-7.66.tar.gz 809003 RMD160 783b3070c32e517bbcf492904946e35ad1d4b4c0 SHA1 0d039bd7a9fa827312d71b9a0dbf10eebb976752 SHA256 0ce10d75855aab77a0cb787e146ffb02f8077637a972c1eec56865ad5939abb1
+EBUILD citadel-7.66.ebuild 6711 RMD160 e4747007e35861e0fc6639c79d99ca087a9c9a98 SHA1 d4371b14fcae288eb774a70414d4437edd645c5a SHA256 0f70420f360fffb45986161f2e8b48e77d718b2965e907fef622e90264136c95
+MISC ChangeLog 524 RMD160 a81692682441ec4a6696a9c3480037ea88139e82 SHA1 ea1fdd9fc5785e5ffebab5be523df2ac7e2b7a75 SHA256 e38dfcb7992cc49e82def2af6b7eb5432756bc6fc730de1ba782469b761e42ab
+MISC metadata.xml 1069 RMD160 e8e08f40f6d4d25a1c7bee66d21357ae3b400fdc SHA1 106aa862377e9932222947e4871789ba28e5d38b SHA256 9811c5376d9fd71e14ad2a10ad827e92769f489262ebb7de9d3558d4dc609c66
diff --git a/mail-mta/citadel/citadel-7.66.ebuild b/mail-mta/citadel/citadel-7.66.ebuild
new file mode 100644 (file)
index 0000000..2b16c41
--- /dev/null
@@ -0,0 +1,204 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+inherit eutils multilib
+
+DESCRIPTION="Groupware/Email/Jabberserver. Collaboration, Calender, BBS/Forum, Chat with easy install and usage"
+HOMEPAGE="http://www.citadel.org/"
+SRC_URI="http://easyinstall.citadel.org/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ldap mailwrapper pam pic ssl threads"
+
+DEPEND="=dev-libs/libcitadel-${PV}
+       >=sys-libs/db-4.1.25_p1
+       virtual/libiconv
+       ldap? ( >=net-nds/openldap-2.0.27 )
+       pam? ( sys-libs/pam )
+       ssl? ( >=dev-libs/openssl-0.9.6 )"
+
+RDEPEND="${DEPEND}
+       net-mail/mailbase
+       !mailwrapper? ( !virtual/mta !net-mail/mailwrapper )
+       mailwrapper? ( >=net-mail/mailwrapper-0.2 )"
+
+PROVIDE="virtual/mta
+       virtual/mda
+       virtual/imapd"
+
+MESSAGEBASE="/var/lib/citadel"
+
+pkg_setup() {
+       #Homedir needs to be the same as --with-datadir
+       einfo "Adding Citadel User/Group"
+       enewgroup citadel
+       enewuser citadel -1 /dev/null ${MESSAGEBASE} citadel,mail
+}
+
+src_configure() {
+       econf \
+               --with-rundir=/var/run/citadel \
+               --with-datadir=/var/lib/citadel \
+               --with-spooldir=/var/spool/citadel \
+               --with-autosysconfdir=/var/lib/citadel/data \
+               --with-staticdatadir=/etc/citadel \
+               --with-sysconfdir=/etc/citadel \
+               --with-ssldir=/etc/ssl/citadel \
+               --with-helpdir=/usr/share/citadel-server \
+               --with-docdir=/usr/share/doc/${PF} \
+               --with-utility-bindir=/usr/$(get_libdir)/citadel \
+               --without-libdspam \
+               $(use_enable pic pie) \
+               $(use_with pam) \
+               $(use_with ssl openssl) \
+               $(use_with ldap) \
+               --with-db
+}
+
+src_install() {
+       if use pam ; then
+                dodir /etc/pam.d || die "Creating /etc/pam.d failed in sandbox"
+       fi
+
+       emake DESTDIR="${D}" install-new || die "make install failed"
+
+       # Protect ${MESSAGEBASE}
+       echo CONFIG_PROTECT="${MESSAGEBASE}" > "${T}"/10citadel
+       doenvd "${T}"/10citadel || die "Config-protecting failed"
+
+       # Keep emerge from removing empty directories when updating
+       keepdir "${MESSAGEBASE}"/data
+       keepdir /var/spool/citadel/network/{systems,spoolout,spoolin}
+       keepdir /var/run/citadel/network/{systems,spoolout,spoolin}
+       keepdir /etc/citadel/messages
+
+       #Fix some permissions and sendmail stuff
+       fowners citadel:citadel /etc/citadel /var/lib/citadel || die "Changing owner failed"
+       fowners root:citadel /usr/sbin/citmail || die "Changing owner failed"
+       rm "${D}"/usr/sbin/sendmail || die "Removinf sendmail bin failed"
+
+       if use mailwrapper ; then
+               insinto /etc/mail
+               doins "${FILESDIR}"/mailer.conf || die "Installing mailer.conf failed"
+       else
+               dosym /usr/sbin/citmail /usr/sbin/sendmail || die "Linking sendmail to citmail failed"
+               dosym /usr/sbin/citmail /usr/$(get_libdir)/sendmail || die "Compatibility sendmail link failed"
+       fi
+
+       if use ldap ; then
+               insinto /etc/openldap/schema
+               doins openldap/citadel.schema || die "Inserting LDAP schema failed"
+               doins openldap/rfc2739.schema || die "Inserting LDAP schema failed"
+       fi
+
+       newinitd "${FILESDIR}"/citadel.init citadel || die "Inserting initscript failed"
+       newconfd "${FILESDIR}"/citadel.confd citadel || die  "Inserting conf for initscript failed"
+}
+
+pkg_postinst() {
+       #remove a file Citadel complains about in the logs while running
+       rm /var/lib/citadel/data/.keep_mail-mta_citadel-0 || die "Removing keepdir dummie failed"
+
+       einfo "The administration tools have been placed in /usr/$(get_libdir)/citadel"
+       einfo
+       einfo "There are two possible options to get Citadel running, if this is"
+       einfo "a new install:"
+       einfo
+       einfo "1. The no-nonse fullspeed approach with most stuff done for you:"
+       einfo "# emerge --config =${CATEGORY}/${PF}"
+       einfo
+       einfo "2. Manually configuring it with its setup routine:"
+       einfo "You should make yourself familiar with Citadels setup:"
+       einfo "http://www.citadel.org/doku.php/documentation:cmdman:setup"
+       einfo "You probalby do not want to let setup chose the mode of starting"
+       einfo
+       einfo "The second approach is only recommended to experienced users!!!"
+       einfo
+       einfo "The service will automatically start after you configured it."
+       einfo "Initscript is /etc/init.d/citadel. Also look into /etc/conf.d"
+       einfo
+       einfo "The following clients are available:"
+       einfo "a) the citadel console client was installed with this ebuild"
+       einfo "b) www-servers/webcit provides a web-based gui"
+}
+
+pkg_config() {
+       #we have to stop the server if it is accidently running
+       [ -f /var/run/citadel/citadel.socket ] && \
+               die "Citadel seems to be running, please stop it while configuring!"
+
+       #Citadel's setup uses a few enviromental variables to control it.
+       # Mandatory for non-interactive setup!
+       export CITADEL_INSTALLER="yes"
+
+       # Citadel location.
+       export CITADEL="/var/run/citadel/"
+
+       if use ldap ; then
+               export SLAPD_Binary="/usr/$(get_libdir)/openldap/slapd"
+               export LDAP_CONFIG="/etc/openldap/sldap.conf"
+       fi
+
+       # Don't create any inittab/initscript/xinet stuff entry.
+       # We'll provide our own init script
+       export CREATE_INITTAB_ENTRY="no"
+       export CREATE_XINETD_ENTRY="no"
+       export NO_INIT_SCRIPTS="yes"
+       export ACT_AS_MTA="no" #just prohibits setup to mess with init scripts
+
+       einfo "On which ip should the server listen?"
+       einfo "Press enter to default to 0.0.0.0 and listen on all interfaces."
+       read -rp "   >" ipadress ; echo
+       if  [ -z "$ipadress" ] ; then
+               export IP_ADDR="0.0.0.0"
+       else
+               export IP_ADDR="$ipadress"
+       fi
+
+       # The main admin name for citadel can be chosen at random
+       einfo "Insert a name for your citadel admin account:"
+       read -rp "   >" sysadminname ; echo
+       export SYSADMIN_NAME="$sysadminname"
+
+       local pwd1="misch"
+       local pwd2="masch"
+
+       until [[ "x$pwd1" = "x$pwd2" ]] ; do
+               einfo "Insert a password for the citadel admin user"
+               einfo "Avoid [\"'\\_%] characters in the password"
+               read -rsp "   >" pwd1 ; echo
+
+               einfo "Retype the password"
+               read -rsp "   >" pwd2 ; echo
+
+               if [[ "x$pwd1" != "x$pwd2" ]] ; then
+                       ewarn "Passwords are not the same"
+               fi
+       done
+       export SYSADMIN_PW="$pwd2"
+
+       #Now we will create the config using defaults and enviromental variables.
+       /usr/$(get_libdir)/citadel/setup -q
+       unset SYSADMIN_PW
+
+       #Verify the /etc/services entry was made
+       if [ -f /etc/services ] && ! grep -q '^citadel' /etc/services ; then
+               echo "citadel           504/tcp         # citadel" >> /etc/services
+       fi
+
+       einfo "Be sure to read the documentation in /usr/share/doc/${PF}"
+       einfo
+       einfo "The server should now be up and running, enjoy!"
+       einfo "Citadel will listen on its default port 504"
+       if use mailwrapper; then
+               einfo
+               einfo "Citadel listens on port 25 by default, even with mailwrapper useflag!"
+               einfo "Right now this can only be disabled in WebCit or with the cli client."
+               einfo "There is no elegant way to disable that atm, will be fixed upstream."
+               einfo "Sorry for this inconvenience!"
+       fi
+}
diff --git a/mail-mta/citadel/files/citadel.confd b/mail-mta/citadel/files/citadel.confd
new file mode 100644 (file)
index 0000000..1d7329c
--- /dev/null
@@ -0,0 +1,24 @@
+# Config file for /etc/init.d/citadel
+
+#Define the Logfacility
+LogFacility="mail"
+
+#Define the Loglevel
+LogLevel="3"
+
+#Define a trace file (only for debugging)
+#TraceFile="/dev/null"
+
+
+#Don't mess with the following lines unless you really know what you are doing!
+#I mean it!! This might b0rk your citadel.
+#You could use -D instead of -d, if needed.
+#Or mess around with -hHomeDir, which i do not recommend
+CITSERVER_OPTS="-d -x${LogLevel} -l${LogFacility}"
+
+#-l            Log facility. Usually “mail”
+#-d            daemonize (detach from controlling terminal)
+#-D            print the directories the server would access to stderr on startup
+#-t${TraceFile}        Send log messages to a file instead of syslog
+#-x${LogLevel} Verbosity level of logging (0 to 9)
+#-h${HomeDir}  Data directory for this Citadel installation. If the directory name begins with a forward slash, it is an absolute path; otherwise it is relative to the default. Watch the output of -D to observe the effects.
diff --git a/mail-mta/citadel/files/citadel.init b/mail-mta/citadel/files/citadel.init
new file mode 100644 (file)
index 0000000..29b0586
--- /dev/null
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+
+# original Author: Wilfried Goesgens <citadel@outgesourced.org>
+# adapted for Gentoo: the_mgt <themgt@mail.ru>
+
+depend() {
+        use dns logger
+       need net
+        provide mta
+}
+
+RUNDIR="/var/run/citadel"
+DAEMON="/usr/sbin/citserver"
+PIDFILE="${RUNDIR}/citadel.pid"
+SENDCOMMAND="/usr/sbin/sendcommand"
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+svc_start() {
+       ebegin "Starting citserver"
+       start-stop-daemon --start --exec /usr/sbin/citserver -- ${CITSERVER_OPTS}
+       eend $?
+}
+
+svc_stop() {
+       ebegin "Stopping citserver"
+       start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+       eend $?
+}
+
+restart() {
+       ebegin "Restarting citserver"
+       #sleep command mandatory due to long shutdown time!
+       svc_stop && sleep 3 && svc_start
+       eend $? "Failed to restart Citadel"
+}
diff --git a/mail-mta/citadel/files/mailer.conf b/mail-mta/citadel/files/mailer.conf
new file mode 100644 (file)
index 0000000..6f20e9b
--- /dev/null
@@ -0,0 +1,10 @@
+# Execute the "real" sendmail program from citadel, 
+# named /usr/sbin/citmail
+#
+sendmail       /usr/sbin/citmail
+
+#Citadel doesn't support these functions
+#send-mail     /usr/sbin/citmail
+#mailq         /usr/sbin/citmail
+#newaliases    /usr/sbin/citmail
+
diff --git a/mail-mta/citadel/metadata.xml b/mail-mta/citadel/metadata.xml
new file mode 100644 (file)
index 0000000..a6e68ef
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <herd>maintainer-wanted</herd>
+       <longdescription>Citadel comes with a long history, it started out as
+               BBS long ago and has evolved into a comfortable and easy to use
+               and install groupware/email/jabber server. It offers mailing
+               lists, a chatroom and general BBS/forumstyle communication.
+               There is a traditional command line interface (also needed for
+                some advanced configuration stuff) which gets installed with
+               this ebuild. For the full experience WebCit is offered.
+               (The Citadel server itself and WebCit can run on different
+               locations!)
+       </longdescription>
+       <use>
+               <flag name="pic">Build position-independent executables</flag>
+       </use>
+       <upstream>
+               <maintainer>
+                       <email>IGnatiusTFoobar@uncensored.citadel.org</email>
+                       <name>IGnatius T Foobar</name>
+               </maintainer>
+               <doc>http://www.citadel.org/doku.php/doku.php?id=documentation:start</doc>
+               <bugs-to>http://bugzilla.citadel.org/</bugs-to>
+       </upstream>
+</pkgmetadata>