From a55a6a9021d3e3d1770bf7f8c43934d966dae57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 24 Sep 2025 02:06:56 +0100 Subject: [PATCH 1/2] Change minor details in patchutils.spec.in --- patchutils.spec.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/patchutils.spec.in b/patchutils.spec.in index 6622cc96..c8c4c6e0 100644 --- a/patchutils.spec.in +++ b/patchutils.spec.in @@ -1,7 +1,7 @@ Summary: A collection of programs for manipulating patch files Name: @PACKAGE@ Version: @VERSION@ -Release: 0.1 +Release: 0.1%{?dist} License: GPL-2.0-or-later URL: http://cyberelk.net/tim/patchutils/ Source0: http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version}.tar.xz @@ -34,15 +34,14 @@ make check %install %make_install + %files %{!?_licensedir:%global license %doc} %doc AUTHORS ChangeLog README.md BUGS NEWS patchview/README.patchview %license COPYING %{_bindir}/* %{_datadir}/bash-completion/completions/* -%if 0%{?have_xmlto} %{_mandir}/*/* -%endif %changelog * Tue Jan 6 2004 Tim Waugh From a513a60a465155858f39bc839a8a00b66fbcf41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 26 Sep 2025 17:41:25 +0100 Subject: [PATCH 2/2] Conditionally enable building from the Git repository --- patchutils.spec.in | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/patchutils.spec.in b/patchutils.spec.in index c8c4c6e0..269e36ab 100644 --- a/patchutils.spec.in +++ b/patchutils.spec.in @@ -1,10 +1,22 @@ +# Set autoconf to 1 to enable building from the Git repository +# See: https://github.com/twaugh/patchutils?tab=readme-ov-file#building-from-the-git-repository +%bcond autoconf 1 + +%if %{with autoconf} +%global source_url https://github.com/twaugh/patchutils/archive/%{version} +%global tar_ext gz +%else +%global source_url https://cyberelk.net/tim/data/patchutils/stable +%global tar_ext xz +%endif + Summary: A collection of programs for manipulating patch files Name: @PACKAGE@ Version: @VERSION@ Release: 0.1%{?dist} License: GPL-2.0-or-later URL: http://cyberelk.net/tim/patchutils/ -Source0: http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version}.tar.xz +Source0: %{source_url}/%{name}-%{version}.tar.%{tar_ext} Obsoletes: interdiff <= 0.0.10 Provides: interdiff = 0.0.11 Requires: patch @@ -12,8 +24,11 @@ BuildRequires: make BuildRequires: gcc BuildRequires: perl-generators BuildRequires: xmlto +%if %{with autoconf} BuildRequires: automake BuildRequires: autoconf +BuildRequires: gnulib-devel +%endif %description This is a collection of programs that can manipulate patch files in @@ -25,6 +40,9 @@ and simply listing the files modified by a patch. %setup -q %build +%if %{with autoconf} +./bootstrap +%endif %configure %make_build