summaryrefslogtreecommitdiffstats
path: root/repos/autotools/autotools-latest/libtool/libtool.spec
blob: e74daf99fd6a0ecc9049394448012bd10e03ed09 (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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
%{?_compat_el5_build}
%{!?scl:%global scl autotools-latest}
%{?sclize_package}

%{?scl:%global __provides_exclude ^libltdl\\.so.*$}

# See the bug #1289759
%undefine _hardened_build

# See the bug #429880
%global gcc_version  %(gcc -dumpversion || echo "666")

%{?scl:%scl_package libtool}

%{!?runselftest:%global runselftest     1}
%{!?autoreconf:%global  autoreconf      0}

Summary: The GNU Portable Library Tool
Name:    %{?scl_prefix}libtool
Version: 2.4.6
Release: 1%{?dist}
License: GPLv2+ and LGPLv2+ and GFDL
URL:     http://www.gnu.org/software/libtool/
Group:   Development/Tools

Source:  http://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.gz

# ~> downstream
Patch0:  libtool-2.4.5-rpath.patch

# Patch to use generated files by newer autotools (this allows us to build the
# package without running autoreconf during build)
Patch2:  libtool-2.4.6-autoreconf.patch

# /usr/bin/libtool includes paths within gcc's versioned directories
# Libtool must be rebuilt whenever a new upstream gcc is built
Requires: gcc = %{gcc_version}
Requires: %{scl_prefix}autoconf, %{scl_prefix}automake, sed, tar, findutils
Requires(post):  /sbin/install-info
Requires(preun): /sbin/install-info

BuildRequires: help2man
BuildRequires: texinfo
%if 0%{?autoreconf}
BuildRequires: %{scl_prefix}autoconf, %{scl_prefix}automake
%endif

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

# make sure we can configure all supported langs
BuildRequires: libstdc++-devel, gcc-gfortran


%description
GNU Libtool is a set of shell scripts which automatically configure UNIX and
UNIX-like systems to generically build shared libraries. Libtool provides a
consistent, portable interface which simplifies the process of using shared
libraries.

If you are developing programs which will use shared libraries, but do not use
the rest of the GNU Autotools (such as GNU Autoconf and GNU Automake), you
should install the libtool package.

The libtool package also includes all files needed to integrate the GNU
Portable Library Tool (libtool) and the GNU Libtool Dynamic Module Loader
(ltdl) into a package built using the GNU Autotools (including GNU Autoconf
and GNU Automake).


%package ltdl
Summary:  Runtime libraries for GNU Libtool Dynamic Module Loader
Group:    System Environment/Libraries
Provides: %{?scl_prefix}%{name}-libs%{_isa} = %{version}-%{release}
License:  LGPLv2+
Requires(post):  /sbin/ldconfig
Requires(postun):  /sbin/ldconfig
%{?scl:Requires:%scl_runtime}

%description ltdl
The libtool-ltdl package contains the GNU Libtool Dynamic Module Loader, a
library that provides a consistent, portable interface which simplifies the
process of using dynamic modules.

These runtime libraries are needed by programs that link directly to the
system-installed ltdl libraries; they are not needed by software built using
the rest of the GNU Autotools (including GNU Autoconf and GNU Automake).


%package ltdl-devel
Summary: Tools needed for development using the GNU Libtool Dynamic Module Loader
Group:    Development/Libraries
Requires: %{name}-ltdl = %{version}-%{release}
License:  LGPLv2+
%{?scl:Requires:%scl_runtime}

%description ltdl-devel
Static libraries and header files for development with ltdl.


%prep
%setup -q -n libtool-%version

%patch0 -p1 -b .rpath

%if 0%{?autoreconf}
%{?scl_heredoc}
autoreconf -v
%{?scl_heredoc_off}
%else
%patch2 -p1 -b .autoreconfed
# to use this, we should 100% *know* what the patches do
find -exec touch --date=`date -I` {} +
%endif



%build
%{?scl_heredoc}
export CC=gcc
export CXX=g++
export F77=gfortran
export CFLAGS="$RPM_OPT_FLAGS -fPIC"

# rhbz#1214506
%global _configure_libtool_hardening_hack 0

%configure  --prefix=%{_prefix}                 \
            --exec-prefix=%{_prefix}            \
            --bindir=%{_bindir}                 \
            --sbindir=%{_sbindir}               \
            --sysconfdir=%{_sysconfdir}         \
            --datadir=%{_datadir}               \
            --includedir=%{_includedir}         \
            --libdir=%{_libdir}                 \
            --libexecdir=%{_libexecdir}         \
            --localstatedir=%{_localstatedir}   \
            --mandir=%{_mandir}                 \
            --infodir=%{_infodir}

make %{?_smp_mflags}
%{?scl_heredoc_off}


%check
%if 0%{?runselftest}
make check VERBOSE=yes || { cat tests/testsuite.log ; true ; }
%endif


%install
%{?scl_heredoc}
%_compat_install
make install DESTDIR=%{buildroot}
# info's TOP dir (by default owned by info)
rm -f %{buildroot}%{_infodir}/dir
# *.la *.a files generated by libtool shouldn't be distributed (and the
# `./configure --disable-static' breaks testsuite)
rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%{?scl_heredoc_off}

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


%post ltdl -p /sbin/ldconfig


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


%postun ltdl -p /sbin/ldconfig


%files
%doc AUTHORS COPYING NEWS README THANKS TODO ChangeLog*
%{_infodir}/libtool.info*.gz
%{_mandir}/man1/libtool.1*
%{_mandir}/man1/libtoolize.1*
%{_bindir}/libtool
%{_bindir}/libtoolize
%{_datadir}/aclocal/*.m4
%dir %{_datadir}/libtool
%{_datadir}/libtool/build-aux


%files ltdl
%doc libltdl/COPYING.LIB
%{_libdir}/libltdl.so.*


%files ltdl-devel
%doc libltdl/README
%{_datadir}/libtool
%exclude %{_datadir}/libtool/build-aux
%{_includedir}/ltdl.h
%{_includedir}/libltdl
# .so files without version must be in -devel subpackage
%{_libdir}/libltdl.so


%changelog
* Fri Jun 17 2016 Pavel Raiskup <praiskup@redhat.com> - 2.4.6-12
- rebase and rebuild for new gcc, sync with fedora rawhide

* Tue Jun 14 2016 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-17
- rebuild for new gcc versions

* Wed Dec 16 2015 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-16
- rebuild for new gcc 5.3.1 in f22

* Mon Dec 14 2015 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-15
- filter provides only if %%scl is defined

* Mon Dec 14 2015 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-14
- do not provide libltdl.so, that breaks initial buildroot

* Sun Dec 13 2015 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-13
- make sure collection is enabled during %%install

* Sun Dec 13 2015 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-11
- bump for new gcc in f22+

* Wed Aug 12 2015 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-10
- help2man BR

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

* Sat Feb 07 2015 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-8
- rebuild for new gcc rawhide

* Fri Dec 19 2014 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-7
- rebuild for the new gcc

* Sun Jul 13 2014 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-6
- rebuild for new gcc in F19, second try

* Fri Jul 11 2014 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-5
- rebuild for new gcc in F19

* Sat Jun 28 2014 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-4
- rebuild for new gcc 4.8.3
- gcc-java removed from Fedora completely (#1106080)

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

* Tue Mar 25 2014 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-2
- RHEL5 fixes

* Fri Mar 21 2014 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-1
- copy SCL-ized spec from autotools-git