net-print/cups-browsed: new package, add 2.0.0

Part of the CUPS v3 evolution. Now, cups-filters has been split out into
multiple sub-packages. This contains the standalone browsed component.

Bug: https://bugs.gentoo.org/914586
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Eli Schwartz
2023-11-09 19:33:17 -05:00
committed by Sam James
parent 54a85de9da
commit 023cf4bb70
4 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST cups-browsed-2.0.0.tar.xz 426132 BLAKE2B e1724c03302d61cf131c8886a95f6ad8f0236b134f1deaadb783fa185141b83cd8ac5c5d993ded37d04c7fd806c5cde157a792a90a2f372075f24a5bd2423dc5 SHA512 592493ef82c65b2418b86b555c4d24bdf352f78516993a021d106240b8c399fd9f4fcc27e396e895d94da889a97f2bbc5e96bfa92c58c8be80802ee8df43db80

View File

@@ -0,0 +1,63 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit systemd
DESCRIPTION="helper daemon to browse for remote CUPS queues and IPP network printers"
HOMEPAGE="https://github.com/OpenPrinting/cups-browsed"
SRC_URI="https://github.com/OpenPrinting/cups-browsed/releases/download/${PV}/${P}.tar.xz"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="ldap test zeroconf"
KEYWORDS="~amd64"
RDEPEND="
dev-libs/glib:2
>=net-print/cups-2
>=net-print/cups-filters-2.0.0
ldap? ( net-nds/openldap:= )
test? ( net-print/cups[zeroconf] )
zeroconf? ( net-dns/avahi[dbus] )
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-util/gdbus-codegen
>=sys-devel/gettext-0.18.3
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch
)
src_configure() {
local myeconfargs=(
--localstatedir="${EPREFIX}"/var
--with-browseremoteprotocols=DNSSD,CUPS
--with-cups-rundir="${EPREFIX}"/run/cups
--with-rcdir=no
$(use_enable ldap)
$(use_enable zeroconf avahi)
)
econf "${myeconfargs[@]}"
}
src_install() {
default
cp "${FILESDIR}"/cups-browsed.init.d "${T}"/cups-browsed || die
if ! use zeroconf ; then
sed -i -e 's:need cupsd avahi-daemon:need cupsd:g' "${T}"/cups-browsed || die
sed -i -e 's:cups\.service avahi-daemon\.service:cups.service:g' "${S}"/daemon/cups-browsed.service || die
fi
doinitd "${T}"/cups-browsed
systemd_dounit "${S}"/daemon/cups-browsed.service
}

View File

@@ -0,0 +1,34 @@
Upstream: https://github.com/OpenPrinting/cups-browsed/commit/08af74bfbf9aa8ccab45a2ee74e95951839756ba.patch
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
{
--
2.41.0

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>printing@gentoo.org</email>
<name>Gentoo Printing Project</name>
</maintainer>
<upstream>
<remote-id type="github">OpenPrinting/cups-browsed</remote-id>
</upstream>
</pkgmetadata>