summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c2e3881a1f963dc7952d76ccf075016a96d92f7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Maintainer: Frank Fishburn <frankthefishburn@gmail.com>
# Contributor: Maxim Andersson <thesilentboatman@gmail.com>

pkgname=mailpile-git
pkgver=r5570.37d96ac6
pkgrel=1
pkgdesc="A modern, fast web-mail client with user-friendly encryption and privacy features."
arch=('any')
license=('AGPL3')
depends=('python2-pillow' 'python2-lxml' 'python2-jinja' 'spambayes' 'python2-pgpdump' 'python2-crypto')
url="http://www.mailpile.is"
provides=("mailpile")
conflicts=("mailpile")
install=mailpile.install
source=('git://github.com/pagekite/Mailpile.git' 'fix-rootdir.patch' 'mailpile.service')
md5sums=('SKIP' '777cd528c847876b6f720af8f21951db' '5109bf42611bb0e9f1ce7caa5a00a6e7')

pkgver() {
  cd "${srcdir}/Mailpile"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {

  # Fix path
  patch -p1 < fix-rootdir.patch
  cd "${srcdir}/Mailpile"

  # python2 fixes
  find . -type f -exec sed -i 's^bin/python^bin/python2^g' {} \;
  sed -i 's^python ^python2 ^g' Makefile

}

build() {

  cd "${srcdir}/Mailpile"

  # Compile bytecode
  python2 -m compileall -f mailpile

}

package() {

  cd "${srcdir}/Mailpile"

  install -d "${pkgdir}/usr/share"

  cp -r shared-data "${pkgdir}/usr/share/mailpile"
  cp -r mailpile "${pkgdir}/usr/share/mailpile/"

  find "${pkgdir}/usr/share/mailpile" -type f -exec chmod 644 '{}' ';'
  find "${pkgdir}/usr/share/mailpile" -type d -exec chmod 755 '{}' ';'

  install -D mp -t "${pkgdir}/usr/bin"
  install -Dm644 "../mailpile.service" -t "${pkgdir}/usr/lib/systemd/system"

}

# vim:set ts=2 sw=2 et: