summaryrefslogtreecommitdiffstats
path: root/repos/autotools/autotools-latest/automake/automake.spec
blob: 2284df117541a31a780ac6ed893039317946255a (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
%_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.14

# 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:    4%{?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

Patch2:     automake-1.14.1-autoreconf.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)

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_with 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 texlive-dvips
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}
# gcc-java was disabled in RHEL >= 7
BuildRequires: gcc-java python-virtualenv lzip
%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
%patch2 -p1 -b .autoreconf

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

%changelog
* 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