You are not logged in.

#1 2005-02-09 04:27:53

k-dub
Member
Registered: 2004-11-12
Posts: 49

lighttpd

I just put together a build of lighttpd. Feel free to try it out and see what you think.

The rc.d file:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/sbin/lighttpd`
case "$1" in
  start)
    stat_busy "Starting Lighttpd Server"
    [ -z "$PID" ] && /usr/sbin/lighttpd -f /etc/lighttpd.conf 2>&1
    if [ $? -gt 0 ]; then
      stat_fail
    else
      echo $PID > /var/run/lighttpd.pid
      add_daemon lighttpd
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping Lighttpd Server"
    [ ! -z "$PID" ]  && kill $PID &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon lighttpd
      stat_done
    fi
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac
exit 0

And the PKGBUILD:

pkgname=lighttpd
pkgver=1.3.10
pkgrel=1
pkgdesc="lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance environments."
url="http://www.lighttpd.net/"
license="BSD"
depends=('pcre')
makedepends=('openssl' 'mysql' 'openldap')
conflicts=()
replaces=()
backup=(etc/lighttpd.conf)
install=
source=(http://www.lighttpd.net/download/$pkgname-$pkgver.tar.gz)
md5sums=('28623eff50653a9b104ddb20fe65aaf1')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr --with-mysql --with-openssl --with-ldap
  make || return 1
  make DESTDIR=$startdir/pkg install

  install -d $startdir/pkg/www/pages
  install -d $startdir/pkg/www/logs
  install -d $startdir/pkg/etc/rc.d
  install -m644 doc/lighttpd.conf $startdir/pkg/etc
  install -m755 ../../lighttpd.rc $startdir/pkg/etc/rc.d/lighttpd
  docdir=$startdir/pkg/usr/local/$pkgname/
  install -m755 -d $docdir
  install -m644 doc/*.txt $docdir
  install -m644 doc/*.dot $docdir
  install -m644 doc/*.conf $docdir
  install -m644 doc/*.user $docdir
  install -m644 doc/rc.* $docdir
  install -m755 doc/*.sh $docdir
}

Enjoy!

Offline

#2 2005-02-12 11:24:31

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: lighttpd

You should add the rc.d file to the source array, possibly as a lighttpd file. Seems okay otherwise, just having fun with it :-)

Offline

#3 2005-02-13 15:50:54

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: lighttpd

nice!
this is thttpd with PHP/SSL but not the hassle of apache!

I wish this package to go to extra

Offline

Board footer

Powered by FluxBB