cups-browsed: initial release, version 2.0.0

This commit is contained in:
Juergen Daubert 2023-10-02 13:56:19 +02:00
parent 99c930adf8
commit 04e31955ee
5 changed files with 123 additions and 0 deletions

18
cups-browsed/.footprint Normal file
View File

@ -0,0 +1,18 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/cups/
-rw-r--r-- root/root etc/cups/cups-browsed.conf
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/cups-browsed
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/cups/
drwxr-xr-x root/root usr/lib/cups/backend/
-rwx------ root/root usr/lib/cups/backend/implicitclass
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/cups-browsed
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man5/
-rw-r--r-- root/root usr/share/man/man5/cups-browsed.conf.5.gz
drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/cups-browsed.8.gz

7
cups-browsed/.signature Normal file
View File

@ -0,0 +1,7 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/a7BwAaEvy0c4XR3LuwxA1Y5rdEMCTLqOSjD7rmTaHVa55Yybxt7MICZODmK0NLWdlFXwPa2JT4YWT0COkMuYwc=
SHA256 (Pkgfile) = c234ef04fa4fb297d8ea63aa09e23a7ffbed8546f25f84ba3518b009bba14111
SHA256 (.footprint) = 0126cf808cf479a51e79e8d66093ef985df834da70f524894fb2b7e7e85401c8
SHA256 (cups-browsed-2.0.0.tar.xz) = 3a63793213f302787357f520a09e4aaae47aad67cd030d9b29de20e51649b38b
SHA256 (disabled_avahi.patch) = 68f4f7ede48048b541c2d584791692f7159a22780187e9a4ed6826a4b817413a
SHA256 (cups-browsed) = 48e0ee7f0e3060912f9d0e510789b6cfe9a3b28349f5e24be971978f75ba4327

33
cups-browsed/Pkgfile Normal file
View File

@ -0,0 +1,33 @@
# Description: Helper daemon to browse the network for remote CUPS queues and IPP network printers
# URL: https://github.com/OpenPrinting/cups-browsed
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: glib libcupsfilters libppd
# Optional: avahi
name=cups-browsed
version=2.0.0
release=1
source=(https://github.com/OpenPrinting/$name/releases/download/$version/$name-$version.tar.xz
disabled_avahi.patch cups-browsed)
build() {
cd $name-$version
patch -p1 -i $SRC/disabled_avahi.patch
prt-get isinst avahi || PKGMK_CUPSBROWSED+=' --disable-avahi'
./configure $PKGMK_CUPSBROWSED \
--prefix=/usr \
--sysconfdir=/etc \
--runstatedir=/run \
--with-cups-rundir=/run/cups \
--without-rcdir
make
make DESTDIR=$PKG install
install -D -m 0755 $SRC/cups-browsed $PKG/etc/rc.d/cups-browsed
rm -r $PKG/usr/share/doc
}

35
cups-browsed/cups-browsed Executable file
View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# /etc/rc.d/cups-browsed: start/stop CUPS browsing daemon
#
SSD=/sbin/start-stop-daemon
PROG=/usr/sbin/cups-browsed
PID=/run/cups-browsed.pid
case $1 in
start)
$SSD --start -bm --pidfile $PID --exec $PROG
;;
stop)
$SSD --stop --remove-pidfile --retry 10 --pidfile $PID
;;
restart)
$0 stop
$0 start
;;
status)
$SSD --status --pidfile $PID
case $? in
0) echo "$PROG is running with pid $(cat $PID)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
*)
echo "usage: $0 [start|stop|restart|status]"
;;
esac
# End of file

View File

@ -0,0 +1,30 @@
From 08af74bfbf9aa8ccab45a2ee74e95951839756ba Mon Sep 17 00:00:00 2001
From: Timo Gurr <timo.gurr@gmail.com>
Date: Wed, 27 Sep 2023 13:01:46 +0200
Subject: [PATCH] cups-browsed.c: Fix build with avahi disabled (#20)
Fixes #19
---
daemon/cups-browsed.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/daemon/cups-browsed.c b/daemon/cups-browsed.c
index b06461b4..c1e64fab 100644
--- a/daemon/cups-browsed.c
+++ b/daemon/cups-browsed.c
@@ -400,6 +400,7 @@ typedef struct pagesize_count_s
int count;
} pagesize_count_t;
+#ifdef HAVE_AVAHI
typedef struct resolver_args_s
{
AvahiIfIndex interface;
@@ -414,6 +415,7 @@ typedef struct resolver_args_s
AvahiLookupResultFlags flags;
void* userdata;
} resolver_args_t;
+#endif // HAVE_AVAHI
typedef struct create_args_s
{