summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiroshi Hatake2015-11-15 14:41:44 +0900
committerHiroshi Hatake2015-11-15 14:41:44 +0900
commite74c9d8dfa917f38b6565588954583b9e5af9744 (patch)
tree59839e800cb854229014567d984049ad33965b06
downloadaur-e74c9d8dfa917f38b6565588954583b9e5af9744.tar.gz
Initial import
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD49
-rw-r--r--milter-manager.install27
-rw-r--r--milter-manager.service12
4 files changed, 126 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..65972716cb1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,38 @@
+pkgbase = milter-manager-git
+ pkgdesc = A milter to use milters effectively.
+ pkgver = 20151113.5989.9e358d6
+ pkgrel = 1
+ url = http://milter-manager.sourceforge.net/
+ arch = x86
+ arch = x86_64
+ license = GPL3
+ license = GFDL
+ license = LGPL3
+ makedepends = git
+ makedepends = ruby-glib2
+ makedepends = rrdtool
+ makedepends = glib2
+ makedepends = autoconf
+ makedepends = automake
+ makedepends = libtool
+ makedepends = pkg-config
+ makedepends = intltool
+ makedepends = gtk-doc
+ makedepends = gnome-doc-utils
+ makedepends = inkscape
+ makedepends = ruby
+ makedepends = libevent
+ depends = sh
+ optdepends = cutter-test_framework
+ optdepends = ruby-rdtool
+ optdepends = lcov
+ provides = libev
+ conflicts = libev
+ source = milter-manager-git::git://github.com/milter-manager/milter-manager.git
+ source = milter-manager.service
+ sha1sums = SKIP
+ sha1sums = SKIP
+
+pkgname = milter-manager-git
+ install = milter-manager.install
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a873a43364c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+pkgname=milter-manager-git
+pkgver=20151113.5989.9e358d6
+pkgrel=1
+pkgdesc="A milter to use milters effectively."
+arch=('x86' 'x86_64')
+url="http://milter-manager.sourceforge.net/"
+license=('GPL3' 'GFDL' 'LGPL3')
+depends=('sh')
+makedepends=('git' 'ruby-glib2' 'rrdtool' 'glib2'
+ 'autoconf' 'automake' 'libtool' 'pkg-config' 'intltool'
+ 'gtk-doc' 'gnome-doc-utils' 'inkscape' 'ruby' 'libevent')
+optdepends=('cutter-test_framework' 'ruby-rdtool' 'lcov')
+provides=('libev')
+conflicts=('libev')
+
+source=("$pkgname"::"git://github.com/milter-manager/milter-manager.git"
+ milter-manager.service)
+sha1sums=('SKIP'
+ 'SKIP')
+
+pkgver () {
+ _date=`date +"%Y%m%d"`
+ cd "${srcdir}/${pkgname}"
+ echo "$_date.$(git rev-list --count master).$(git rev-parse --short master)"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --sbindir=/usr/bin \
+ --enable-ruby-milter
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ install=milter-manager.install
+ make DESTDIR="$pkgdir/" install
+
+ # remove conflicting file
+ rm -f "$pkgdir"/usr/include/event.h
+
+ install -Dm644 ../milter-manager.service "$pkgdir"/usr/lib/systemd/system/milter-manager.service
+}
diff --git a/milter-manager.install b/milter-manager.install
new file mode 100644
index 00000000000..76765a569f5
--- /dev/null
+++ b/milter-manager.install
@@ -0,0 +1,27 @@
+pre_install() {
+ if ! /usr/bin/getent group milter-manager &>/dev/null; then
+ /usr/sbin/groupadd -r milter-manager || \
+ echo "Unexpected error adding group \"milter-manager\". Aborting installation."
+ fi
+ if ! /usr/bin/id milter-manager &>/dev/null; then
+ /usr/sbin/useradd -r -s /sbin/nologin -c 'milter manager' \
+ -d /var/lib/milter-manager --create-home \
+ -g milter-manager milter-manager || \
+ echo "Unexpected error adding user \"milter-manager\". Aborting installation."
+ fi
+}
+
+post_install() {
+ /usr/bin/mkdir -p /var/run/milter-manager
+ /usr/bin/chown -R milter-manager:milter-manager /var/run/milter-manager
+}
+
+post_remove(){
+ if getent passwd milter-manager >/dev/null 2>&1; then
+ userdel milter-manager
+ fi
+
+ if getent group milter-manager >/dev/null 2>&1; then
+ groupdel milter-manager
+ fi
+} \ No newline at end of file
diff --git a/milter-manager.service b/milter-manager.service
new file mode 100644
index 00000000000..93756f49c9d
--- /dev/null
+++ b/milter-manager.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=milter-manager server daemon
+After=syslog.target network.target auditd.service
+
+[Service]
+User=milter-manager
+Group=milter-manager
+ExecStart=/usr/bin/milter-manager $OPTIONS --pid-file "/var/run/milter-manager/milter-manager.pid" --unix-socket-group "mail"
+ExecReload=/usr/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file