diff options
author | Maxim Andersson | 2015-06-08 16:08:59 +0200 |
---|---|---|
committer | Maxim Andersson | 2015-06-08 16:08:59 +0200 |
commit | 85832e21a8c30c58815ef106a35cee0b2349dc47 (patch) | |
tree | 893b96b3ec5034294d7b2577f842e152485e7dc7 | |
download | aur-85832e21a8c30c58815ef106a35cee0b2349dc47.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | mailpile.install | 40 | ||||
-rw-r--r-- | mailpile.service | 14 |
4 files changed, 129 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..abdb7d825a2e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = mailpile + pkgdesc = A modern, fast web-mail client with user-friendly encryption and privacy features. + pkgver = 0.4.3 + pkgrel = 1 + url = http://www.mailpile.is + install = mailpile.install + arch = any + license = AGPL3 + license = Apache + depends = gnupg + depends = python2-jinja>=2.6 + depends = python2-lxml>=2.3.2 + depends = python2-markupsafe + depends = python2-pgpdump + depends = python2-pillow + depends = python2-pydns + depends = spambayes>=1.1a6 + source = https://github.com/pagekite/mailpile/archive/0.4.3.tar.gz + source = mailpile.service + sha256sums = 3253d4896cc34de6208a750dbecab895561e0ebf44eead28ea4572bf01f71c0d + sha256sums = 07adbd61cda225bf11818d39776240ee1077a3f2ddc9e5ef0f11825dd4ca504d + +pkgname = mailpile + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..137449793cb0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Maxim Andersson <thesilentboatman@gmail.com> +# Based on the mailpile-git PKGBUILD +# Contributor: cornholio <vigo.the.unholy.carpathian@gmail.com> + +pkgname=mailpile +pkgver=0.4.3 +pkgrel=1 +pkgdesc="A modern, fast web-mail client with user-friendly encryption and privacy features." +arch=('any') +url="http://www.mailpile.is" +license=('AGPL3' 'Apache') +depends=('gnupg' 'python2-jinja>=2.6' 'python2-lxml>=2.3.2' 'python2-markupsafe' 'python2-pgpdump' 'python2-pillow' 'python2-pydns' 'spambayes>=1.1a6') +install=${pkgname}.install +source=("https://github.com/pagekite/${pkgname}/archive/${pkgver}.tar.gz" + "${pkgname}.service") +sha256sums=('3253d4896cc34de6208a750dbecab895561e0ebf44eead28ea4572bf01f71c0d' + '07adbd61cda225bf11818d39776240ee1077a3f2ddc9e5ef0f11825dd4ca504d') + +prepare() { + cd "${srcdir}/Mailpile-${pkgver}" + + # Set absolute paths for static files + sed -i "s^('static/^('/usr/share/mailpile/static/^g" mailpile/config.py + sed -i '/os.path.dirname( # scripts/d' mp + sed -i 's^__file__))^"/usr/share/mailpile/mailpile")^g' mp +} + +build() { + cd "${srcdir}/Mailpile-${pkgver}" + + # Compile bytecode + python2 -m compileall -f mailpile +} + +package() { + cd "${srcdir}/Mailpile-${pkgver}" + + install -d "${pkgdir}/usr/share/${pkgname}" + + cp -r static "${pkgdir}/usr/share/${pkgname}/" + cp -r mailpile "${pkgdir}/usr/share/${pkgname}/" + cp -r locale "${pkgdir}/usr/share/${pkgname}/" + + find "${pkgdir}/usr/share/${pkgname}" -type f -exec chmod 644 '{}' ';' + find "${pkgdir}/usr/share/${pkgname}" -type d -exec chmod 755 '{}' ';' + + install -D mp -t "${pkgdir}/usr/bin" + install -Dm644 "../${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system" +} + +# vim:set ts=2 sw=2 et: diff --git a/mailpile.install b/mailpile.install new file mode 100644 index 000000000000..5922e1a73e18 --- /dev/null +++ b/mailpile.install @@ -0,0 +1,40 @@ +post_install() { + post_upgrade $1 + + echo "" + echo "==> Note: Mailpile is still in development and not" + echo "==> suitable for production or end-user use." + echo "" + echo "==> Get more info at:" + echo "==> https://github.com/pagekite/Mailpile/wiki/Getting-started" + echo "" +} + +# arg 2: the old package version +post_upgrade() { + if ! getent group mailpile >/dev/null; then + groupadd --system mailpile + fi + + if ! getent passwd mailpile >/dev/null; then + useradd --system -c 'mailpile daemon user' -g mailpile -b /var/lib -m -s /bin/bash mailpile >/dev/null 2>&1 + fi + + if test $2 && test "`vercmp $2 0.4.1-1`" -lt 0; then + echo '==> Mailpile home directory has moved to /var/lib/mailpile' + fi +} + +post_remove() { + systemctl stop mailpile >/dev/null 2>&1 + + if getent passwd mailpile >/dev/null; then + userdel mailpile >/dev/null 2>&1 + fi + + if getent group mailpile >/dev/null; then + groupdel mailpile >/dev/null 2>&1 + fi + + echo "==> Note: /var/lib/mailpile may still contain data" +} diff --git a/mailpile.service b/mailpile.service new file mode 100644 index 000000000000..51a110552a74 --- /dev/null +++ b/mailpile.service @@ -0,0 +1,14 @@ +[Unit] +Description=Mailpile Daemon +Requires=network.target +After=network.target + +[Service] +User=mailpile +PIDFile=/run/mailpile.pid +PrivateTmp=true +Environment=MAILPILE_HOME=/var/lib/mailpile +ExecStart=/usr/bin/mp --www= --wait + +[Install] +WantedBy=multi-user.target |