From f0e69e744adc5f5d623f813999fe01da7a97ffcd85dafaef2ae6a412fbb30e7e Mon Sep 17 00:00:00 2001
From: Martin Pluskal <mpluskal@suse.com>
Date: Thu, 12 Dec 2019 09:34:01 +0000
Subject: [PATCH 1/2] - Modernise spec file

OBS-URL: https://build.opensuse.org/package/show/devel:tools/patchutils?expand=0&rev=19
---
 patchutils.changes |  5 +++++
 patchutils.spec    | 29 ++++++++++++-----------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/patchutils.changes b/patchutils.changes
index 0e6004e..9faed11 100644
--- a/patchutils.changes
+++ b/patchutils.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Dec 12 09:33:35 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
+
+- Modernise spec file
+
 -------------------------------------------------------------------
 Fri Jul  3 06:43:14 UTC 2015 - sleep_walker@opensuse.org
 
diff --git a/patchutils.spec b/patchutils.spec
index 22f6946..b1bfd49 100644
--- a/patchutils.spec
+++ b/patchutils.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package patchutils
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -20,20 +20,17 @@ Name:           patchutils
 Version:        0.3.4
 Release:        0
 Summary:        A Collection of Tools for Manipulating Patch Files
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          Productivity/File utilities
-Url:            http://cyberelk.net/tim/software/patchutils/
+URL:            http://cyberelk.net/tim/software/patchutils/
 Source0:        http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version}.tar.xz
 Source1:        http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version}.tar.xz.sig
 Patch0:         %{name}-0.2.30-tailsyntax.diff
 Patch2:         rediff-hunk-init-fix.diff
 BuildRequires:  automake
-%if 0%{?suse_version} < 1220
-BuildRequires:  xz
-%endif
+BuildRequires:  xmlto
 Requires:       diffutils
 Requires:       patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 Patchutils contains a collection of tools for manipulating patch files:
@@ -46,26 +43,24 @@ based on modified files matching shell wildcards. Lsdiff lists modified
 files in a patch. Rediff corrects hand-edited patches.
 
 %prep
-%setup -q
-%patch0 -p1
-%patch2 -p1
+%autosetup -p1
 
 %build
 %configure
-make %{?_smp_mflags}
+%make_build
 
 %check
-make check
+make --jobs=1 check
 
 %install
-make DESTDIR=%{buildroot} install
+%make_install
 install -m 0755 -d %{buildroot}%{_mandir}/man1/
 install -m 0644 -t %{buildroot}%{_mandir}/man1/ doc/*.1
 
 %files
-%defattr(-,root,root)
-%doc AUTHORS BUGS COPYING ChangeLog NEWS README TODO
+%license COPYING
+%doc AUTHORS BUGS ChangeLog NEWS README TODO
 %{_bindir}/*
-%{_mandir}/man1/*.1*
+%{_mandir}/man1/*.1%{?ext_man}
 
 %changelog

From 3cd13b442a2c037a397c69c5f793c1fc9e47623a4449b2ef9e861f1ea59e5631 Mon Sep 17 00:00:00 2001
From: Martin Pluskal <mpluskal@suse.com>
Date: Mon, 16 Dec 2019 14:08:56 +0000
Subject: [PATCH 2/2] - Drop xmlto dependency as it would introduce build cycle

OBS-URL: https://build.opensuse.org/package/show/devel:tools/patchutils?expand=0&rev=20
---
 patchutils.changes | 5 +++++
 patchutils.spec    | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/patchutils.changes b/patchutils.changes
index 9faed11..f74cca5 100644
--- a/patchutils.changes
+++ b/patchutils.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Mon Dec 16 14:08:27 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
+
+- Drop xmlto dependency as it would introduce build cycle
+
 -------------------------------------------------------------------
 Thu Dec 12 09:33:35 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
 
diff --git a/patchutils.spec b/patchutils.spec
index b1bfd49..8d99714 100644
--- a/patchutils.spec
+++ b/patchutils.spec
@@ -28,7 +28,6 @@ Source1:        http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version
 Patch0:         %{name}-0.2.30-tailsyntax.diff
 Patch2:         rediff-hunk-init-fix.diff
 BuildRequires:  automake
-BuildRequires:  xmlto
 Requires:       diffutils
 Requires:       patch