OpenCobol 2.0 Spec File CentOS/RedHat 6

OpenCobol 2.0 Spec File CentOS/RedHat 6

 

Name: gnu-cobol
Version: 2.0
Release: 3
Summary: Open Cobol COBOL Compiler
License: General Public License

Source: gnu-cobol-2.0.tar.gz

BuildRequires: gmp
BuildRequires: gmp-devel
BuildRequires: libtool
BuildRequires: ncurses
BuildRequires: ncurses-devel
BuildRequires: ncurses-libs
BuildRequires: libdbi
BuildRequires: libdbi-devel
BuildRequires: libtool-ltdl
BuildRequires: libtool-ltdl-devel
BuildRequires: db4
BuildRequires: db4-devel
BuildRequires: make
BuildRequires: gcc

Requires: gcc db4-devel ncurses-devel gmp-devel

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}


%description
OpenCOBOL is an open-source COBOL compiler, which translates COBOL
programs to C code and compiles it using GCC.

%prep
%setup -q


%build

./configure –prefix=%{_usr} –libdir=%{_libdir}

make
make check

%install

[ “$RPM_BUILD_ROOT” == “/” ] && exit 1

#[ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

# what is this file good for?
rm $RPM_BUILD_ROOT%{_usr}/share/info/dir


%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files

%{_usr}/bin/cob-config
%{_usr}/bin/cobc
%{_usr}/bin/cobcrun
%{_libdir}/libcob.a
%{_libdir}/libcob.la
%{_libdir}/libcob.so
%{_usr}/share/locale/ja/LC_MESSAGES/gnu-cobol.mo
%dir %{_usr}/share/gnu-cobol
%config(noreplace) %{_usr}/share/gnu-cobol/config/bs2000.conf
%config(noreplace) %{_usr}/share/gnu-cobol/config/cobol2002.conf
%config(noreplace) %{_usr}/share/gnu-cobol/config/cobol85.conf
%config(noreplace) %{_usr}/share/gnu-cobol/config/default.conf
%config(noreplace) %{_usr}/share/gnu-cobol/config/ibm.conf
%config(noreplace) %{_usr}/share/gnu-cobol/config/mf.conf
%config(noreplace) %{_usr}/share/gnu-cobol/config/mvs.conf
%{_usr}/share/gnu-cobol/copy/screenio.cpy
%{_usr}/include/libcob.h
%dir %{_usr}/include/libcob/
/usr/include/libcob/cobgetopt.h
/usr/include/libcob/common.h
/usr/include/libcob/exception.def
/usr/lib64/gnu-cobol/CBL_OC_DUMP.so
/usr/lib64/libcob.so.4
/usr/lib64/libcob.so.4.0.0
/usr/share/gnu-cobol/config/acu.conf
/usr/share/gnu-cobol/config/runtime.cfg
/usr/share/gnu-cobol/config/runtime_empty.cfg
/usr/share/gnu-cobol/copy/sqlca.cpy
/usr/share/gnu-cobol/copy/sqlda.cpy
/usr/share/info/gnucobol.info.gz
/usr/share/locale/en@boldquot/LC_MESSAGES/gnu-cobol.mo
/usr/share/locale/en@quot/LC_MESSAGES/gnu-cobol.mo
/usr/share/locale/es/LC_MESSAGES/gnu-cobol.mo
/usr/share/man/man1/cobc.1.gz
/usr/share/man/man1/cobcrun.1.gz

 

%changelog
* Fri Feb 26 2016 Andrew Zwieg <andrew@zwiegnet.com> 2.0.3
– update spec file to compile with 2.0 nightly build
– fix /usr/share/info/dir
– misc cleanup

* Wed Dec 2 2015 Andrew Zwieg <andrew@zwiegnet.com> 1.1-3
– added Sourcs as local, saves bandwidth

* Wed Dec 2 2015 Andrew Zwieg <andrew@zwiegnet.com> 1.1-2
– add "Requires" Packages for CentOS 6
– remove notes about devel packages, it's needed.

* Fri Apr 26 2012 Jason Pyeron <jpyeron@pdinc.us> 1.1-1
– ldconfig script and first release

* Fri Apr 26 2012 Jason Pyeron <jpyeron@pdinc.us> 1.1-0
– initial build of srpm