Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > e5bd6adb3930fd551df867bafea3994c > files > 3

f2c-20080407-2mdv2009.0.src.rpm

%define major		0
%define libname		%mklibname %name %major
%define develname	%mklibname %name -d

Summary:	Fortran to C/C++ converter
Name:		f2c
Version:	20080407
Release:	%{mkrel 2}
License:	MIT
Group:		Development/Other
# Create directory named %{name}-%{version}. Download all files from
# the URL below except libf2c.zip into it. Don't get the msdos or
# mswin directories, do get the src directory. Download libf2c.zip
# directly and use it as Source1. - AdamW 2008/05
Source0:	f2c-%{version}.tar.lzma
Source1:	ftp://ftp.netlib.org/f2c/libf2c.zip
Patch0:		f2c-20080407.patch
URL:		ftp://ftp.netlib.org/f2c/
Buildroot:	%{_tmppath}/%{name}-buildroot
# You need the library and devel package to actually build any code
# produced by f2c, so let's suggest it - AdamW 2008/05
Suggests:	%{develname}

%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.

F2c can also be used (with the -P option) to generate ANSI C header
files for calling Fortran routines from C.

%package -n %{libname}
Summary:	Shared library for %{name}
Group:		System/Libraries
Conflicts:	%{name} < 20080407

%description -n %{libname}
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.

F2c can also be used (with the -P option) to generate ANSI C header
files for calling Fortran routines from C.

%package -n %{develname}
Summary:	Development headers for %{name}
Group:		Development/C
Provides:	%{name}-devel = %{version}-%{release}
Requires:	%{libname} = %{version}-%{release}
Conflicts:	%{name} < 20080407

%description -n %{develname}
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.

F2c can also be used (with the -P option) to generate ANSI C header
files for calling Fortran routines from C.

%prep
rm -rf %{buildroot}
%setup -q
mkdir libf2c
pushd libf2c
unzip %{SOURCE1}
popd
make -C src -f makefile.u xsum.out
%patch0 -p1  -b .tim

%build
%ifarch axp
MFLAG=-mieee
%endif

mkdir -p libf2c/PIC

cp libf2c/makefile.u libf2c/Makefile
cp src/makefile.u src/Makefile
RPM_OPT_FLAGS="%{optflags} -fPIC" make -C src
RPM_OPT_FLAGS="%{optflags} -fPIC" make -C libf2c

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_mandir}/man1 %{buildroot}%{_libdir} %{buildroot}%{_includedir} 
install -m 644 libf2c/libf2c.a %{buildroot}%{_libdir}
install -m 644 f2c.h %{buildroot}%{_includedir}
install -s -m 755 src/f2c %{buildroot}%{_bindir}
install -m 755 fc %{buildroot}%{_bindir}
install -m 644 src/f2c.1t %{buildroot}%{_mandir}/man1/f2c.1
install -m 755 libf2c/libf2c.so.0.22 %{buildroot}%{_libdir}
ln -sf %{_libdir}/libf2c.so.0.22 %{buildroot}%{_libdir}/libf2c.so
 
%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc f2c.ps readme permission disclaimer changes src/Notice

%{_bindir}/*
%{_mandir}/*/*

%files -n %{libname}
%{_libdir}/*.so.%{major}*

%files -n %{develname}
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.*a

%clean
rm -rf %{buildroot}


%changelog
* Thu May 15 2008 Adam Williamson <awilliamson@mandriva.com> 20080407-2mdv2009.0
+ Revision: 207902
- messed up the optflags stuff a bit, fixing
- libify
- rediff and improve patch
- correct license
- spec clean
- new version

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Mon Dec 17 2007 Thierry Vignaud <tvignaud@mandriva.com> 20001107-8mdv2008.1
+ Revision: 131234
- do not try to strip unstripable files
- patch isn't compressed
- kill re-definition of %%buildroot on Pixel's request

  + Nicolas Vigier <nvigier@mandriva.com>
    - bunzip patch
    - Import f2c



* Tue Jan 19 2006 Lenny Cartier <lenny@mandriva.com> 20001107-8mdk
- fixes for x86_64

* Wed May 11 2005 Lenny Cartier <lenny@mandriva.com> 20001107-7mdk
- rebuild

* Mon Feb 23 2004 Lenny Cartier <lenny@mandrakesoft.com> 20001107-6mdk
- rebuild

* Wed Jan 29 2003 Lenny Cartier <lenny@mandrakesoft.com> 20001107-5mdk
- rebuild

* Thu Aug 29 2002 Lenny Cartier <lenny@mandrakesoft.com> 20001107-4mdk
- rebuild

* Fri Jul 06 2001 Lenny Cartier <lenny@mandrakesoft.com> 20001107-3mdk
- rebuild

* Tue Jan 09 2001 Lenny Cartier <lenny@mandrakesoft.com> 20001107-2mdk
- rebuild

* Wed Nov 08 2000 Lenny Cartier <lenny@mandrakesoft.com> 20001107-1mdk
- used helpful srpm from Martin Wilck <martin@tropos.de> :
	- Updated to most recent sources (20001107).
	- Patch of last version still applies.
	- Bzip'ed the sources
	- Use macros for directories.

* Fri Feb 04 2000 Tim Powers <timp@redhat.com>
- fixed so that man pages are gzip'ed

* Tue Nov 9 1999 Tim Powers <timp@redhat.com>
- updated source to 19991109
- quiet setup

* Wed Jul 28 1999 Tim Powers <timp@redhat.com>
- updated source to 19990728
- updated patch
- added %%defattr
- moved changleg to bottom of spec
- built for 6.1

* Tue Apr 27 1999 Bill Nottingham <notting@redhat.com>
- build for powertools

* Tue Mar 30 1999 Alexander L. Belikoff <abel@bfr.co.il>

- upgraded to version 19990326
- adjusted the types in f2c.h for the Alpha
- f2c source is packaged as a .tar.gz file and libf2c inside is already
  extracted - this makes building patches much easier.

* Thu May 07 1998 Prospector System <bugs@redhat.com>

- translations modified for de, fr, tr

* Wed Oct 29 1997 Cristian Gafton <gafton@redhat.com>
- upgraded to version 19970805
- added buildroot; removed libs subpackage and made it obsoleted

* Thu Jul 17 1997 Erik Troan <ewt@redhat.com>
- built against glibc

* Thu Apr 17 1997 Erik Troan <ewt@redhat.com>
- Changed axp tag to alpha

* Fri Apr 11 1997 Michael Fulbright <msf@redhat.com>
- Fixed man page and made it install the troff version in correct place.
- Removed checksum calculation on sources, otherwise we cant patch source!