updated on Tue Jan 17 20:03:13 UTC 2012
[aur-mirror.git] / nanoweb / PKGBUILD
blobf94483bd5daff8168795d41766aa1ca47561f2d4
1 # Contributor: Glenn Matthys <glenn@webmind.be>
2 pkgname=nanoweb
3 pkgdesc="Nanoweb is an HTTP server written in PHP, designed to be small, secure, and extensible"
4 pkgver=2.2.9
5 pkgrel=1
6 license="GPL"
7 arch=(
8         'i686'
9         'x86_64'
11 url="http://nanoweb.si.kz/"
12 source=(
13         ${url}/downloads/dist/${pkgname}_${pkgver}.tgz
14         conf.nanoweb
15         rc.nanoweb
17 md5sums=(
18         '3207919258d6a75b11214dc8eb747939'
19         '7ad058bc4b43e34c3beff9270a397bd9'
20         '4cc38c27ad962f69668aa9d2075c97bf'
22 depends=(php)
23 backup=(
24         etc/nanoweb/default.theme
25         etc/nanoweb/fancy.theme
26         etc/nanoweb/mime.types
27         etc/nanoweb/modules-win.conf
28         etc/nanoweb/modules.conf
29         etc/nanoweb/nanoweb-win.conf
30         etc/nanoweb/nanoweb.conf
31         etc/nanoweb/nanoweb.theme
32         etc/nanoweb/vhosts-win.conf
33         etc/nanoweb/vhosts.conf
36 build() {
37         mkdir -p $startdir/pkg/etc/nanoweb
38         mkdir -p $startdir/pkg/usr/lib/nanoweb/icons
39         mkdir -p $startdir/pkg/usr/lib/nanoweb/modules
40         mkdir -p $startdir/pkg/usr/share/doc/nanoweb
41         mkdir -p $startdir/pkg/usr/share/man
43         cd ${startdir}/src/${pkgname}_${pkgver}
45         cp              conf/*                  ${startdir}/pkg/etc/nanoweb/
46         cp              www/icons/*             ${startdir}/pkg/usr/lib/nanoweb/icons/
47         cp              modules/*.php   ${startdir}/pkg/usr/lib/nanoweb/modules/
48         cp      -R      docs/manual             ${startdir}/pkg/usr/share/doc/nanoweb/
49         cp              docs/README.*   ${startdir}/pkg/usr/share/doc/nanoweb/
50         cp      -R      docs/man/*              ${startdir}/pkg/usr/share/man/
52         install -D -m755 src/nanoctl            ${startdir}/pkg/usr/sbin/nanoctl
53         install -D -m755 src/nanoweb.php        ${startdir}/pkg/usr/sbin/nanoweb.php
54         install -D -m755 src/htpasswd.php       ${startdir}/pkg/usr/sbin/htpasswd.php
56         # initscripts
57         install -D -m644 ${startdir}/src/conf.nanoweb   ${startdir}/pkg/etc/conf.d/nanoweb
58         install -D -m755 ${startdir}/src/rc.nanoweb             ${startdir}/pkg/etc/rc.d/nanoweb
60         # Correct path to php
61         sed -i 's,#!/usr/local/bin/php,#!/usr/bin/php,g' $startdir/pkg/usr/sbin/nanoweb.php
62         sed -i 's,#!/usr/local/bin/php,#!/usr/bin/php,g' $startdir/pkg/usr/sbin/htpasswd.php