app=cups-filters
version=1.9.0
build=1sml
homepage="https://www.openprinting.org"
download="https://www.openprinting.org/download/cups-filters/cups-filters-1.9.0.tar.xz"
desc="Backends and filters for CUPS"
requires="dejavu-fonts-ttf libwebp libidn libtasn1 nettle libjpeg-turbo gobject-introspection pcre netbsd-curses glib gmp gnutls zlib imagemagick lcms2 cups poppler qpdf python3"

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version 
  fixbuilddirpermissions

  ./configure \
    --prefix="" \
    --sbindir=/bin \
    --libdir=/lib \
    --sysconfdir=/etc \
    --disable-static \
    --without-php \
    --disable-avahi \
    --with-browseremoteprotocols=cups \
    --with-test-font-path=/share/fonts/TTF/DejaVuSans.ttf

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkdir -p $pkg/etc/rc.d
  #mv $pkg/etc/init.d/cups-browsed $pkg/etc/rc.d/rc.cups-browsed
  rm -rf $pkg/etc/init.d $pkg/etc/rc{0,2,3,5.d}

  find $pkg/etc -type f -exec mv {} {}.new \;

  mkfinalpkg
}

sha512sums="
cfe87763a8438f0dbfb386fd82178371d2ad46a30ae64af0ae4c011cbdd61592da819219b0eed9494740460cef83e009c3eb248aea630f4807d14a525ec9da91  cups-filters-1.9.0.tar.lz
"
