diff --git a/.gitignore b/.gitignore index da82652..8c8476b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /lprint-1.0.tar.gz /lprint-1.1.0.tar.gz +/lprint-1.2.0.tar.gz diff --git a/0001-configure-Add-with-systemd-option.patch b/0001-configure-Add-with-systemd-option.patch deleted file mode 100644 index fdae526..0000000 --- a/0001-configure-Add-with-systemd-option.patch +++ /dev/null @@ -1,202 +0,0 @@ -From ba5a66731b9b532a601ad5b3d7dd6b941d1d1917 Mon Sep 17 00:00:00 2001 -From: Zdenek Dohnal -Date: Wed, 12 Jan 2022 09:15:14 +0100 -Subject: [PATCH] configure: Add --with-systemd option - -The option enables disabling installation of systemd unit file -or setting a different path for systemd unit file. ---- - Makefile.in | 9 ++++---- - configure | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 38 +++++++++++++++++++++++++++++++ - 3 files changed, 107 insertions(+), 4 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index 4161124..4cf40d7 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -56,6 +56,7 @@ sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ - sysconfdir = @sysconfdir@ - top_srcdir = @top_srcdir@ -+unitdir = @unitdir@ - - BUILDROOT = $(DSTROOT)$(RPM_BUILD_ROOT)$(DESTDIR) - -@@ -130,10 +131,10 @@ install: all - echo "Installing launchd service to $(BUILDROOT)/Library/LaunchDaemons..."; \ - $(INSTALL) -d -m 755 $(BUILDROOT)/Library/LaunchDaemons; \ - $(INSTALL) -c -m 644 org.msweet.lprint.plist $(BUILDROOT)/Library/LaunchDaemons; \ -- else \ -- echo "Installing systemd service to $(BUILDROOT)$(sysconfdir)/systemd/system..."; \ -- $(INSTALL) -d -m 755 $(BUILDROOT)$(sysconfdir)/systemd/system; \ -- $(INSTALL) -c -m 644 lprint.service $(BUILDROOT)$(sysconfdir)/systemd/system; \ -+ elif test x$unitdir != x; then \ -+ echo "Installing systemd service to $(BUILDROOT)$(unitdir)..."; \ -+ $(INSTALL) -d -m 755 $(BUILDROOT)$(unitdir); \ -+ $(INSTALL) -c -m 644 lprint.service $(BUILDROOT)$(unitdir); \ - fi - - -diff --git a/configure b/configure -index 249946c..7c5b496 100755 ---- a/configure -+++ b/configure -@@ -619,6 +619,7 @@ ac_subst_vars='LTLIBOBJS - LIBOBJS - OPTIM - CSFLAGS -+unitdir - CUPSCONFIG - PKGCONFIG - INSTALL -@@ -688,6 +689,7 @@ enable_option_checking - enable_debug - enable_maintainer - enable_sanitizer -+with_systemd - with_ldflags - ' - ac_precious_vars='build_alias -@@ -1327,6 +1329,7 @@ Optional Features: - Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) -+ --with-systemd=PATH install systemd service file, default=yes - --with-ldflags=... Specify additional LDFLAGS - - Some influential environment variables: -@@ -2349,6 +2352,14 @@ LDFLAGS="${LDFLAGS:=}" - LIBS="${LIBS:=}" - - -+if test $prefix = NONE -+then : -+ -+ prefix=$ac_default_prefix -+ -+fi -+ -+ - - - -@@ -3874,6 +3885,59 @@ then : - fi - - -+ -+ -+# Check whether --with-systemd was given. -+if test ${with_systemd+y} -+then : -+ withval=$with_systemd; -+ case $withval in #( -+ yes) : -+ -+ with_systemd=yes -+ unitdir=${prefix}/lib/systemd/system -+ ;; #( -+ no) : -+ -+ with_systemd=no -+ ;; #( -+ *) : -+ -+ with_systemd=yes -+ unitdir=$withval -+ ;; -+esac -+ -+else $as_nop -+ -+ with_systemd=yes -+ unitdir=${prefix}/lib/systemd/system -+ -+fi -+ -+ -+ -+if test `uname` != "Darwin" && test x$with_systemd = xyes -+then : -+ -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd unit directory" >&5 -+printf %s "checking for systemd unit directory... " >&6; } -+ if test x$unitdir != x -+then : -+ -+ -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unitdir" >&5 -+printf "%s\n" "$unitdir" >&6; } -+ -+else $as_nop -+ -+ as_fn_error $? "Path to the unit dir is empty." "$LINENO" 5 -+ -+fi -+ -+fi -+ -+ - if test x$enable_debug = xyes - then : - -diff --git a/configure.ac b/configure.ac -index cfb4090..9421478 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -54,6 +54,12 @@ LDFLAGS="${LDFLAGS:=}" - LIBS="${LIBS:=}" - - -+dnl Figure out prefix - needed for systemd unit dir -+AS_IF([test $prefix = NONE], [ -+ prefix=$ac_default_prefix -+], []) -+ -+ - dnl Standard programs... - AC_PROG_CC - AC_PROG_RANLIB -@@ -110,6 +116,38 @@ AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [turn on debugging, defa - AC_ARG_ENABLE([maintainer], AS_HELP_STRING([--enable-maintainer], [turn on maintainer mode, default=no])) - AC_ARG_ENABLE([sanitizer], AS_HELP_STRING([--enable-sanitizer], [build with AddressSanitizer, default=no])) - -+ -+AC_ARG_WITH([systemd], AS_HELP_STRING([--with-systemd[=PATH]], [install systemd service file, default=yes]), -+[ -+ AS_CASE([$withval], [yes], [ -+ with_systemd=yes -+ unitdir=${prefix}/lib/systemd/system -+ ], [no], [ -+ with_systemd=no -+ ], [ -+ with_systemd=yes -+ unitdir=$withval -+ ]) -+], [ -+ with_systemd=yes -+ unitdir=${prefix}/lib/systemd/system -+]) -+ -+ -+dnl Substitute unitdir macro if we aren't on Darwin and want systemd... -+AS_IF([test `uname` != "Darwin" && test x$with_systemd = xyes], [ -+ AC_MSG_CHECKING([for systemd unit directory]) -+ AS_IF([test x$unitdir != x], [ -+ AC_SUBST([unitdir]) -+ AC_MSG_RESULT([$unitdir]) -+ ], -+ [ -+ AC_MSG_ERROR([Path to the unit dir is empty.]) -+ ]) -+], -+[]) -+ -+ - AS_IF([test x$enable_debug = xyes], [ - OPTIM="-g" - CSFLAGS="" --- -2.34.1 - diff --git a/0001-configure.ac-Don-t-hardcode-a-path-into-.service-fil.patch b/0001-configure.ac-Don-t-hardcode-a-path-into-.service-fil.patch deleted file mode 100644 index 56911ee..0000000 --- a/0001-configure.ac-Don-t-hardcode-a-path-into-.service-fil.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 811310768250b2ae61280f7b63ee1e36e3365893 Mon Sep 17 00:00:00 2001 -From: Zdenek Dohnal -Date: Thu, 5 May 2022 15:58:30 +0200 -Subject: [PATCH] configure.ac: Don't hardcode a path into .service file - ---- - configure | 3 ++- - configure.ac | 5 ++++- - lprint.service => lprint.service.in | 2 +- - 3 files changed, 7 insertions(+), 3 deletions(-) - rename lprint.service => lprint.service.in (71%) - -diff --git a/configure b/configure -index a8d6f8f..b346b71 100755 ---- a/configure -+++ b/configure -@@ -4112,7 +4112,7 @@ then : - fi - - --ac_config_files="$ac_config_files Makefile" -+ac_config_files="$ac_config_files Makefile lprint.service" - - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure -@@ -4801,6 +4801,7 @@ do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; -+ "lprint.service") CONFIG_FILES="$CONFIG_FILES lprint.service" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -diff --git a/configure.ac b/configure.ac -index 5301080..55691bd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -232,5 +232,8 @@ AC_ARG_WITH(ldflags, AS_HELP_STRING([--with-ldflags=...], [Specify additional LD - ]) - - dnl Generate the Makefile... --AC_CONFIG_FILES([Makefile]) -+AC_CONFIG_FILES([ -+ Makefile -+ lprint.service -+]) - AC_OUTPUT -diff --git a/lprint.service b/lprint.service.in -similarity index 71% -rename from lprint.service -rename to lprint.service.in -index 596865a..301d825 100644 ---- a/lprint.service -+++ b/lprint.service.in -@@ -7,7 +7,7 @@ Requires=avahi-daemon.socket - WantedBy=multi-user.target - - [Service] --ExecStart=/usr/local/bin/lprint server -o log-file=- -o log-level=debug -+ExecStart=@bindir@/lprint server -o log-file=- -o log-level=debug - Type=simple - Restart=on-failure - --- -2.35.1 - diff --git a/lprint.spec b/lprint.spec index 5da5d4d..cfa0637 100644 --- a/lprint.spec +++ b/lprint.spec @@ -2,8 +2,8 @@ %global _hardened_build 1 Name: lprint -Version: 1.1.0 -Release: 4%{?dist} +Version: 1.2.0 +Release: 1%{?dist} Summary: A Label Printer Application License: ASL 2.0 @@ -12,13 +12,6 @@ Source0: https://github.com/michaelrsweet/%{name}/releases/download/v%{version}/ # UPSTREAM PATCHES -# lprint puts service file into /etc/systemd/system instead of /usr/lib/systemd/system -# - /etc is for admin overrides, distro defaults must be in /usr/lib -# https://github.com/michaelrsweet/lprint/pull/50 -Patch01: 0001-configure-Add-with-systemd-option.patch -# the path to the command was hardcoded -# https://github.com/michaelrsweet/lprint/pull/63 -Patch02: 0001-configure.ac-Don-t-hardcode-a-path-into-.service-fil.patch # dns-sd support for register/sharing devices @@ -104,6 +97,9 @@ export CC=%{__cc} %changelog +* Tue Jan 03 2023 Zdenek Dohnal - 1.2.0-1 +- 2157610 - lprint-1.2.0 is available + * Thu Jul 21 2022 Fedora Release Engineering - 1.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index a4b4ab4..d67cc05 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lprint-1.1.0.tar.gz) = 831914c8a7aadf960381ff459c65849948fafe0a200233af47e3a7691c013c26bdda458d1a8404f46b74e5c9a027814e8f816ac582ef48680ff78202de0d7fb3 +SHA512 (lprint-1.2.0.tar.gz) = 36dd092977ba1b516c823c9804885348587dcea462a305b3d640e9fe673d04c6187088e5bea7af065814ed07a5a7bfeb0cf073de0a18bfe34ed51ba483496e62