summaryrefslogtreecommitdiffstats
path: root/repos/autotools/autotools-git/automake/automake.spec
blob: 76588fa3d4c7483bd03623bca2ebea68f53fd3bf (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
%_compat_el5_build

# this is needed for el5 builders
%global _source_filedigest_algorithm md5

# Workaround to always have %scl defined (for testing locally)

%{!?scl:%global scl autotools-git}

%{?scl:%scl_package automake}

%global api_version 1.99
%global git_tag     904253

# 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}a
Release:    11.%git_tag%{?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

# Disable tests for broken vala installation
# ~> downstream
Patch0:     automake-1.13.1-disable-tests.patch

# Something changed in Perl 5.18 and the testsuite started to fail because
# of random looping in hashes items.  Upstream will probably start sorting of
# hash items by default for this failing case ~> we just don't resist on its
# order for now (only testsuite change).
# ~> Downstream, but proper fix will be pushed:
#    http://lists.gnu.org/archive/html/bug-automake/2013-07/msg00030.html
# ~> http://lists.gnu.org/archive/html/bug-automake/2013-07/msg00022.html
Patch1:     automake-1.14-hash-order-workaround.patch

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)

# This is needed to allow 'help2man' to run 'automake --help' during build.
BuildRequires:   perl(Thread::Queue)

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

%if ! 0%{?buildroot:1}
# HACK!  This should be truth only for RHEL5, so benefit from
# this %%if for defining (otherwise undefined) macro for this platform.
%global rhel 5
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%endif

# run "make check" by default
%bcond_without check

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

BuildRequires: %{scl_prefix}autoconf

# for better tests coverage:
%if %{with check}
#TODO: add libtool from SCL
BuildRequires: gettext-devel flex bison texinfo-tex
%if 0%{?rhel} != 5
BuildRequires: texlive-dvips
%endif
BuildRequires: java-devel-openjdk gcc-gfortran
# /usr/bin/g77 is not in RHEL7
%if !0%{?rhel}
%ifnarch %{arm} aarch64
# g77 is also not present on arm systems
BuildRequires: /usr/bin/g77
%endif
%endif
BuildRequires: dejagnu expect emacs imake python-docutils vala
BuildRequires: cscope ncompress sharutils help2man
BuildRequires: gcc-objc gcc-objc++
%if !0%{?rhel:1}
BuildRequires: python-virtualenv lzip
%if 0%{?fedora} < 21
# gcc-java was disabled in RHEL >= 7 and Fedora >= 21
BuildRequires: gcc-java
%endif
%endif
%endif

# Filtering macros are in perl-macros (fedora) and (perl-devel rhel6), not in
# RHEL5
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
BuildRequires: perl-macros
%else
%if 0%{?rhel} != 5
# There is no macro filtering support on RHEL 5
BuildRequires: perl-devel
%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}
%patch0 -p1 -b .disable_tests
%patch1 -p1 -b .hash_order

# to use this, we should 100% *know* what the patches do
find -exec touch --date=`date -I` {} +

# Fedora only to add ppc64p7 (Power7 optimized) arch:
perl -pi -e "s/ppc64-\*/ppc64-\* \| ppc64p7-\*/" lib/config.sub

%build
# TODO: use %%configure once #991613
scl enable autotools-git - <<EOF
./configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
   --bindir=%{_bindir} --datadir=%{_datadir} --libdir=%{_libdir} \
   --docdir=%{_pkgdocdir} --disable-silent-rules
make V=0 %{?_smp_mflags}
cp m4/acdir/README README.aclocal
cp contrib/multilib/README README.multilib
EOF

%install
%if 0%{?rhel} == 5
rm -rf %{builroot}
%endif

scl enable autotools-git - <<EOF
make install DESTDIR=%{buildroot}
EOF
rm -rf %{buildroot}%{_infodir}/dir

%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 && true )
%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*
%exclude %{_datadir}/aclocal
%{_bindir}/*
%{_infodir}/*.info*
%{_datadir}/automake-%{version}
%{_datadir}/aclocal-%{version}
%{_mandir}/man1/*

%changelog
* Tue Jun 09 2015 Pavel Raiskup <praiskup@redhat.com> - 1.99a-11.904253
- BR perl-Thread-Queue to fix help2man run

* Sun Jun 15 2014 Pavel Raiskup <praiskup@redhat.com> - 1.99a-9.904253
- enable testsuite (don't fail though)
- fix BuildRequires for testsuite

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

* Fri May 23 2014 Pavel Raiskup <praiskup@redhat.com> - 1.99a-6
- rebase for git hash "90425304"

* Mon Mar 24 2014 Pavel Raiskup <praiskup@redhat.com> - 1.99a-5
- fixes for RHEL5

* Fri Mar 21 2014 Pavel Raiskup <praiskup@redhat.com> - 1.99a-4
- require scl-utils and scl-utils-build properly

* Fri Mar 21 2014 Pavel Raiskup <praiskup@redhat.com> - 1.99a-3
- same as autoconf, require perl-devel/perl-macros appropriately

* Fri Mar 21 2014 Pavel Raiskup <praiskup@redhat.com> - 1.99a-2
- most up2date automake requires autoconf 2.65+

* Wed Mar 19 2014 Pavel Raiskup <praiskup@redhat.com> - 1.99a-1
- SCL-ized spec from Rawhide, no testsuite yet