summaryrefslogtreecommitdiff
path: root/community/yaws/PKGBUILD
blob: 3474a3ae8c06a0206c3c859d4313d40102a6ab75 (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
# $Id: PKGBUILD 26124 2010-09-13 17:23:11Z schuay $
# Maintainer:

pkgname=yaws
pkgver=1.88
pkgrel=3
pkgdesc='Yet Another Web Server -- The pure Erlang HTTP server/framework'
arch=('i686' 'x86_64' 'mips64el')
url='http://yaws.hyber.org'
license=('BSD')
depends=('pam' 'erlang')
backup=('etc/yaws/yaws.conf')
source=("http://yaws.hyber.org/download/${pkgname}-${pkgver}.tar.gz")
md5sums=('950f8199592c6490556632e20e59a353')

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

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var

  # python2 fix
  for file in www/cgi.yaws www/cgi-bin/foo.py; do
      sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' $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 -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}