File outcurses.spec of Package outcurses
#
# spec file for package outcurses
#
# Copyright (c) 2020, Martin Hauke <mardnh@gmx.de>
#
# 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 https://bugs.opensuse.org/
#
%global sover 0
Name: outcurses
Version: 0.0.10
Release: 0
Summary: Library for higher-level UI elements atop the NCURSES
License: Apache-2.0
Group: Development/Libraries/C and C++
URL: https://nick-black.com/dankwiki/index.php/Outcurses
#Git-Clone: https://github.com/dankamongmen/outcurses.git
Source: https://github.com/dankamongmen/outcurses/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: outcurses-no-gtest.patch
BuildRequires: cmake >= 3.13
BuildRequires: gcc-c++
%if 0%{?suse_version} > 1500
BuildRequires: gtest
%endif
BuildRequires: pkgconfig
BuildRequires: pkgconfig(ncursesw) >= 6.1
%description
Outcurses provides higher-level UI elements atop the venerable
NCURSES library, including palette feeds and panelreels.
%package -n liboutcurses%{sover}
Summary: Character graphics and TUI library
Group: System/Libraries
%description -n liboutcurses%{sover}
Outcurses provides higher-level UI elements atop the venerable
NCURSES library, including palette feeds and panelreels.
This subpackage contains shared library part of liboutcurses.
%package -n outcurses-devel
Summary: Development files for outcurses
Group: Development/Libraries/C and C++
Requires: liboutcurses%{sover} = %{version}
%description -n outcurses-devel
Outcurses provides higher-level UI elements atop the venerable
NCURSES library, including palette feeds and panelreels.
This subpackage contains libraries and header files for developing
applications that want to make use of liboutcurses.
%package demos
Summary: Demo programs for the outcurses library
Group: Development/Libraries/C and C++
%description demos
Outcurses provides higher-level UI elements atop the venerable
NCURSES library, including palette feeds and panelreels.
This subpackage contains the demo binaries for the outcurses
library.
%prep
%setup -q -n panelreels-%{version}
%if 0%{?suse_version} <= 1500
%patch0 -p1
%endif
%build
export CFLAGS="%{optflags} $(pkg-config --cflags ncursesw) $(pkg-config --libs ncursesw)"
%cmake
%make_build
%install
%cmake_install
%post -n liboutcurses%{sover} -p /sbin/ldconfig
%postun -n liboutcurses%{sover} -p /sbin/ldconfig
%check
%if 0%{?suse_version} > 1500
%make_build -C build test
%endif
%files -n liboutcurses%{sover}
%license COPYING
%doc README.md
%{_libdir}/liboutcurses.so.%{sover}*
%files demos
%{_bindir}/outcurses-demo
%files -n outcurses-devel
%{_includedir}/outcurses.h
%{_libdir}/liboutcurses.so
%{_libdir}/pkgconfig/outcurses.pc
%dir %{_libdir}/cmake/Outcurses
%{_libdir}/cmake/Outcurses/OutcursesConfig.cmake
%{_libdir}/cmake/Outcurses/OutcursesConfigVersion.cmake
%changelog