about summary refs log tree commit diff
path: root/arch/PKGBUILD
blob: 02ff790fd729b498bbe89379b6247080d1110d63 (plain) (blame)
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
# Maintainer: Vincent Ambo <dev@tazj.in>
pkgname=tazblog
pkgver=4.2
pkgrel=1
pkgdesc="Tazjin's blog written in Haskell"
arch=('i686' 'x86_64')
url="http://tazj.in"
license=('MIT')
makedepends=('ghc' 'cabal-install')
source=('tazblog@.service')
sha1sums=('6aeb901a9d0e25763c9c99168a440dd5ac99ffc1')

build() {
  cd "$srcdir"
  test -e blog-src || ln -fs ../../ blog-src
  cd blog-src

  cabal sandbox init
  cabal update
  cabal install -j --only-dependencies
  cabal build
}

package() {
  cd "$srcdir"
  cd blog-src

  # Install blog itself
  install -d "${pkgdir}/usr/bin"
  install -m755 dist/build/tazblog/tazblog "${pkgdir}/usr/bin/tazblog"

  # Install resources
  install -d "${pkgdir}/usr/share/tazblog"
  cp -r res/ "${pkgdir}/usr/share/tazblog"

  # Install service file
  install -d "${pkgdir}/usr/lib/systemd/system"
  cp "arch/tazblog@.service" "${pkgdir}/usr/lib/systemd/system/"
}