Accepting request 294652 from home:pluskalm:branches:devel:languages:misc

- 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
This commit is contained in:
Matthias Mailänder 2015-04-07 20:05:32 +00:00 committed by Git OBS Bridge
parent e49bc069ef
commit 42afa5d598
3 changed files with 60 additions and 35 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:5cd6c99b2b1c82fd0c8fffbb350aaf255d484cde43cf5d9b92de1379343b3d7e oid sha256:bd319c0d001e85835c8501ad74c9de0052fe82b8a38b4530f41b49b2af028b9d
size 1046006 size 1093343

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Apr 6 15:00:39 UTC 2015 - mpluskal@suse.com
- Cleanup spec file with spec-cleaner
- Use url for source
- Update info dependencies
- Use macro for locale handling
- Do not create static library
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 16 16:32:55 UTC 2014 - dvlaeev@suse.com Wed Jul 16 16:32:55 UTC 2014 - dvlaeev@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package gnu-cobol (Version 1.1) # spec file for package gnu-cobol
# #
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,19 +15,24 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Summary: A free and open COBOL compiler
Name: gnu-cobol Name: gnu-cobol
Version: 1.1 Version: 1.1
Release: 0 Release: 0
Source: gnu-cobol-1.1.tar.gz Summary: A free and open COBOL compiler
License: GPL-2.0+ License: GPL-2.0+
Group: Development/Languages/Other Group: Development/Languages/Other
Url: http://www.opencobol.org/ Url: http://www.opencobol.org/
Provides: opencobol = %version Source0: ftp://ftp.gnu.org/gnu/gnucobol/gnu-cobol-%{version}.tar.gz
Requires: libcob1 = %version Source1: %{name}.changes
BuildRequires: db-devel gmp-devel ncurses-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch1: types.diff 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 %description
GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler. GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler.
@ -36,8 +41,9 @@ providing full access to nearly all C libraries.
%package -n libcob1 %package -n libcob1
Summary: GNU COBOL shared library Summary: GNU COBOL shared library
Group: Development/Languages/Other
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Languages/Other
%description -n libcob1 %description -n libcob1
GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler. GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler.
cobc translates COBOL to executable using intermediate C sources, cobc translates COBOL to executable using intermediate C sources,
@ -45,39 +51,51 @@ providing full access to nearly all C libraries.
%package -n libcob-devel %package -n libcob-devel
Summary: Include files for GNU COBOL shared library Summary: Include files for GNU COBOL shared library
Group: Development/Languages/Other
License: LGPL-2.1+ License: LGPL-2.1+
Requires: libcob1 = %version Group: Development/Languages/Other
Requires: libcob1 = %{version}
%description -n libcob-devel %description -n libcob-devel
GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler. GNU Cobol (formerly OpenCOBOL) is a free COBOL compiler.
cobc translates COBOL to executable using intermediate C sources, cobc translates COBOL to executable using intermediate C sources,
providing full access to nearly all C libraries. providing full access to nearly all C libraries.
%prep %prep
%setup %setup -q
%patch1 -p1 %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 %build
%configure %configure \
make --enable-static=no
make %{?_smp_mflags}
%install %install
make DESTDIR=%{buildroot} install make DESTDIR=%{buildroot} install %{?_smp_mflags}
# do not ship these
rm %{buildroot}%{_libdir}/libcob.la
%find_lang %name
%post %post
/sbin/install-info %{_infodir}/gnu-cobol.info.gz %{_infodir}/dir %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun %preun
/sbin/install-info --delete %{_infodir}/gnu-cobol.info.gz %{_infodir}/dir %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%post -n libcob1 -p /sbin/ldconfig %post -n libcob1 -p /sbin/ldconfig
%postun -n libcob1 -p /sbin/ldconfig %postun -n libcob1 -p /sbin/ldconfig
%files %files -f %name.lang
%defattr(-,root,root) %defattr(-,root,root)
%doc ABOUT-NLS AUTHORS COPYING COPYING.DOC ChangeLog NEWS README THANKS TODO %doc ABOUT-NLS AUTHORS COPYING COPYING.DOC ChangeLog NEWS README THANKS TODO
%lang(ja) /usr/share/locale/ja/LC_MESSAGES/gnu-cobol.mo
%{_bindir}/cob-config %{_bindir}/cob-config
%{_bindir}/cobc %{_bindir}/cobc
%{_bindir}/cobcrun %{_bindir}/cobcrun
@ -96,7 +114,5 @@ make DESTDIR=%{buildroot} install
%{_includedir}/libcob.h %{_includedir}/libcob.h
%{_includedir}/libcob %{_includedir}/libcob
%{_libdir}/libcob.so %{_libdir}/libcob.so
%{_libdir}/libcob.a
%{_libdir}/libcob.la
%changelog %changelog