summaryrefslogtreecommitdiff
path: root/community/yaws/PKGBUILD
blob: 3a5de89faee403eb75d682af0cf6e7a3ecba0911 (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
# $Id: PKGBUILD 80743 2012-12-01 19:51:02Z arodseth $
# Maintainer: Vesa Kaihlavirta
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Patrick Smits <mail@patricksmits.net>

pkgname=yaws
pkgver=1.95
pkgrel=3
pkgdesc='Yet Another Web Server, pure Erlang HTTP server/framework'
arch=('x86_64' 'i686')
url='http://yaws.hyber.org/'
license=('BSD')
depends=('pam' 'erlang')
backup=('etc/yaws/yaws.conf')
options=('!emptydirs')
install=$pkgname.install
source=("http://yaws.hyber.org/download/$pkgname-$pkgver.tar.gz"
        "$pkgname.service")
sha256sums=('e4efae836561f5e8a1324a5c9ab63fb82468e9dc93dc95cb4cb6248ab6b95406'
            'cce672e0bc73f536186bdbb8ac139d8000db4bd67f5fdeff84fdc4b4f8bd84f9')

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  for file in www/cgi.yaws www/cgi-bin/foo.py; do
    # python2 fix
	  sed -i '0,/on/s//on2/' "$file"
  done
  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
  install -d "$pkgdir/usr/lib/erlang/lib"
  ln -s /usr/lib/yaws "$pkgdir/usr/lib/erlang/lib/$pkgname-$pkgver"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 "$srcdir/$pkgname.service" \
    "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}

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