SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "cherokee"

# SliTaz package receipt.

PACKAGE="cherokee"
VERSION="1.2.104"
CATEGORY="network"
SHORT_DESC="A very fast, fiexible and easy to configure Web Server."
MAINTAINER="slaxemulator@gmail.com"
LICENSE="GPL2"
WEB_SITE="https://cherokee-project.com/"

TARBALL="$PACKAGE-$VERSION.zip"
WGET_URL="https://github.com/shannara/cherokee-webserver/archive/master.zip"

PROVIDE="lighttpd"
DEPENDS="cyrus-sasl ffmpeg libldap libmysqlclient openssl pcre python"
BUILD_DEPENDS="autoconf automake cyrus-sasl-dev ffmpeg-dev gettext 
    libmysqlclient libtool openssl-dev openldap-dev pam-dev pcre-dev 
    python-dev"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    # Update deprecated symbols of ffmpeg
    sed -i 's|hdl->avformat->file_size|avio_size(hdl->avformat)|' \
        cherokee/handler_streaming.c

    # Use subdirectory for logs
    sed -i -r 's|(%localstatedir%/log)|\1/cherokee|' \
        cherokee.conf.sample.pre

    # Avoid automake 1.16.5 'error: AM_INIT_AUTOMAKE expanded multiple times'
    sed -i 's|^AM_INIT_AUTOMAKE$|dnl &|' configure.ac

    ./autogen.sh                    \
        --prefix=/usr                \
        --sysconfdir=/etc            \
        --localstatedir=/var            \
        --with-wwwroot=/var/www/cherokee    \
        --disable-static            \
        --with-wwwuser=www            \
        --with-wwwgroup=www            \
        --enable-os-string="SliTaz"        \
        $CONFIGURE_ARGS &&
    make &&
    make DESTDIR=$DESTDIR install &&
    {
        install -D -m644 pam.d_cherokee    $DESTDIR/etc/pam.d/$PACKAGE
        chown -R www:www        $DESTDIR/var/lib/$PACKAGE/graphs
        python -m compileall $DESTDIR
        python -O -m compileall $DESTDIR

        mkdir -p $DESTDIR/var/log/$PACKAGE
        mkdir -p $DESTDIR/etc/logrotate.d
        chown -R www:www        $DESTDIR/var/log/$PACKAGE
        cp -a $stuff/$PACKAGE.logrotate    $DESTDIR/etc/logrotate.d/$PACKAGE
    }
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/lib/cherokee
    mkdir -p $fs/usr/share
    mkdir -p $fs/etc/init.d

    cp -a $install/usr/bin            $fs/usr
    cp -a $install/usr/sbin            $fs/usr
    cp -a $install/usr/lib/*.so*        $fs/usr/lib
    cp -a $install/usr/lib/cherokee/*.so*    $fs/usr/lib/cherokee
    cp -a $install/usr/share/cherokee    $fs/usr/share
    cp -a $install/var            $fs
    cp -a $install/etc            $fs
    cp -a $stuff/cherokee            $fs/etc/init.d
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)