run=(libcupsfilters libppd avahi systemd)

description="cups-browsed daemon is used to browse the network for remote CUPS queues"
url="https://github.com/OpenPrinting/cups-browsed"

packager="Great-OS Team"
maintainer="Great-OS Team"

name=cups-browsed
version=2.1.1
release=2

source=(https://github.com/OpenPrinting/cups-browsed/releases/download/$version/cups-browsed-$version.tar.xz)

build() {

  cd $name-$version

  ./configure --prefix=/usr                   \
              --with-cups-rundir=/run/cups    \
              --without-rcdir                 \
              --disable-static                \
              --docdir=/usr/share/doc/$name-$version

  make
  make DESTDIR=$PKG install

  mkdir -pv $PKG/usr/lib/systemd/system/
  install -v -m644 daemon/cups-browsed.service $PKG/usr/lib/systemd/system/cups-browsed.service
}
