Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 205163 Details for
Bug 62119
mail-mta/citadel (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Citadel mail-mta 7.63 ebuild (cli client gets build, too)
citadel-7.63.ebuild (text/plain), 8.51 KB, created by
the_mgt
on 2009-09-24 22:11:02 UTC
(
hide
)
Description:
Citadel mail-mta 7.63 ebuild (cli client gets build, too)
Filename:
MIME Type:
Creator:
the_mgt
Created:
2009-09-24 22:11:02 UTC
Size:
8.51 KB
patch
obsolete
># Copyright 1999-2009 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > ># This ebuild was taken from http://bugs.gentoo.org/show_bug.cgi?id=62119 ># I thank all those bug posters and the helpful guys at #citadel on freenode ># This ebuild was modified/written by themgt@mail.ru > >### TODO: ># handle the cli flag, so it is possible to have ># a) server and client in one package, using this ebuild ># b) server without client, using this ebuild ># c) client only, using another ebuild (citadel-client...ebuild) > ># handle check if other mtas are installed!!! > ># fix: citadel: Invalid node name <.keep_mail-mta_citadel-0> ># in /var/lib/citadel/data > ># prepare stuff for gentoo/BSD? ># laaaaaaaaaaaaater > >#not tested yet: ># ldap, dspam, noiconv ># builds fine with ldap, but no further checks up until now ># dropped dspam useflag, upstream did not yet finish it > >EAPI=0 >inherit eutils mailer > >DESCRIPTION="Package installs citadel server and text-client" >HOMEPAGE="http://www.citadel.org/" >SRC_URI="http://easyinstall.citadel.org/${P}.tar.gz" >RESTRICT="primaryuri" > >LICENSE="GPL-3" >SLOT="0" > >KEYWORDS="~x86 ~amd64" >IUSE="ldap noiconv pam pic ssl threads zlib" > >#from the packages configure --help: >#features >#USED --disable-iconv do not use iconv charset conversion >#USED --disable-threaded-client ># disable multithreaded client >#USED --enable-pie build position-independent executables > >#programs >#USED --with-pam use PAM if present (see PAM.txt before you try this) ># --with-kthread use kernel threads (on FreeBSD) (not recommended yet) >#yes --with-db[=DIR] use Berkeley DB 3.x [DIR=/usr/local/BerkeleyDB.3.[123$ >#USED --with-ssl=PATH Specify path to OpenSSL installation ># --without-ncurses don't use ncurses >#USED --with-zlib use zlib compression if present >#USED --with-ldap use OpenLDAP client library ># --with-libdspam use libdspam mail spam scanning library <- UNFINISHED UPSTREAM ># --with-backtrace enable backtrace dumps in the syslog ># --with-gprof enable profiling ># --with-threadlog enable logging of thread table > >DEPEND="=dev-libs/libcitadel-${PV} \ > >=sys-libs/db-4.1.25_p1 \ > ldap? ( >=net-nds/openldap-2.0.27 ) \ > !noiconv? ( virtual/libiconv ) \ > pam? ( sys-libs/pam ) \ > ssl? ( >=dev-libs/openssl-0.9.6 ) \ > zlib? ( >=sys-libs/zlib-1.1.4 )" > >RDEPEND="${DEPEND}" > ># variables specific for the ebuild: >MESSAGEBASE="/var/lib/citadel" >MY_OPTS="" > >pkg_setup() { > #Create the user/group that the sever will run as. > #Homedir needs to be the same as --with-datadir > einfo "Adding Citadel User/Group" > enewgroup citadel 175 > enewuser citadel 175 /dev/null ${MESSAGEBASE} citadel >} > >src_compile() { > #fixes a QA issue, will be fixed upstream in further releases! > cat ipc_c_tcp.c |awk '{print $0}; /#include \"citadel_decls.h\"/ {print "#include \"commands.h\""}' > seeamphore.temp > cp seeamphore.temp ipc_c_tcp.c > > > #dspam support unfinished upstream! > #if use dspam ; then > MY_OPTS="${MY_OPTS} --without-libdspam" > #fi > > if use pic ; then > MY_OPTS="${MY_OPTS} --enable-pie" > fi > > if use noiconv ; then > MY_OPTS="${MY_OPTS} --disable-iconv" > fi > > # prefixes taken from citadel svn checkout debian/rules file, > # slightly gentooyfied > econf ${MY_OPTS}\ > --with-datadir=/var/lib/citadel \ > --with-helpdir=/etc/citadel \ > --with-spooldir=/var/spool/citadel \ > --with-staticdatadir=/etc/citadel \ > --with-sysconfdir=/etc/citadel \ > --with-rundir=/var/run/citadel \ > --with-docdir=/usr/share/doc/${PF} \ > --with-ssldir=/etc/ssl/citadel \ > --with-utility-bindir=/usr/lib/citadel \ > --with-autosysconfdir=/var/lib/citadel/data \ > $(use_with pam) \ > $(use_with ssl openssl) \ > $(use_with zlib) \ > $(use_with ldap) \ > --with-db || die "econf failed" > > emake || die "emake failed" >} > >src_install() { > if use pam ; then > dodir /etc/pam.d > fi > > emake DESTDIR="${D}" install-new || die "make install failed" > > # Protect ${MESSAGEBASE} > echo CONFIG_PROTECT="${MESSAGEBASE}" > "${T}"/10citadel > doenvd "${T}"/10citadel > > # 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 > > # Remove the client files > # Emerge net-mail/citadel-client to get them back > # rm ${D}/usr/bin/citadel > # rm ${D}/etc/citadel/citadel.rc > > #Fix some permissions > fowners citadel:citadel /etc/citadel /var/lib/citadel > > #Work around some sendmail problems > rm "${D}"/usr/sbin/sendmail > fowners root:citadel /usr/sbin/citmail > fperms 4755 /usr/sbin/citmail > > if use mailwrapper ; then > mailer_install_conf > else > dodir /usr/lib > dosym /usr/sbin/citmail /usr/lib/sendmail > dosym /usr/sbin/citmail /usr/sbin/sendmail > fi > > if use ldap ; then > insinto /etc/openldap/schema > doins openldap/citadel.schema > doins openldap/rfc2739.schema > fi > > newinitd "${FILESDIR}"/citadel.init citadel > newconfd "${FILESDIR}"/citadel.confd citadel > > prepall > prepalldocs >} > >pkg_postinst() { > einfo > einfo "The administration tools have been placed in /usr/lib/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 following clients are available:" > einfo "a) the citadel console client was installed with this ebuild" > einfo "b) www-apps/webcit provides a web-based gui" >} > >#Still incomplete, needs love, but I have no time. --the_mgt >pkg_config() { > #we have to stop the server if it is accidently running > /etc/init.d/citadel stop > > #Citadel's setup uses a few enviromental variables to control it. > #Read techdoc/package-setup.txt for information > # > # this is mandatory! > export CITADEL_INSTALLER="yes" > > # Citadel location. > export CITADEL="/var/run/citadel/" > > #Is citadel the MTA? > if use mailwrapper ; then > export ACT_AS_MTA="no" > else > export ACT_AS_MTA="yes" > fi > > if use ldap ; then > export SLAPD_Binary="/usr/lib/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" > > 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" > > pwd1="misch" > 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/lib/citadel/setup -q > export SYSADMIN_PW="mischmasch" > > #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 > > # setup creates the wrong path for citserver. > # We'll create the /etc/inittab entry here > # if [ -f /etc/inittab ] ; then > # grep -v 'citserver' /etc/inittab >/etc/inittab.new && \ > # echo "cit1:2345:respawn:/usr/sbin/citserver -x5 -lmail" >> /etc/inittab.new && \ > # mv -f /etc/inittab.new /etc/inittab > # /sbin/init q > # fi > > einfo > 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" > einfo >} > >#This inittab approach hurts! >#pkg_prerm() { ># if [ -f /etc/inittab ] ; then ># grep -v 'citserver' < /etc/inittab > /etc/inittab.new && \ ># mv -f /etc/inittab.new /etc/inittab ># /sbin/init q ># fi >#}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 62119
:
38443
|
76136
|
80177
|
80178
|
80179
|
85515
|
85516
|
93249
|
93250
|
93251
|
205163
|
205165
|
205167
|
206038
|
261060