42afa5d598
- Cleanup spec file with spec-cleaner - Use url for source - Update info dependencies - Use macro for locale handling - Do not create static library OBS-URL: https://build.opensuse.org/request/show/294652 OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/gnu-cobol?expand=0&rev=4
119 lines
3.4 KiB
RPMSpec
119 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package gnu-cobol
|
|
#
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: gnu-cobol
|
|
Version: 1.1
|
|
Release: 0
|
|
Summary: A free and open COBOL compiler
|
|
License: GPL-2.0+
|
|
Group: Development/Languages/Other
|
|
Url: http://www.opencobol.org/
|
|
Source0: ftp://ftp.gnu.org/gnu/gnucobol/gnu-cobol-%{version}.tar.gz
|
|
Source1: %{name}.changes
|
|
Patch1: types.diff
|
|
BuildRequires: db-devel
|
|
BuildRequires: gmp-devel
|
|
BuildRequires: ncurses-devel
|
|
Requires(post): %{install_info_prereq}
|
|
Requires(preun): %{install_info_prereq}
|
|
Provides: opencobol = %{version}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler.
|
|
cobc translates COBOL to executable using intermediate C sources,
|
|
providing full access to nearly all C libraries.
|
|
|
|
%package -n libcob1
|
|
Summary: GNU COBOL shared library
|
|
License: LGPL-2.1+
|
|
Group: Development/Languages/Other
|
|
|
|
%description -n libcob1
|
|
GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler.
|
|
cobc translates COBOL to executable using intermediate C sources,
|
|
providing full access to nearly all C libraries.
|
|
|
|
%package -n libcob-devel
|
|
Summary: Include files for GNU COBOL shared library
|
|
License: LGPL-2.1+
|
|
Group: Development/Languages/Other
|
|
Requires: libcob1 = %{version}
|
|
|
|
%description -n libcob-devel
|
|
GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler.
|
|
cobc translates COBOL to executable using intermediate C sources,
|
|
providing full access to nearly all C libraries.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch1 -p1
|
|
# replace build date with date from changelog
|
|
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE1}")"
|
|
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
|
TIME="\"$(date -d "${modified}" "+%%R")\""
|
|
find . -name '*.[ch]' |\
|
|
xargs sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g"
|
|
|
|
|
|
%build
|
|
%configure \
|
|
--enable-static=no
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
# do not ship these
|
|
rm %{buildroot}%{_libdir}/libcob.la
|
|
|
|
%find_lang %name
|
|
|
|
%post
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
%preun
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
%post -n libcob1 -p /sbin/ldconfig
|
|
|
|
%postun -n libcob1 -p /sbin/ldconfig
|
|
|
|
%files -f %name.lang
|
|
%defattr(-,root,root)
|
|
%doc ABOUT-NLS AUTHORS COPYING COPYING.DOC ChangeLog NEWS README THANKS TODO
|
|
%{_bindir}/cob-config
|
|
%{_bindir}/cobc
|
|
%{_bindir}/cobcrun
|
|
%{_infodir}/gnu-cobol.info.gz
|
|
%{_libdir}/gnu-cobol
|
|
%{_datadir}/gnu-cobol
|
|
|
|
%files -n libcob1
|
|
%defattr(-,root,root)
|
|
%doc COPYING.LIB
|
|
%{_libdir}/libcob.so.1
|
|
%{_libdir}/libcob.so.1.0.0
|
|
|
|
%files -n libcob-devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/libcob.h
|
|
%{_includedir}/libcob
|
|
%{_libdir}/libcob.so
|
|
|
|
%changelog
|