2020-08-17 15:14:26 +00:00
|
|
|
# the package can work with devices from network, so use hardened build
|
|
|
|
%global _hardened_build 1
|
|
|
|
|
|
|
|
Name: lprint
|
2024-07-17 12:55:07 +00:00
|
|
|
Version: 1.3.1
|
2024-11-18 14:52:44 +00:00
|
|
|
Release: 7%{?dist}
|
2020-08-17 15:14:26 +00:00
|
|
|
Summary: A Label Printer Application
|
|
|
|
|
2023-07-26 13:02:03 +00:00
|
|
|
License: Apache-2.0
|
2020-08-17 15:14:26 +00:00
|
|
|
URL: https://www.msweet.org/lprint
|
|
|
|
Source0: https://github.com/michaelrsweet/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
2024-08-06 14:39:27 +00:00
|
|
|
Source1: lprint.conf
|
2020-08-17 15:14:26 +00:00
|
|
|
|
2022-01-12 08:22:20 +00:00
|
|
|
|
|
|
|
# UPSTREAM PATCHES
|
2024-07-17 12:55:07 +00:00
|
|
|
# fix putting state file into correct place
|
|
|
|
# https://github.com/michaelrsweet/lprint/commit/648bc20171
|
|
|
|
Patch001: 0001-Update-state-filename-to-current-PAPPL-standard-rena.patch
|
2024-08-06 14:39:27 +00:00
|
|
|
# https://github.com/michaelrsweet/lprint/pull/151
|
|
|
|
Patch002: 0001-lprint.c-Enable-TLS-support-in-Web-UI.patch
|
2022-01-12 08:22:20 +00:00
|
|
|
|
|
|
|
|
2020-08-17 15:14:26 +00:00
|
|
|
# dns-sd support for register/sharing devices
|
|
|
|
BuildRequires: pkgconfig(avahi-client) >= 0.7
|
|
|
|
# uses CUPS API for arrays, options, rastering, HTTP, IPP support
|
2024-07-17 12:55:07 +00:00
|
|
|
BuildRequires: pkgconfig(cups) >= 2.4.0
|
2020-08-17 15:14:26 +00:00
|
|
|
# written in C
|
|
|
|
BuildRequires: gcc
|
|
|
|
# for autosetup
|
2020-11-05 06:57:03 +00:00
|
|
|
BuildRequires: git-core
|
2020-08-17 15:14:26 +00:00
|
|
|
# uses Makefile
|
|
|
|
BuildRequires: make
|
2022-01-12 08:22:20 +00:00
|
|
|
# the basic printer application related structures are now implemented in PAPPL
|
2024-07-17 12:55:07 +00:00
|
|
|
BuildRequires: pkgconfig(pappl) >= 1.2
|
2020-08-17 15:14:26 +00:00
|
|
|
# using pkg-config in configure script
|
|
|
|
BuildRequires: pkgconf-pkg-config
|
2022-01-12 08:22:20 +00:00
|
|
|
# for macros in rpm scriptlets
|
|
|
|
BuildRequires: systemd-rpm-macros
|
2020-08-17 15:14:26 +00:00
|
|
|
|
2024-07-17 12:55:07 +00:00
|
|
|
# lprint server can run as a systemd service, but to don't require systemd by default,
|
2023-07-26 13:02:03 +00:00
|
|
|
# require filesystem (provides /usr/lib/systemd/system too)
|
|
|
|
Requires: filesystem
|
2024-11-18 09:38:28 +00:00
|
|
|
# RHEL-67908 lprint requires avahi-daemon.socket, but does not install avahi
|
|
|
|
Requires: avahi
|
2020-08-17 15:14:26 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
LPrint is a label printer application for macOS and Linux. Basically,
|
|
|
|
LPrint is a print spooler optimized for label printing. It accepts
|
|
|
|
"raw" print data as well as PNG images (like those used for shipping
|
|
|
|
labels by most shippers' current web APIs) and has built-in "drivers"
|
|
|
|
to send the print data to USB and network-connected label printers.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -S git
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
# use gcc
|
|
|
|
export CC=%{__cc}
|
|
|
|
|
|
|
|
# get system default CFLAGS and LDFLAGS
|
|
|
|
%set_build_flags
|
|
|
|
|
2022-01-12 08:22:20 +00:00
|
|
|
%configure
|
2020-08-17 15:14:26 +00:00
|
|
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install DESTDIR=''
|
|
|
|
|
2024-08-06 14:39:27 +00:00
|
|
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/lprint.conf
|
|
|
|
|
|
|
|
%pre
|
2024-11-18 14:52:44 +00:00
|
|
|
# migration scriptlet to take care of incorrect conf locations
|
2024-08-06 14:39:27 +00:00
|
|
|
if [ $1 -gt 1 ]
|
|
|
|
then
|
2024-11-18 14:52:44 +00:00
|
|
|
# daemon moved /etc/lprint.conf into /var/lib/lprint.state if the latter was missing and
|
|
|
|
# no HOME env set - this is incorrect, move it back to /etc (server-options are present only in
|
|
|
|
# system conf file). It was daemon solution for migration of configuration after fixing the bug
|
|
|
|
# which gets fixed by next scriptlet (the state was written into /etc)
|
|
|
|
if test -f /var/lib/lprint.state
|
|
|
|
then
|
|
|
|
! grep -q "^server-options" /var/lib/lprint.state || mv -f /var/lib/lprint.state /etc/lprint.conf
|
|
|
|
fi
|
|
|
|
|
|
|
|
# the original issue - state was written into /etc instead of /var/lib - check if the /etc/lprint.conf
|
|
|
|
# is an actual state file, and if it is, move it into right directory if state file does not exist.
|
2024-08-06 14:39:27 +00:00
|
|
|
if test ! -f /var/lib/lprint.state -a -f /etc/lprint.conf
|
|
|
|
then
|
|
|
|
# if the lprint.conf is the default one from RPM, do not move
|
2024-11-18 14:52:44 +00:00
|
|
|
grep -q "^server-options" /etc/lprint.conf || mv -f /etc/lprint.conf /var/lib/lprint.state
|
2024-08-06 14:39:27 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2022-01-12 08:22:20 +00:00
|
|
|
%post
|
2024-11-18 14:52:44 +00:00
|
|
|
# generate an empty state file to prevent /etc config file being moved into
|
|
|
|
# /var/lib/
|
|
|
|
if test ! -f /var/lib/lprint.state
|
|
|
|
then
|
|
|
|
touch /var/lib/lprint.state
|
|
|
|
fi
|
|
|
|
|
2022-01-12 08:22:20 +00:00
|
|
|
%systemd_post lprint.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun lprint.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart lprint.service
|
|
|
|
|
2020-08-17 15:14:26 +00:00
|
|
|
%files
|
2022-01-12 08:22:20 +00:00
|
|
|
%doc README.md DOCUMENTATION.md CONTRIBUTING.md CHANGES.md
|
2020-08-17 15:14:26 +00:00
|
|
|
%license LICENSE NOTICE
|
2024-08-06 14:39:27 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/lprint.conf
|
2020-08-17 15:14:26 +00:00
|
|
|
%{_bindir}/lprint
|
|
|
|
%{_mandir}/man1/lprint-add.1*
|
|
|
|
%{_mandir}/man1/lprint-cancel.1*
|
|
|
|
%{_mandir}/man1/lprint-default.1*
|
|
|
|
%{_mandir}/man1/lprint-delete.1*
|
|
|
|
%{_mandir}/man1/lprint-devices.1*
|
|
|
|
%{_mandir}/man1/lprint-drivers.1*
|
|
|
|
%{_mandir}/man1/lprint-jobs.1*
|
|
|
|
%{_mandir}/man1/lprint-modify.1*
|
2024-07-17 12:55:07 +00:00
|
|
|
%{_mandir}/man1/lprint-options.1*
|
2020-08-17 15:14:26 +00:00
|
|
|
%{_mandir}/man1/lprint-printers.1*
|
|
|
|
%{_mandir}/man1/lprint-server.1*
|
|
|
|
%{_mandir}/man1/lprint-shutdown.1*
|
|
|
|
%{_mandir}/man1/lprint-status.1*
|
|
|
|
%{_mandir}/man1/lprint-submit.1*
|
|
|
|
%{_mandir}/man1/lprint.1*
|
|
|
|
%{_mandir}/man5/lprint.conf.5*
|
2022-01-12 08:22:20 +00:00
|
|
|
%{_unitdir}/lprint.service
|
2024-11-18 14:52:44 +00:00
|
|
|
%ghost %{_sharedstatedir}/lprint.state
|
2020-08-17 15:14:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-11-18 14:52:44 +00:00
|
|
|
* Mon Nov 18 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.3.1-7
|
|
|
|
- RHEL-62834 Fix post scriptlet
|
|
|
|
|
2024-11-18 09:38:28 +00:00
|
|
|
* Mon Nov 18 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.3.1-6
|
|
|
|
- RHEL-67908 lprint requires avahi-daemon.socket, but does not install avahi
|
|
|
|
|
2024-10-29 15:47:01 +00:00
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.3.1-5
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
2024-10-16 14:28:50 +00:00
|
|
|
* Wed Oct 16 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.3.1-4
|
|
|
|
- RHEL-62834 Fix post scriptlet
|
|
|
|
|
2024-08-08 16:51:01 +00:00
|
|
|
* Thu Aug 08 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.3.1-3
|
|
|
|
- rebuilt with updated pappl
|
|
|
|
|
2024-08-06 14:39:27 +00:00
|
|
|
* Tue Aug 06 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.3.1-2
|
|
|
|
- RHEL-25502 set common server settings by /etc/lprint.conf
|
|
|
|
|
2024-07-17 12:55:07 +00:00
|
|
|
* Wed Jul 17 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.3.1-1
|
|
|
|
- RHEL-25806 [lprint] rebase lprint to 1.3.1 or newer upstream version
|
|
|
|
|
2024-06-24 16:00:55 +00:00
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.2.0-7
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
2024-01-25 04:48:58 +00:00
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
2024-01-21 06:15:13 +00:00
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
2023-07-26 13:02:03 +00:00
|
|
|
* Wed Jul 26 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.2.0-4
|
|
|
|
- SPDX migration and require filesystem instead of systemd
|
|
|
|
|
2023-07-20 13:05:37 +00:00
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
2023-01-19 18:20:15 +00:00
|
|
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
2023-01-03 16:15:50 +00:00
|
|
|
* Tue Jan 03 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.2.0-1
|
|
|
|
- 2157610 - lprint-1.2.0 is available
|
|
|
|
|
2022-07-21 19:55:17 +00:00
|
|
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
2022-05-06 08:14:10 +00:00
|
|
|
* Fri May 06 2022 Zdenek Dohnal <zdohnal@redhat.com> - 1.1.0-3
|
|
|
|
- path to lprint was hardcoded in service file
|
|
|
|
|
2022-01-20 18:07:35 +00:00
|
|
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
2022-01-12 08:22:20 +00:00
|
|
|
* Tue Jan 04 2022 Zdenek Dohnal <zdohnal@redhat.com> - 1.1.0-1
|
|
|
|
- 2035381 - lprint-1.1.0 is available
|
|
|
|
|
2021-07-22 13:11:55 +00:00
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
2021-01-26 18:44:03 +00:00
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
2020-11-05 06:57:03 +00:00
|
|
|
* Thu Nov 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.0-2
|
|
|
|
- use smaller git-core instead of git
|
|
|
|
|
2020-08-17 15:14:26 +00:00
|
|
|
* Mon Aug 17 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.0-1
|
|
|
|
- Initial import (#1867587)
|