From 29f5aa692a3fa3ff3e743a47d1c57f1cc0341809 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 1 Jan 2012 23:14:56 +0000 Subject: Sun Jan 1 23:14:56 UTC 2012 --- staging/db/PKGBUILD | 32 ++++++++++++++++++++++ staging/db/db.install | 5 ++++ staging/postfix/PKGBUILD | 64 +++++++++++++++++++++++++++++++++++++++++++ staging/postfix/aliases.patch | 18 ++++++++++++ staging/postfix/install | 34 +++++++++++++++++++++++ staging/postfix/rc.d | 36 ++++++++++++++++++++++++ 6 files changed, 189 insertions(+) create mode 100644 staging/db/PKGBUILD create mode 100644 staging/db/db.install create mode 100644 staging/postfix/PKGBUILD create mode 100644 staging/postfix/aliases.patch create mode 100644 staging/postfix/install create mode 100755 staging/postfix/rc.d (limited to 'staging') diff --git a/staging/db/PKGBUILD b/staging/db/PKGBUILD new file mode 100644 index 000000000..bfa1e8405 --- /dev/null +++ b/staging/db/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 145784 2011-12-31 17:44:46Z stephane $ +# Maintainer: Stéphane Gaudreault +# Contributor: Allan McRae +# Contributor: Andreas Radke + +pkgname=db +pkgver=5.3.15 +pkgrel=1 +pkgdesc="The Berkeley DB embedded database system" +arch=('i686' 'x86_64') +url="http://www.oracle.com/technology/software/products/berkeley-db/index.html" +license=('custom') +depends=('gcc-libs' 'sh') +options=('!libtool') +install=db.install +source=(http://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz) +sha1sums=('7683b632a01ff3543c379a120809a942ec457738') + +build() { + cd "${srcdir}/$pkgname-${pkgver}/build_unix" + ../dist/configure --prefix=/usr --enable-compat185 \ + --enable-shared --enable-static --enable-cxx --enable-dbm + make LIBSO_LIBS=-lpthread +} + +package() { + cd "${srcdir}/$pkgname-${pkgver}/build_unix" + make DESTDIR="${pkgdir}" install + rm -r "${pkgdir}"/usr/docs + install -Dm644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE \ + "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE +} diff --git a/staging/db/db.install b/staging/db/db.install new file mode 100644 index 000000000..03b64042d --- /dev/null +++ b/staging/db/db.install @@ -0,0 +1,5 @@ +post_upgrade() { + if [ "$(vercmp $2 5.1)" -lt 0 ]; then + echo " >> Major version update. Consider running db_upgrade on Berkeley DB databases." + fi +} diff --git a/staging/postfix/PKGBUILD b/staging/postfix/PKGBUILD new file mode 100644 index 000000000..544a08df3 --- /dev/null +++ b/staging/postfix/PKGBUILD @@ -0,0 +1,64 @@ +# $Id: PKGBUILD 145787 2012-01-01 01:35:49Z bisson $ +# Contributor: Jeff Brodnax +# Contributor: Paul Mattal +# Maintainer: Gaetan Bisson + +pkgname=postfix +pkgver=2.8.7 +pkgrel=2 +pkgdesc='Fast, easy to administer, secure mail server' +url='http://www.postfix.org/' +license=('custom') +arch=('i686' 'x86_64') +depends=('pcre' 'libsasl' 'libmysqlclient' 'postgresql-libs' 'sqlite3' 'libldap' 'db') +backup=('etc/postfix/'{access,aliases,canonical,generic,header_checks,main.cf,master.cf,relocated,transport,virtual}) +source=("ftp://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${pkgver}.tar.gz" \ + 'aliases.patch' \ + 'rc.d') +sha1sums=('81c87aceff4d9af67a304354bab9c99ac98fc8a0' + '5fc3de6c7df1e5851a0a379e825148868808318b' + '40c6be2eb55e6437a402f43775cdb3d22ea87a66') + +provides=('smtp-server' 'smtp-forwarder') +replaces=('postfix-mysql' 'postfix-pgsql') +conflicts=('postfix-mysql' 'postfix-pgsql' 'smtp-server' 'smtp-forwarder') + +install=install + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make makefiles DEBUG='' CCARGS=' \ + -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl \ + -DHAS_LDAP \ + -DUSE_TLS \ + -DHAS_MYSQL -I/usr/include/mysql \ + -DHAS_PGSQL -I/usr/include/postgresql \ + -DHAS_SQLITE \ + ' AUXLIBS=' \ + -lsasl2 \ + -lldap -llber \ + -lssl -lcrypto \ + -lmysqlclient -lz -lm \ + -lpq \ + -lsqlite3 -lpthread \ + ' OPT="${CFLAGS} ${LDFLAGS}" + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + sh postfix-install -non-interactive \ + install_root="${pkgdir}" \ + daemon_directory="/usr/lib/${pkgname}" \ + sample_directory="/etc/${pkgname}/sample" \ + manpage_directory="/usr/share/man" + + install -D -m755 ../rc.d "${pkgdir}/etc/rc.d/${pkgname}" + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + cd "${pkgdir}" + patch -p0 -i "${srcdir}"/aliases.patch +} diff --git a/staging/postfix/aliases.patch b/staging/postfix/aliases.patch new file mode 100644 index 000000000..6767870b7 --- /dev/null +++ b/staging/postfix/aliases.patch @@ -0,0 +1,18 @@ +--- etc/postfix/main.cf.orig 2010-12-13 20:18:22.000000000 +0100 ++++ etc/postfix/main.cf 2010-12-13 20:18:24.000000000 +0100 +@@ -382,6 +382,7 @@ + #alias_maps = hash:/etc/aliases + #alias_maps = hash:/etc/aliases, nis:mail.aliases + #alias_maps = netinfo:/aliases ++alias_maps = hash:/etc/postfix/aliases + + # The alias_database parameter specifies the alias database(s) that + # are built with "newaliases" or "sendmail -bi". This is a separate +@@ -392,6 +393,7 @@ + #alias_database = dbm:/etc/mail/aliases + #alias_database = hash:/etc/aliases + #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases ++alias_database = $alias_maps + + # ADDRESS EXTENSIONS (e.g., user+foo) + # diff --git a/staging/postfix/install b/staging/postfix/install new file mode 100644 index 000000000..c276e0919 --- /dev/null +++ b/staging/postfix/install @@ -0,0 +1,34 @@ +post_install() { + getent group postdrop &>/dev/null || groupadd -g 75 postdrop >/dev/null + getent group postfix &>/dev/null || groupadd -g 73 postfix >/dev/null + getent passwd postfix &>/dev/null || useradd -u 73 -d /var/spool/postfix -g postfix -s /bin/false postfix >/dev/null + + cd var/spool/postfix + chown postfix active bounce corrupt defer deferred flush hold incoming private public maildrop trace saved + chgrp postdrop public maildrop + cd ../../../usr/sbin + chgrp postdrop postqueue postdrop + chmod g+s postqueue postdrop + cd ../.. + chown postfix var/lib/postfix + + newaliases +} + +post_upgrade() { + post_install + + if [ `vercmp $2 2.8.3` = -1 ]; then cat < You must now execute "/etc/rc.d/postfix reload" (or restart). +==> This is needed because of an inter-daemon protocol change. + +EOF + fi +} + +pre_remove() { + getent passwd postfix &>/dev/null && userdel postfix >/dev/null + getent group postfix &>/dev/null && groupdel postfix >/dev/null + getent group postdrop &>/dev/null && groupdel postdrop >/dev/null +} diff --git a/staging/postfix/rc.d b/staging/postfix/rc.d new file mode 100755 index 000000000..fa314bb84 --- /dev/null +++ b/staging/postfix/rc.d @@ -0,0 +1,36 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +name=postfix + +case "$1" in +start) + stat_busy "Starting $name daemon" + /usr/sbin/postfix start &>/dev/null \ + && { add_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; +stop) + stat_busy "Stopping $name daemon" + /usr/sbin/postfix stop &>/dev/null \ + && { rm_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; +reload) + stat_busy "Reloading $name daemon" + /usr/sbin/postfix reload &>/dev/null \ + && { stat_done; } \ + || { stat_fail; exit 1; } + ;; +restart) + $0 stop + sleep 1 + $0 start + ;; +*) + echo "usage: $0 {start|stop|restart|reload}" + ;; +esac +exit 0 -- cgit v1.2.3-54-g00ecf