Группа :: Разработка/C
Пакет: f2c
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%define somver 0
%define sover %somver.0.0
Name: f2c
Version: 20200916
Release: alt2
Summary: F2c converts Fortran 77 source code to C/C++ source code
License: %bsdstyle
Group: Development/C
Url: http://www.netlib.org/f2c/
BuildRequires(pre): unzip rpm-build-licenses
Patch: f2c-ALT-build.patch
Patch1: f2c-ALT-MIPS.patch
Patch2: f2c-ALT-RISC-V.patch
Patch3: f2c-ALT-make-MAIN__-weak.patch
Source: http://www.netlib.org/f2c/libf2c.zip
Source2: http://www.netlib.org/f2c/fc
Source4: http://www.netlib.org/f2c/f2c.pdf
Source6: makefile
# http://www.netlib.org/f2c/src/
Source7: src.tgz
Requires: lib%name-ng-devel = %version-%release
%description
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
%package -n lib%name-ng
Summary: Shared library of f2c
Group: Development/C
%description -n lib%name-ng
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
This package contains shared library of f2c.
%package -n lib%name-ng-devel
Summary: Headers of f2c
Group: Development/C
Requires: lib%name-ng = %version-%release
%description -n lib%name-ng-devel
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
This package contains headers of f2c.
%package -n lib%name-ng-devel-static
Summary: Static library of f2c
Group: Development/C
Requires: lib%name-ng-devel = %version-%release
%description -n lib%name-ng-devel-static
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
This package contains static library of f2c.
%package -n lib%name-devel-doc
Summary: Documentation for f2c
Group: Development/Documentation
BuildArch: noarch
%description -n lib%name-devel-doc
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
This package contains development documentation for f2c.
%prep
%setup -c -a7
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
install -p -m644 %SOURCE6 ./
sed -i '19s|(LIBDIR)|%buildroot%_libdir|' makefile
%build
%make_build f2c.h hadd
%make_build MALLOC=malloc.o
%make_build libf2c.so SOMVER=%somver SOVER=%sover
%make_build -C src -f makefile.u
%install
mkdir -p %buildroot%_libdir
%makeinstall_std
%makeinstall_std -C src -f makefile.u
mkdir -p %buildroot%_docdir/%name
install -p -m755 %SOURCE2 %buildroot%_bindir/f2cc
install -p -m644 %SOURCE4 %buildroot%_docdir/%name
bzip2 src/changes
%files
%doc src/README src/Notice
%_bindir/*
%_man1dir/*
%files -n lib%name-ng
%doc README Notice src/changes.bz2
%_libdir/*.so.*
%files -n lib%name-ng-devel
%_includedir/*
%_libdir/*.so
%files -n lib%name-ng-devel-static
%_libdir/*.a
%files -n lib%name-devel-doc
%_docdir/%name
%changelog
…
Полный changelog можно просмотреть здесь
%define sover %somver.0.0
Name: f2c
Version: 20200916
Release: alt2
Summary: F2c converts Fortran 77 source code to C/C++ source code
License: %bsdstyle
Group: Development/C
Url: http://www.netlib.org/f2c/
BuildRequires(pre): unzip rpm-build-licenses
Patch: f2c-ALT-build.patch
Patch1: f2c-ALT-MIPS.patch
Patch2: f2c-ALT-RISC-V.patch
Patch3: f2c-ALT-make-MAIN__-weak.patch
Source: http://www.netlib.org/f2c/libf2c.zip
Source2: http://www.netlib.org/f2c/fc
Source4: http://www.netlib.org/f2c/f2c.pdf
Source6: makefile
# http://www.netlib.org/f2c/src/
Source7: src.tgz
Requires: lib%name-ng-devel = %version-%release
%description
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
%package -n lib%name-ng
Summary: Shared library of f2c
Group: Development/C
%description -n lib%name-ng
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
This package contains shared library of f2c.
%package -n lib%name-ng-devel
Summary: Headers of f2c
Group: Development/C
Requires: lib%name-ng = %version-%release
%description -n lib%name-ng-devel
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
This package contains headers of f2c.
%package -n lib%name-ng-devel-static
Summary: Static library of f2c
Group: Development/C
Requires: lib%name-ng-devel = %version-%release
%description -n lib%name-ng-devel-static
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
This package contains static library of f2c.
%package -n lib%name-devel-doc
Summary: Documentation for f2c
Group: Development/Documentation
BuildArch: noarch
%description -n lib%name-devel-doc
F2c converts Fortran 77 source code in files with names ending in `.f' or `.F' to
C (or C++) source files in the current directory, with `.c' substituted for the
final `.f' or `.F'. If no Fortran files are named, f2c reads Fortran from
standard input and writes C on standard output. File names that end with `.p' or
`.P' are taken to be prototype files, as produced by option `-P', and are read
first.
This package contains development documentation for f2c.
%prep
%setup -c -a7
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
install -p -m644 %SOURCE6 ./
sed -i '19s|(LIBDIR)|%buildroot%_libdir|' makefile
%build
%make_build f2c.h hadd
%make_build MALLOC=malloc.o
%make_build libf2c.so SOMVER=%somver SOVER=%sover
%make_build -C src -f makefile.u
%install
mkdir -p %buildroot%_libdir
%makeinstall_std
%makeinstall_std -C src -f makefile.u
mkdir -p %buildroot%_docdir/%name
install -p -m755 %SOURCE2 %buildroot%_bindir/f2cc
install -p -m644 %SOURCE4 %buildroot%_docdir/%name
bzip2 src/changes
%files
%doc src/README src/Notice
%_bindir/*
%_man1dir/*
%files -n lib%name-ng
%doc README Notice src/changes.bz2
%_libdir/*.so.*
%files -n lib%name-ng-devel
%_includedir/*
%_libdir/*.so
%files -n lib%name-ng-devel-static
%_libdir/*.a
%files -n lib%name-devel-doc
%_docdir/%name
%changelog
…
Полный changelog можно просмотреть здесь