summaryrefslogtreecommitdiffstats
path: root/repos/autotools/autotools-latest/automake/automake.spec
blob: 45351a609099e8453098dce3e4e8a5225c7a7f91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
%{?_compat_el5_build}

# Workaround to always have %%scl defined (for testing locally)
%{!?scl:%global scl autotools-latest}

%{?scl:%scl_package automake}

%global api_version 1.16

# run "make check" by default
%bcond_without check
# Run optional test
%bcond_without automake_enables_optional_test

# remove once %%configure is used instead of ./configure
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}

Summary:    A GNU tool for automatically creating Makefiles
Name:       %{?scl_prefix}automake
Version:    %{api_version}.1
Release:    3%{?dist}

# docs ~> GFDL, sources ~> GPLv2+, mkinstalldirs ~> PD and install-sh ~> MIT
License:    GPLv2+ and GFDL and Public Domain and MIT

Group:      Development/Tools
Source:     ftp://ftp.gnu.org/gnu/automake/automake-%{version}.tar.gz
Source2:    http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
Source3:    http://git.savannah.gnu.org/cgit/config.git/plain/config.guess

# Keep those patches in 'git format-patch' format (with docs).
%if %{with check} && !%{without automake_enables_optional_test}
Patch0:     automake-1.15-disable-vala-tests.patch
%endif

URL:        http://www.gnu.org/software/automake/
Requires:   %{?scl_prefix}autoconf >= 2.65

# requirements not detected automatically (#919810)
Requires:   perl(Thread::Queue)
Requires:   perl(threads)

BuildRequires: %{scl_prefix}autoconf
BuildRequires:  coreutils
BuildRequires:  findutils
BuildRequires:  help2man
BuildRequires:  make
# Filtering macros are in perl-macros (fedora) and (perl-devel rhel6), not in
# RHEL5
%if 0%{?rhel} == 6
BuildRequires: perl-devel
%endif
%if 0%{?rhel} == 7
BuildRequires: perl-macros
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires:  perl-generators
%endif
BuildRequires:  perl-interpreter
BuildRequires:  perl(Thread::Queue)
BuildRequires:  perl(threads)

Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info

BuildArch:  noarch

%{?scl:
BuildRequires:  scl-utils-build
Requires:       %scl_runtime
}


# for better tests coverage:
%if %{with check}
%if %{with automake_enables_optional_test}
BuildRequires: %{?scl_prefix}automake
BuildRequires: bison
BuildRequires: cscope
BuildRequires: dejagnu
BuildRequires: emacs
BuildRequires: expect
BuildRequires: flex
BuildRequires: gcc-gfortran
BuildRequires: gettext-devel
BuildRequires: java-devel-openjdk
# BuildRequires: libtool # TODO: add from SCL
BuildRequires: ncompress
BuildRequires: sharutils
%if 0%{?rhel} != 5
BuildRequires: texlive-dvips
%endif
BuildRequires: texinfo-tex
BuildRequires: vala
%if !0%{?rhel:1}
BuildRequires: gcc-objc
BuildRequires: gcc-objc++
BuildRequires: imake
BuildRequires: lzip
%endif
%endif
%endif

%if ! 0%{?rhel} == 5
# remove bogus Automake perl dependencies and provides
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Automake::
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(Automake::
%endif

%description
Automake is a tool for automatically generating `Makefile.in'
files compliant with the GNU Coding Standards.

You should install Automake if you are developing software and would
like to use its ability to automatically generate GNU standard
Makefiles.

%prep
%setup -q -n automake-%{version}
%{?scl_enable}
%if %{with check} && !%{without automake_enables_optional_test}
%patch0 -p1 -b .disable_tests
autoreconf -iv
%endif

for file in %SOURCE2 %SOURCE3; do
    for dest in $(find -name "$(basename "$file")"); do
        cp "$file" "$dest"
    done
done
%{?scl_disable}


%build
%if 0%{?fedora}
%{?scl_enable}
# disable replacing config.guess and config.sub from redhat-rpm-config
%global _configure_gnuconfig_hack 0
%configure --docdir=%{_pkgdocdir}
%make_build
%{?scl_disable}
%else
# Use ./configure where rhbz#991613 is not fixed
%{?scl_enable}
./configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
   --bindir=%{_bindir} --datadir=%{_datadir} --libdir=%{_libdir} \
   --docdir=%{_pkgdocdir} --disable-silent-rules
%make_build V=0
%{?scl_disable}
%endif

cp m4/acdir/README README.aclocal
cp contrib/multilib/README README.multilib

%install
%_compat_install

%{?scl_enable}
%make_install
%{?scl_disable}

# %%doc is broken on older RHEL systems so that even if we set --docdir to
# %%_pkgdocdir by configure, procesing of %%doc removes whole %%_pkgdocdir and
# then it is filled by %%doc (relative) files.  This causes that amhello gets
# removed.
mv %{buildroot}/%{_pkgdocdir}/amhello* .
# Fail if non-empty!
rmdir %{buildroot}/%{_pkgdocdir}

%check
# %%global TESTS_FLAGS t/preproc-errmsg t/preproc-basics
%if %{with check}
make -k %{?_smp_mflags} check %{?TESTS_FLAGS: TESTS="%{TESTS_FLAGS}"} \
    || ( cat ./test-suite.log && false )
%endif

%post
/sbin/install-info %{_infodir}/automake.info.gz %{_infodir}/dir || :

%preun
if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/automake.info.gz %{_infodir}/dir || :
fi

%files
%doc AUTHORS README THANKS NEWS README.aclocal README.multilib COPYING*
%doc amhello-1.0.tar.gz
%exclude %{_infodir}/dir
%exclude %{_datadir}/aclocal
%{_bindir}/*
%{_infodir}/*.info*
%{_datadir}/automake-%{api_version}
%{_datadir}/aclocal-%{api_version}
%{_mandir}/man1/*


%changelog
* Fri Oct 12 2018 Pavel Raiskup <praiskup@redhat.com> - 1.16.1-3
- re-enable testsuite

* Fri Oct 12 2018 Pavel Raiskup <praiskup@redhat.com> - 1.16.1-2
- fix testsuite for epel, disable testsuite for bootstrap

* Fri Oct 12 2018 Pavel Raiskup <praiskup@redhat.com> - 1.16.1-1
- sync with rawhide

* Mon Oct 10 2016 Pavel Raiskup <praiskup@redhat.com> - 1.15-7
- BR perl-generators

* Mon Oct 10 2016 Pavel Raiskup <praiskup@redhat.com> - 1.15-6
- bump: rebuild october 2016

* Fri Jun 17 2016 Pavel Raiskup <praiskup@redhat.com> - 1.15-5
- bump

* Wed Aug 12 2015 Pavel Raiskup <praiskup@redhat.com> - 1.15-4
- apply the "curly bracket" patch

* Wed Aug 12 2015 Pavel Raiskup <praiskup@redhat.com> - 1.15-3
- sync with Fedora 24 (rawhide) spec file

* Wed Aug 12 2015 Pavel Raiskup <praiskup@redhat.com> - 1.15-2
- use _compat_el5_build only if defined (rhbz#1252751)

* Tue Jun 23 2015 Pavel Raiskup <praiskup@redhat.com> - 1.15-1
- rebase to latest upstream release

* Tue Jun 09 2015 Pavel Raiskup <praiskup@redhat.com> - 1.14.1-6
- BR perl-Thread-Queue to fix help2man run

* Thu May 29 2014 Pavel Raiskup <praiskup@redhat.com> - 1.14.1-4
- release bump for %%_compat_el5_build

* Tue Mar 25 2014 Pavel Raiskup <praiskup@redhat.com> - 1.14.1-3
- merge fixes for RHEL5 from autotools-git

* Fri Mar 21 2014 Pavel Raiskup <praiskup@redhat.com> - 1.14.1-2
- c&p mistake

* Fri Feb 28 2014 Pavel Raiskup <praiskup@redhat.com> - 1.14.1-1
- copy SCL-ized spec file from autotools-git