diff --git a/hplip-fix-linkage.patch b/hplip-fix-linkage.patch new file mode 100644 index 0000000000000000000000000000000000000000..1e68102311f3803dd51cd8076c5087a5227389b7 --- /dev/null +++ b/hplip-fix-linkage.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.am b/Makefile.am +index 605744a..58bd60b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -325,7 +325,7 @@ lib_LTLIBRARIES += libhpipp.la + libhpipp_la_SOURCES = protocol/hp_ipp.c protocol/hp_ipp.h protocol/hp_ipp_i.h + libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" + libhpipp_la_LDFLAGS = -version-info 0:1:0 +-libhpipp_la_LIBADD = libhpmud.la ++libhpipp_la_LIBADD = libhpmud.la -lcups + + # cupsext + cupsextdir = $(PYTHONEXECDIR) diff --git a/hplip.appdata.xml b/hplip.appdata.xml index 17ddd4acabe0b3b2549ec0ce3c6e20ef58a33312..a7aaf124c4219ff86db6541f80620ef094933ca3 100644 --- a/hplip.appdata.xml +++ b/hplip.appdata.xml @@ -38,17 +38,23 @@

The tools that do not need GUI for its functionality must be run with the '-i' option when the hplip-gui package is not installed.

The Launch button does not work because this subpackage is set of tools and it is not set which tool to launch from Gnome Software.

+ hplip.desktop + Main interface https://raw.githubusercontent.com/zdohnal/hplip/master/hplip1.png + Device Discovery https://raw.githubusercontent.com/zdohnal/hplip/master/hplip2.png + Wireless Setup https://raw.githubusercontent.com/zdohnal/hplip/master/hplip3.png - http://hplipopensource.com/ + https://hplipopensource.com/ richard_at_hughsie.com + + diff --git a/hplip.spec b/hplip.spec index 165be2cbeca18524ec133e132b3c97729bc3106a..a6d7561c25d3c8a3f5a9ce3cb1d888b25fa945d9 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,7 +1,7 @@ Name: hplip Summary: HP Linux Imaging and Printing Project Version: 3.25.6 -Release: 1 +Release: 2 License: GPL-2.0-or-later AND MIT AND BSD-3-Clause AND IJG AND GPL-2.0-only AND LGPL-2.1-or-later AND BSD-2-Clause AND Public Domain Url: https://developers.hp.com/hp-linux-imaging-and-printing Source0: http://downloads.sourceforge.net/sourceforge/hplip/hplip-%%{version}.tar.gz @@ -40,11 +40,13 @@ Patch34: hplip-hpfax-importerror-print.patch Patch35: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch Patch36: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch Patch37: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch +Patch38: hplip-fix-linkage.patch Requires: python3-pillow python3-gobject cups python3-dbus systemd %{_bindir}/gpg Requires: python3-qt5 wget python3-gobject python3-reportlab sane-backends python3 +Requires(post): /usr/bin/timeout -BuildRequires: autoconf automake libtool net-snmp-devel cups-devel libappstream-glib +BuildRequires: autoconf automake libtool net-snmp-devel cups-devel /usr/bin/appstreamcli BuildRequires: gcc python3-devel libjpeg-devel desktop-file-utils libusb1-devel systemd BuildRequires: gcc-c++ openssl-devel sane-backends-devel pkgconfig(dbus-1) cups python3-cups BuildRequires: pkgconfig(avahi-client) cups-libs @@ -138,6 +140,7 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch -P36 -p1 -b .qmsgbox-typos-fix %patch -P37 -p1 -b .toolbox-crash +%patch -P38 -p1 -b .linkage sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -159,7 +162,7 @@ autoreconf --verbose --force --install export CFLAGS="%{optflags} $(python3-config --includes)" export CXXFLAGS="%{optflags} $(python3-config --includes)" -export LDFLAGS="${LDFLAGS} -fPIC" +export LDFLAGS="%{build_ldflags} -fPIC" %configure \ --enable-scan-build --enable-gui-build --enable-fax-build \ @@ -223,26 +226,21 @@ popd install -d ${RPM_BUILD_ROOT}%{_datadir}/applications sed -i -e '/^Categories=/d' hplip.desktop sed -i -e '/^Encoding=/d' hplip.desktop -desktop-file-validate hplip.desktop desktop-file-install --vendor HP --dir ${RPM_BUILD_ROOT}/%{_datadir}/applications --add-category System \ --add-category Settings --add-category HardwareSettings hplip.desktop -appstream-util validate-relax --nonet ${RPM_BUILD_ROOT}%{_datadir}/appdata/*.appdata.xml install -p -m755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_bindir}/hpcups-update-ppds install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sane.d/dll.d echo hpaio > ${RPM_BUILD_ROOT}%{_sysconfdir}/sane.d/dll.d/hpaio find doc/images -type f -exec chmod 644 {} \; install -d ${RPM_BUILD_ROOT}%{_datadir}/hplip/prnt/plugins -%pre -%{_bindir}/systemctl start cups &>/dev/null ||: -%{_bindir}/systemctl enable cups &>/dev/null ||: +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/hplip.desktop +appstreamcli validate --pedantic --no-net ${RPM_BUILD_ROOT}%{_datadir}/appdata/*.appdata.xml %post -%{_bindir}/hpcups-update-ppds &>/dev/null ||: -/sbin/ldconfig - -%postun -/sbin/ldconfig +# timeout is to prevent possible freeze during update +%{_bindir}/timeout 10m -k 15m %{_bindir}/hpcups-update-ppds &>/dev/null ||: %files %doc COPYING doc/* @@ -269,6 +267,10 @@ install -d ${RPM_BUILD_ROOT}%{_datadir}/hplip/prnt/plugins %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Wed Oct 08 2025 Funda Wang - 3.25.6-2 +- use appstreamcli instead of appstream-util +- drop useless cups startup on pre section + * Mon Sep 29 2025 xu_ping <707078654@qq.com> - 3.25.6-1 - Upgrade version to 3.25.6