# SliTaz package receipt. PACKAGE="cups" VERSION="2.4.7" CATEGORY="system-tools" TAGS="printer printing" SHORT_DESC="Common UNIX Printing System." MAINTAINER="erjo@slitaz.org" LICENSE="GPL2 LGPL2" WEB_SITE="https://www.cups.org/" TARBALL="$PACKAGE-$VERSION-source.tar.gz" WGET_URL="https://github.com/OpenPrinting/$PACKAGE/releases/download/v$VERSION/$TARBALL" SUGGESTED="cups-lang" DEPENDS="cups-doc dbus libcomerr libcups libkrb5 libssl \ libunistring libusb-compat poppler-apps cups-filters" # poppler-apps cups-filters BUILD_DEPENDS="acl-dev dbus-dev gnutls-dev jpeg-dev libgcrypt-dev \ libgnutls libpng-dev libtasn1-dev libunistring-dev libusb-compat-dev \ openssl-dev php-dev tiff-dev zlib-dev poppler-apps" # poppler-apps # build first without poppler-apps / cups-filters avoid loop between qt4/poppler/cups # and gutenprint/ghostscript. # Rebuild it with cups-filters / poppler-apps deps current_version() { wget -O - ${WGET_URL%/down*} 2>/dev/null | \ sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q' } # Rules to configure and make the package. compile_rules() { # patch -Np1 -i $stuff/install-sh.u export LDFLAGS="$LDFLAGS -lrt" # Set list of wanted locales in LOCALE_PACK . $WOK/slitaz-i18n/stuff/locale-pack.conf # <= 2.0.2 unrecognised # --disable-ldap # --disable-slp # --with-pdftops=pdftops ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --enable-static \ --disable-pam \ --disable-gssapi \ --disable-acl \ --enable-dbus \ --with-dbusdir=/etc/dbus-1 \ --with-cups-user=nobody \ --with-cups-group=nogroup \ --with-languages="$LOCALE_PACK" \ $CONFIGURE_ARGS && make && make install BUILDROOT=$DESTDIR cp -f $stuff/cups.desktop \ $install/usr/share/applications/cups.desktop } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/etc mkdir -p $fs/usr/lib mkdir -p $fs/usr/share cp -a $install/etc/cups $fs/etc cp -a $install/etc/dbus* $fs/etc cp -a $install/usr/bin $fs/usr cp -a $install/usr/lib/*.so* $fs/usr/lib cp -a $install/usr/lib/cups $fs/usr/lib cp -a $install/usr/sbin $fs/usr cp -a $install/usr/share/cups $fs/usr/share cp -a $install/usr/share/icons $fs/usr/share cp -a $install/var $fs # Remove files provided by cups-filters rm -f $fs/usr/share/cups/banners/* rm -f $fs/usr/share/cups/data/testprint # Remove files provided by libcups rm -f $fs/usr/lib/libcups.so* # Daemon script cp -a $stuff/etc $fs sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf # TazPanel link cp -a $stuff/var $fs sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \ $fs/usr/share/cups/templates/choose-uri.tmpl } post_install() { # Start CUPS daemon and edit daemons.conf if [ -z "$1" -a ! -s /aufs-umount.sh ] then /etc/init.d/cupsd start || continue fi rm -f "$1"/var/cache/tazpanel/* 2> /dev/null if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf" then cat >> "$1/etc/daemons.conf" <