%global sover 0.23 Name: f2c Summary: A Fortran 77 to C/C++ conversion program Version: 20160102 Release: 1%{?dist} License: MIT URL: http://www.netlib.org/f2c/ Source0: http://www.netlib.org/f2c/src.tgz Source1: http://www.netlib.org/f2c/libf2c.zip Source2: http://www.netlib.org/f2c/f2c.pdf Source3: http://www.netlib.org/f2c/f2c.ps # Patch makefile to build a shared library Patch0: f2c-20110801.patch Patch1: libf2c-20110801-format-security.patch BuildRequires: gcc unzip Requires: %{name}-libs = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description F2c converts Fortran 77 source code to C or C++ source files. If no Fortran files are named on the command line, f2c can read Fortran from standard input and write C to standard output. %package libs Summary: Dynamic libraries from %{name} %description libs Dynamic libraries from %{name}. %prep %setup -q -c %{name}-%{version} mkdir libf2c unzip -qq %{SOURCE1} -d libf2c %patch0 -p1 %patch1 -p1 # Set library soversion sed -i "s/@SOVER@/%{sover}/" libf2c/makefile.u # PDF and PS documentation cp %{SOURCE2} %{SOURCE3} . %build make -C src -f makefile.u %{?_smp_mflags} CFLAGS="%{optflags}" f2c make -C libf2c -f makefile.u %{?_smp_mflags} CFLAGS="%{optflags} -fPIC" %install install -D -p -m 644 src/f2c.h %{buildroot}%{_includedir}/f2c.h install -D -p -m 755 src/f2c %{buildroot}%{_bindir}/f2c install -D -p -m 644 src/f2c.1t %{buildroot}%{_mandir}/man1/f2c.1 install -D -p -m 755 libf2c/libf2c.so.%{sover} %{buildroot}%{_libdir}/libf2c.so.%{sover} ln -sr %{buildroot}%{_libdir}/libf2c.so.%{sover} %{buildroot}%{_libdir}/libf2c.so.0 ln -sr %{buildroot}%{_libdir}/libf2c.so.%{sover} %{buildroot}%{_libdir}/libf2c.so %ldconfig_scriptlets %files %doc f2c.ps f2c.pdf src/changes src/README %license src/Notice %{_bindir}/f2c %{_mandir}/man1/f2c.1* %{_includedir}/f2c.h %{_libdir}/libf2c.so %files libs %doc libf2c/README %license libf2c/Notice %{_libdir}/libf2c.so.* %changelog * Mon Feb 19 2018 Richard Shaw - 20160102 - Update to 20160102. - Major overhaul on spec file. * Wed Feb 07 2018 Fedora Release Engineering - 20110801-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Aug 02 2017 Fedora Release Engineering - 20110801-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 20110801-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 20110801-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Feb 03 2016 Fedora Release Engineering - 20110801-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 20110801-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Aug 16 2014 Fedora Release Engineering - 20110801-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Fri Jun 13 2014 Yaakov Selkowitz - 20110801-6 - Fix FTBFS with -Werror=format-security (#1037057, #1106245) * Sat Jun 07 2014 Fedora Release Engineering - 20110801-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 20110801-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Feb 13 2013 Fedora Release Engineering - 20110801-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Thu Jul 19 2012 Fedora Release Engineering - 20110801-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sun Apr 08 2012 Carl Byington 20110801-1 - update to newer upstream version - patch from Jaroslav Škarvada for 4 byte ints on x86_64 * Fri Jan 13 2012 Fedora Release Engineering - 20090411-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering - 20090411-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jul 07 2010 Carl Byington 20090411-6 - Subpackage Licensing, move Notice to -libs. * Sun Dec 05 2009 Carl Byington 20090411-5 - fully versioned provides * Sat Dec 05 2009 Carl Byington 20090411-4 - remove -devel subpackage, merge it into the main package which provides -devel and requires -libs. * Sat Dec 05 2009 Carl Byington 20090411-3 - remove patch backups - add comment for patch purpose * Thu Dec 03 2009 Carl Byington 20090411-2 - add symlink to fix rpmlint error - remove unnecessary parts of the patch, which enables building a shared library. - main package now requires -devel since that is needed to be useful. - summary changed to specify this only works on F77 code. - %%files use explicit libf2c rather than * wildcard * Wed Dec 02 2009 Carl Byington 20090411-1 - update to newer upstream version - add .pdf documentation also - trim changelog - move all the license related files into -libs, and both the main package and -devel require -libs, to avoid either duplicating files or installing any package without the license files. * Sun Nov 25 2009 Carl Byington 20031026-3.0.3 - don't install the static library. - preserve the alpha architecture patch and ifdef in the spec file even if it is not used by fedora. - split off -libs and -devel packages. - full version/release in requires * Wed Nov 25 2009 Carl Byington 20031026-3.0.2 - convert to fedora compatible spec file. * Sat Jun 14 2008 Axel Thimm - 20031026-3.0.1 - Fix not utf-8 specfile entries.