| 1 | # Note: this .spec is borrowed from libtool-2.4.2-21.fc20.src.rpm | 
|---|
| 2 |  | 
|---|
| 3 | %global gcc_version 4.9.2 | 
|---|
| 4 |  | 
|---|
| 5 | Summary: The GNU Portable Library Tool | 
|---|
| 6 | Name:    libtool | 
|---|
| 7 | Version: 2.4.6 | 
|---|
| 8 | Release: 1%{?dist} | 
|---|
| 9 | License: GPLv2+ and LGPLv2+ and GFDL | 
|---|
| 10 | URL:     http://www.gnu.org/software/libtool/ | 
|---|
| 11 | Group:   Development/Tools | 
|---|
| 12 |  | 
|---|
| 13 | #Source:  http://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz | 
|---|
| 14 |  | 
|---|
| 15 | %define svn_url     http://svn.netlabs.org/repos/ports/libtool/trunk | 
|---|
| 16 | %define svn_rev     1070 | 
|---|
| 17 |  | 
|---|
| 18 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip | 
|---|
| 19 |  | 
|---|
| 20 | BuildRequires: gcc make subversion zip | 
|---|
| 21 |  | 
|---|
| 22 | # @todo Replace with `%info_requires` when it's available. | 
|---|
| 23 | Requires(post): %{_sbindir}/install-info.exe | 
|---|
| 24 | Requires(preun): %{_sbindir}/install-info.exe | 
|---|
| 25 |  | 
|---|
| 26 | BuildRequires: autoconf, automake | 
|---|
| 27 | #BuildRequires: texinfo | 
|---|
| 28 | Requires: autoconf, automake, sed, tar | 
|---|
| 29 |  | 
|---|
| 30 | # make sure we can configure all supported langs | 
|---|
| 31 | #BuildRequires: libstdc++-devel, gcc-gfortran | 
|---|
| 32 |  | 
|---|
| 33 | # /usr/bin/libtool includes paths within gcc's versioned directories | 
|---|
| 34 | # Libtool must be rebuilt whenever a new upstream gcc is built | 
|---|
| 35 | Requires: gcc >= %{gcc_version} | 
|---|
| 36 | Requires: gcc <= %{gcc_version}.999 | 
|---|
| 37 |  | 
|---|
| 38 | %description | 
|---|
| 39 | GNU Libtool is a set of shell scripts which automatically configure UNIX and | 
|---|
| 40 | UNIX-like systems to generically build shared libraries. Libtool provides a | 
|---|
| 41 | consistent, portable interface which simplifies the process of using shared | 
|---|
| 42 | libraries. | 
|---|
| 43 |  | 
|---|
| 44 | If you are developing programs which will use shared libraries, but do not use | 
|---|
| 45 | the rest of the GNU Autotools (such as GNU Autoconf and GNU Automake), you | 
|---|
| 46 | should install the libtool package. | 
|---|
| 47 |  | 
|---|
| 48 | The libtool package also includes all files needed to integrate the GNU | 
|---|
| 49 | Portable Library Tool (libtool) and the GNU Libtool Dynamic Module Loader | 
|---|
| 50 | (ltdl) into a package built using the GNU Autotools (including GNU Autoconf | 
|---|
| 51 | and GNU Automake). | 
|---|
| 52 |  | 
|---|
| 53 | %package ltdl | 
|---|
| 54 | Summary:  Runtime libraries for GNU Libtool Dynamic Module Loader | 
|---|
| 55 | Group:    System Environment/Libraries | 
|---|
| 56 | Provides: %{name}-libs = %{version}-%{release} | 
|---|
| 57 | License:  LGPLv2+ | 
|---|
| 58 |  | 
|---|
| 59 | %description ltdl | 
|---|
| 60 | The libtool-ltdl package contains the GNU Libtool Dynamic Module Loader, a | 
|---|
| 61 | library that provides a consistent, portable interface which simplifies the | 
|---|
| 62 | process of using dynamic modules. | 
|---|
| 63 |  | 
|---|
| 64 | These runtime libraries are needed by programs that link directly to the | 
|---|
| 65 | system-installed ltdl libraries; they are not needed by software built using | 
|---|
| 66 | the rest of the GNU Autotools (including GNU Autoconf and GNU Automake). | 
|---|
| 67 |  | 
|---|
| 68 | %package ltdl-devel | 
|---|
| 69 | Summary: Tools needed for development using the GNU Libtool Dynamic Module Loader | 
|---|
| 70 | Group:    Development/Libraries | 
|---|
| 71 | Requires: %{name}-ltdl = %{version}-%{release} | 
|---|
| 72 | License:  LGPLv2+ | 
|---|
| 73 |  | 
|---|
| 74 | %description ltdl-devel | 
|---|
| 75 | Static libraries and header files for development with ltdl. | 
|---|
| 76 |  | 
|---|
| 77 | %package debug | 
|---|
| 78 | Summary: HLL debug data for exception handling support. | 
|---|
| 79 |  | 
|---|
| 80 | %description debug | 
|---|
| 81 | HLL debug data for exception handling support. | 
|---|
| 82 |  | 
|---|
| 83 | %prep | 
|---|
| 84 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} | 
|---|
| 85 | %setup -q | 
|---|
| 86 | %else | 
|---|
| 87 | %setup -n "%{name}-%{version}" -Tc | 
|---|
| 88 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force | 
|---|
| 89 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" | 
|---|
| 90 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") | 
|---|
| 91 | %endif | 
|---|
| 92 |  | 
|---|
| 93 | # Make sure configure is updated to properly support OS/2 | 
|---|
| 94 | export PATH=`echo $PATH | tr '\\\\' /` | 
|---|
| 95 | ./bootstrap --copy --force --skip-git | 
|---|
| 96 |  | 
|---|
| 97 | # Restore .version and ChangeLog as they are not properly regenerated (they need .git) | 
|---|
| 98 | rm -f .version ChangeLog | 
|---|
| 99 | mv .version~ .version | 
|---|
| 100 | mv ChangeLog~ ChangeLog | 
|---|
| 101 |  | 
|---|
| 102 | %build | 
|---|
| 103 |  | 
|---|
| 104 | %configure  --prefix=%{_prefix}                 \ | 
|---|
| 105 | --exec-prefix=%{_prefix}            \ | 
|---|
| 106 | --bindir=%{_bindir}                 \ | 
|---|
| 107 | --sbindir=%{_sbindir}               \ | 
|---|
| 108 | --sysconfdir=%{_sysconfdir}         \ | 
|---|
| 109 | --datadir=%{_datadir}               \ | 
|---|
| 110 | --includedir=%{_includedir}         \ | 
|---|
| 111 | --libdir=%{_libdir}                 \ | 
|---|
| 112 | --libexecdir=%{_libexecdir}         \ | 
|---|
| 113 | --localstatedir=%{_localstatedir}   \ | 
|---|
| 114 | --mandir=%{_mandir}                 \ | 
|---|
| 115 | --infodir=%{_infodir} | 
|---|
| 116 |  | 
|---|
| 117 | ## build not smp safe: | 
|---|
| 118 | make # %%{?_smp_mflags} | 
|---|
| 119 |  | 
|---|
| 120 | #for i in ChangeLog.1997 ChangeLog.1998 ChangeLog.1999 ChangeLog.2002; do | 
|---|
| 121 | #  iconv -f ISO_8859-15 -t UTF8 $i > $i.tmp | 
|---|
| 122 | #  mv -f $i.tmp $i | 
|---|
| 123 | #done | 
|---|
| 124 |  | 
|---|
| 125 | #%check | 
|---|
| 126 | #make check VERBOSE=yes | 
|---|
| 127 |  | 
|---|
| 128 | %install | 
|---|
| 129 | rm -rf ${buildroot} | 
|---|
| 130 | make install DESTDIR=%{buildroot} | 
|---|
| 131 |  | 
|---|
| 132 | # info's TOP dir (by default owned by info) | 
|---|
| 133 | rm -f %{buildroot}%{_infodir}/dir | 
|---|
| 134 | # *.la *.a files generated by libtool shouldn't be distributed (and the | 
|---|
| 135 | # `./configure --disable-static' breaks testsuite) | 
|---|
| 136 | rm -f %{buildroot}%{_libdir}/libltdl.la | 
|---|
| 137 | rm -f %{buildroot}%{_libdir}/ltdl.a | 
|---|
| 138 |  | 
|---|
| 139 | %post | 
|---|
| 140 | # @todo Replace with `%info_post foobar.info` when it's available. | 
|---|
| 141 | if [ -f %{_infodir}/libtool.info ]; then | 
|---|
| 142 | %{_sbindir}/install-info.exe %{_infodir}/libtool.info %{_infodir}/dir || : | 
|---|
| 143 | fi | 
|---|
| 144 |  | 
|---|
| 145 | %preun | 
|---|
| 146 | # @todo Replace with `%info_preun foobar.info` when it's available. | 
|---|
| 147 | if [ $1 -eq 0 ]; then | 
|---|
| 148 | if [ -f %{_infodir}/libtool.info ]; then | 
|---|
| 149 | %{_sbindir}/install-info.exe --delete %{_infodir}/libtool.info %{_infodir}/dir || : | 
|---|
| 150 | fi | 
|---|
| 151 | fi | 
|---|
| 152 |  | 
|---|
| 153 | %files | 
|---|
| 154 | %defattr(-,root,root) | 
|---|
| 155 | %doc AUTHORS COPYING NEWS README THANKS TODO ChangeLog* | 
|---|
| 156 | %{_infodir}/libtool.info* | 
|---|
| 157 | %{_mandir}/man1/libtool.1* | 
|---|
| 158 | %{_mandir}/man1/libtoolize.1* | 
|---|
| 159 | %{_bindir}/libtool | 
|---|
| 160 | %{_bindir}/libtoolize | 
|---|
| 161 | %{_datadir}/aclocal/*.m4 | 
|---|
| 162 | %exclude %{_datadir}/libtool/libltdl | 
|---|
| 163 | %{_datadir}/libtool | 
|---|
| 164 |  | 
|---|
| 165 | %files ltdl | 
|---|
| 166 | %defattr(-,root,root) | 
|---|
| 167 | %doc libltdl/COPYING.LIB | 
|---|
| 168 | %{_libdir}/ltdl*.dll | 
|---|
| 169 |  | 
|---|
| 170 | %files ltdl-devel | 
|---|
| 171 | %defattr(-,root,root) | 
|---|
| 172 | %doc libltdl/README | 
|---|
| 173 | %{_datadir}/libtool/libltdl | 
|---|
| 174 | %{_includedir}/ltdl.h | 
|---|
| 175 | %{_includedir}/libltdl | 
|---|
| 176 | # Import libraries must be in -devel subpackage | 
|---|
| 177 | %{_libdir}/ltdl*_dll.a | 
|---|
| 178 |  | 
|---|
| 179 | %files debug | 
|---|
| 180 | %defattr(-,root,root) | 
|---|
| 181 | %{_libdir}/*.dbg | 
|---|
| 182 |  | 
|---|
| 183 | %changelog | 
|---|
| 184 | * Tue Feb 17 2015 Dmitriy Kuminov <coding@dmik.org> 2.4.6-1 | 
|---|
| 185 | - Update to version 2.4.6 from vendor. | 
|---|
| 186 |  | 
|---|
| 187 | * Tue Jan 23 2015 yd | 
|---|
| 188 | - rebuild for gcc 4.9.2. | 
|---|
| 189 |  | 
|---|
| 190 | * Tue Jan 13 2015 Dmitriy Kuminov <coding@dmik.org> 2.4.2-8 | 
|---|
| 191 | - Support -release option on OS/2. | 
|---|
| 192 | - Use response files for long command lines when linking DLLs on OS/2. | 
|---|
| 193 |  | 
|---|
| 194 | * Fri Oct 31 2014 Dmitriy Kuminov <coding@dmik.org> 2.4.2-7 | 
|---|
| 195 | - Rename -os2dllname switch to -shortname (old one is still | 
|---|
| 196 | supported for backward compatibility). | 
|---|
| 197 | - Always set allow_undefined to no on OS/2. | 
|---|
| 198 | - Fix setting BEGINLIBPATH in execute mode on OS/2. | 
|---|
| 199 | - Support -version-number on OS/2. | 
|---|
| 200 |  | 
|---|
| 201 | * Tue Oct 3 2014 Dmitriy Kuminov <coding@dmik.org> 2.4.2-6 | 
|---|
| 202 | - Generate proper DLL version suffix (CURRNENT - AGE). | 
|---|
| 203 |  | 
|---|
| 204 | * Tue Sep 30 2014 Dmitriy Kuminov <coding@dmik.org> 2.4.2-5 | 
|---|
| 205 | - Fix weird typo breaking correct OS/2 DLL name generation | 
|---|
| 206 | in some cases. | 
|---|
| 207 |  | 
|---|
| 208 | * Thu Sep 04 2014 yd | 
|---|
| 209 | - added debug package with symbolic info for exceptq. | 
|---|
| 210 |  | 
|---|
| 211 | * Wed Sep 3 2014 Dmitriy Kuminov <coding@dmik.org> 2.4.2-3 | 
|---|
| 212 | - Rebuild with autoconf 2.69-2. | 
|---|
| 213 | - Use /@unixroot in generated files instead of absolute paths to | 
|---|
| 214 | compiler files. | 
|---|
| 215 |  | 
|---|
| 216 | * Mon Sep 1 2014 Dmitriy Kuminov <coding@dmik.org> 2.4.2-2 | 
|---|
| 217 | - Fix PATH_SEPARATOR detection in libtoolize. | 
|---|
| 218 |  | 
|---|
| 219 | * Sun Aug 31 2014 Dmitriy Kuminov <coding@dmik.org> 2.4.2-1 | 
|---|
| 220 | - Initial package for version 2.4.2. | 
|---|