# cups, http://www.cups.org

name=cups
version=1.1.15
source=($name-$version-source.tar.bz2 cups.pam)

build() {
    cd $name-$version
    ./configure --prefix=/usr --sysconfdir=/etc --enable-pam \
    --enable-ssl --localstatedir=/var i386-root-linux
    make
    make BUILDROOT=$PKG install
    strip $PKG/usr/bin/*
    strip $PKG/usr/sbin/*
    strip $PKG/usr/lib/*.so*
    rm -rf $PKG/usr/man/cat?
    rm -rf $PKG/usr/man/fr
    rm -rf $PKG/etc/rc.d
    rm -f $PKG/usr/man/man1/cancel.1
    rm -f $PKG/usr/man/man8/disable.8
    rm -f $PKG/usr/man/man8/reject.8
    gzip -9 $PKG/usr/man/man?/*
    ln -s lp.1.gz $PKG/usr/man/man1/cancel.1.gz
    ln -s enable.8.gz $PKG/usr/man/man8/disable.8.gz
    ln -s accept.8.gz $PKG/usr/man/man8/reject.8.gz
    rm -f $PKG/usr/info/dir
    gzip -9 $PKG/usr/info/*
    rm -f $PKG/cups
    chown root.root $PKG/var/spool
    chown root.root $PKG/etc
    chmod 755 $PKG/var/spool
    mkdir -p $PKG/etc/pam.d
    cp ../cups.pam $PKG/etc/pam.d/cups
    chown root.root $PKG/etc/pam.d -R
}
