Files
packages/libs/libcups/Makefile
T
Sander van Deijck a6e9c57af7 libcups: update to 2.4.20
CUPS development moved from Apple to OpenPrinting; the apple/cups
repository has not been updated since 2023. Switch the source to
OpenPrinting's release and update from 2.2.12 (2019) to 2.4.20, picking
up several years of fixes, including security fixes.

Changes:
- download from OpenPrinting's GitHub releases; update URL, CPE ID and
  license (CUPS is Apache-2.0 since 2.3)
- libcupsimage is now built from cups/ (a compatibility stub since
  2.3); the image filters and their libpng/libjpeg dependencies are
  gone, and libusb is only used by the USB backend, which isn't built
- replace configure options that no longer exist with their 2.4
  equivalents (--with-tls=no, --with-dnssd=no)
- backport two fixes from the 2.4.x branch:
  010: "Fix destination enumeration without DNS-SD" (23a183b63a4c),
       needed to build without DNS-SD
  011: "Validate printer/server responses (GHSA-hp44-ph36-rc52)"
       (0beeb4e78730)

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
2026-11-03 22:17:29 +02:00

79 lines
2.1 KiB
Makefile

#
# Copyright (C) 2006-2012 OpenWrt.org
# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=cups
PKG_VERSION:=2.4.20
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz
PKG_SOURCE_URL:=https://github.com/OpenPrinting/cups/releases/download/v$(PKG_VERSION)/
PKG_HASH:=ab4d9cd7f3e58060091d2b24972223d6401675f11c49b65abf4f6ef31dea22ff
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE NOTICE
PKG_CPE_ID:=cpe:/a:openprinting:cups
include $(INCLUDE_DIR)/package.mk
define Package/libcups/Default
URL:=https://openprinting.github.io/cups/
SUBMENU:=Printing
endef
define Package/libcups
$(call Package/cups/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+zlib +libpthread
TITLE:=Common UNIX Printing System - Core library
BUILDONLY:=1
endef
define Package/libcups/description
Common UNIX Printing System - Core library
endef
CONFIGURE_ARGS+=--with-cups-user="nobody" \
--with-cups-group="nogroup" \
--with-components="core" \
--with-dnssd=no \
--with-tls=no \
--enable-shared \
--disable-acl \
--disable-dbus \
--disable-gssapi \
--disable-libusb \
--disable-pam \
UNAME="Linux"
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/cups \
$(TARGET_CONFIGURE_OPTS) \
DSTROOT="$(PKG_INSTALL_DIR)" \
STRIP="/bin/true" \
libcups.so.2 libcupsimage.so.2 install-libs install-headers
$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cups-config $(PKG_INSTALL_DIR)/usr/bin
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(1)/usr/bin/
$(INSTALL_DIR) $(2)/bin
$(LN) $(STAGING_DIR)/usr/bin/cups-config $(2)/bin
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib*/libcups*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libcups))