File mingw64-termcap.spec of Package mingw64-termcap
#
# spec file for package mingw64-termcap
#
# Copyright (c) 2014 SUSE LINUX Products 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: mingw64-termcap
Version: 1.3.1
Release: 0
Summary: MinGW terminal feature database
License: GPL-2.0-or-later
Group: Development/Libraries/C and C++
Url: ftp://ftp.gnu.org/gnu/termcap/
Source0: ftp://ftp.gnu.org/gnu/termcap/termcap-%{version}.tar.gz
BuildRequires: autoconf
#!BuildIgnore: post-build-checks
BuildRequires: mingw64-cross-binutils
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-filesystem
%_mingw64_package_header_debug
BuildArch: noarch
%description
This is the GNU termcap library -- a library of C functions that
enable programs to send control strings to terminals in a way
independent of the terminal type. The GNU termcap library does not
place an arbitrary limit on the size of termcap entries, unlike most
other termcap libraries.
%package -n mingw64-libtermcap0
Summary: MinGW terminal feature database
Group: System/Libraries
Obsoletes: %{name}
Provides: %{name}
%description -n mingw64-libtermcap0
This is the GNU termcap library -- a library of C functions that
enable programs to send control strings to terminals in a way
independent of the terminal type. The GNU termcap library does not
place an arbitrary limit on the size of termcap entries, unlike most
other termcap libraries.
This package contains libraries for the MinGW cross-compiled version.
%package devel
Summary: MinGW terminal feature database (development tools)
Group: Development/Libraries/C and C++
Requires: mingw64-libtermcap0 = %{version}
%description devel
This is the GNU termcap library -- a library of C functions that
enable programs to send control strings to terminals in a way
independent of the terminal type. The GNU termcap library does not
place an arbitrary limit on the size of termcap entries, unlike most
other termcap libraries.
This package contains import libraries and development tools for
the MinGW cross-compiled version.
%_mingw64_debug_package
%prep
%setup -q -n termcap-%{version}
# Packaged script doesn't understand --bindir, so rebuild:
autoconf
%build
%{_mingw64_configure}
make %{?_smp_mflags}
# Build a shared library. No need for -fPIC on Windows.
%{_mingw64_cc} -shared \
-Wl,--out-implib,libtermcap.dll.a \
-o libtermcap-0.dll \
termcap.o tparam.o version.o
%install
make install \
prefix=%{buildroot}%{_mingw64_prefix} \
exec_prefix=%{buildroot}%{_mingw64_prefix} \
libdir=%{buildroot}%{_mingw64_libdir} \
oldincludedir=
# Move the shared library to the correct locations.
mkdir -p %{buildroot}%{_mingw64_bindir}
install -m 0755 libtermcap-0.dll %{buildroot}%{_mingw64_bindir}
install -m 0755 libtermcap.dll.a %{buildroot}%{_mingw64_libdir}
# Don't want the static library, thank you.
rm %{buildroot}%{_mingw64_libdir}/libtermcap.a
# Move the info files to the correct location.
mkdir -p %{buildroot}%{_mingw64_infodir}
mv %{buildroot}%{_mingw64_prefix}/info/* %{buildroot}%{_mingw64_infodir}
%files -n mingw64-libtermcap0
%defattr(-,root,root)
%{_mingw64_bindir}/libtermcap-0.dll
%files devel
%defattr(-,root,root)
%{_mingw64_libdir}/libtermcap.dll.a
%{_mingw64_includedir}/termcap.h
%{_mingw64_infodir}/*
%changelog