Skip to content

Commit fd2850b

Browse files
committed
Conditionally enable autoreconf, for when we want to build from Git repository
1 parent 9be2aaf commit fd2850b

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ make install
6868
## Building from the Git repository
6969

7070
After cloning the source from GitHub, you need to run `./bootstrap` to generate the `configure` script.
71+
To run bootstrap, you need to have autotools installed, specifically automake, autoconf, and gnulib-devel.
72+
7173

7274
## Requirements
7375

patchutils.spec.in

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
1+
# Set autoreconf to 1 to enable building from the Git repository
2+
# See: https://github.com/twaugh/patchutils?tab=readme-ov-file#building-from-the-git-repository
3+
%bcond autoreconf 1
4+
5+
%if %{with autoreconf}
6+
%global source_url https://github.com/twaugh/patchutils/archive/%{version}
7+
%global tar_ext gz
8+
%else
9+
%global source_url https://cyberelk.net/tim/data/patchutils/stable
10+
%global tar_ext xz
11+
%endif
12+
113
Summary: A collection of programs for manipulating patch files
214
Name: @PACKAGE@
315
Version: @VERSION@
416
Release: 0.1%{?dist}
517
License: GPL-2.0-or-later
618
URL: http://cyberelk.net/tim/patchutils/
7-
Source0: http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version}.tar.xz
19+
Source0: %{source_url}/%{name}-%{version}.tar.%{tar_ext}
820
Obsoletes: interdiff <= 0.0.10
921
Provides: interdiff = 0.0.11
1022
Requires: patch
1123
BuildRequires: make
1224
BuildRequires: gcc
1325
BuildRequires: perl-generators
1426
BuildRequires: xmlto
27+
%if %{with autoreconf}
1528
BuildRequires: automake
1629
BuildRequires: autoconf
30+
BuildRequires: gnulib-devel
31+
%endif
1732

1833
%description
1934
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.
2540
%setup -q
2641

2742
%build
43+
%if %{with autoreconf}
44+
./bootstrap
45+
%endif
2846
%configure
2947
%make_build
3048

0 commit comments

Comments
 (0)