summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Torres2016-02-18 21:13:31 +0100
committerJavier Torres2016-02-18 21:13:31 +0100
commit07e857cc45730859539d09de8987cce2bca2c026 (patch)
treee13aad90391fc70147d04f59ca9d140bc811c51e
downloadaur-07e857cc45730859539d09de8987cce2bca2c026.tar.gz
Initial release
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD48
-rw-r--r--guam.install20
3 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ae0829b0961
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+# Generated by mksrcinfo v8
+# Thu Feb 18 20:12:50 UTC 2016
+pkgbase = guam
+ pkgdesc = A smart, unjustly outcasted Reverse IMAP Proxy that lives at the perimeter of your IMAP environment.
+ pkgver = 0.7.1
+ pkgrel = 1
+ url = http://kolab.org
+ install = guam.install
+ arch = any
+ license = GPL3
+ depends = erlang
+ optdepends = pykolab: configuration tool
+ backup = etc/guam/sys.config
+ source = http://mirror.kolabsys.com/pub/releases/guam-0.7.1.tar.gz
+ sha256sums = bf1b74a1e203754d0476f959094fa71efd5c4253e2887a6c25bfd2094ee058c7
+
+pkgname = guam
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8aa431902f1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Javier Torres <javitonino [at] gmail [dot] com>
+
+pkgname=guam
+pkgver=0.7.1
+pkgrel=1
+pkgdesc='A smart, unjustly outcasted Reverse IMAP Proxy that lives at the perimeter of your IMAP environment.'
+arch=('any')
+license=('GPL3')
+depends=('erlang')
+optdepends=('pykolab: configuration tool')
+makedepends=()
+backup=("etc/${pkgname}/sys.config")
+url='http://kolab.org'
+install="guam.install"
+source=("http://mirror.kolabsys.com/pub/releases/${pkgname}-${pkgver}.tar.gz")
+
+sha256sums=('bf1b74a1e203754d0476f959094fa71efd5c4253e2887a6c25bfd2094ee058c7')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i "s|/usr/sbin/guam|/opt/kolab_guam/bin/kolab_guam|g" guam.service
+ make deps-up
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}/rel"
+ ../rebar generate
+
+ mkdir "${pkgdir}/opt/"
+ cp -r "kolab_guam" "${pkgdir}/opt/"
+
+ mkdir -p "${pkgdir}/etc/${pkgname}"
+ mv "${pkgdir}/opt/kolab_guam/releases/${pkgver}/sys.config" \
+ "${pkgdir}/etc/${pkgname}/sys.config"
+ ln -s "/etc/${pkgname}/sys.config" \
+ "${pkgdir}/opt/kolab_guam/releases/${pkgver}/sys.config"
+
+ mkdir -p "${pkgdir}/var/log/${pkgname}"
+ mv "${pkgdir}/opt/kolab_guam/log" "${pkgdir}/var/log/${pkgname}"
+ ln -s "/var/log/${pkgname}" "${pkgdir}/opt/kolab_guam/log"
+
+ install -Dm644 "${srcdir}/${pkgname}-${pkgver}/guam.service" "${pkgdir}/usr/lib/systemd/system/guam.service"
+}
diff --git a/guam.install b/guam.install
new file mode 100644
index 00000000000..d520416d365
--- /dev/null
+++ b/guam.install
@@ -0,0 +1,20 @@
+post_install() {
+ getent group guam >/dev/null 2>&1 || groupadd guam &>/dev/null
+ getent passwd guam >/dev/null 2>&1 || useradd -g guam -d /var/lib/guam -s /bin/false guam &>/dev/null
+ chmod -R a+r+w /var/log/guam
+
+ chown guam:guam /var/log/guam
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ if getent passwd guam >/dev/null 2>&1; then
+ userdel guam
+ fi
+ if getent group guam >/dev/null 2>&1; then
+ groupdel guam
+ fi
+}