summaryrefslogtreecommitdiff
path: root/community-testing/yaws/PKGBUILD
blob: 3652a9c06c097056968e33b5f2c7f69728bfc1d8 (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
# $Id: PKGBUILD 69122 2012-04-09 13:51:14Z tdziedzic $
# Maintainer: Vesa Kaihlavirta
# Contributor: Alexander Rødseth <rodseth@gmail.com>

pkgname=yaws
pkgver=1.92
pkgrel=2
pkgdesc='Yet Another Web Server -- The 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")
sha256sums=('cde83ca55d8e1b10a89094e1cfdc3e78d91ba9b1036cb5ea4e1994f5922c2357')

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"
}

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