SHA256
1
0
forked from pool/finalcut
finalcut/finalcut.spec
Michael Vetter 9926be087e Accepting request 765999 from home:lnussel:branches:devel:libraries:c_c++
- libfinal-devel needs to require ncurses-devel and gpm-devel as some header
  files include files from those
- install built examples so libfinal-examples can be tried directly
- add package for the special font

OBS-URL: https://build.opensuse.org/request/show/765999
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/finalcut?expand=0&rev=27
2020-01-21 10:06:11 +00:00

172 lines
6.1 KiB
RPMSpec

#
# spec file for package finalcut
#
# Copyright (c) 2019 by Markus Gans
#
# 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/
#
%define sover 0
Name: finalcut
Version: 0.6.0
Release: 0
Summary: Console widget library
License: LGPL-3.0-or-later
Group: Development/Libraries/C and C++
URL: https://github.com/gansm/finalcut/
Source: https://github.com/gansm/finalcut/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: 0001-arm-glibc-2.30.patch
BuildRequires: autoconf
BuildRequires: autoconf-archive
BuildRequires: automake
BuildRequires: fontpackages-devel
BuildRequires: gcc-c++ >= 5.1
BuildRequires: gdb
BuildRequires: glib2-devel
BuildRequires: gpm-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
%description
FINAL CUT is a class library and widget toolkit with full mouse
support for creating a text-based user interface. The library supports
the programmer to develop an application for the text console. It allows
the simultaneous handling of multiple windows on the screen.
The C++ class design was inspired by the Qt framework. It provides
common controls like dialog windows, push buttons, check boxes,
radio buttons, input lines, list boxes, status bars and so on.
%package -n libfinal-devel
Summary: Development files for the FINAL CUT text widget library
Group: Development/Libraries/C and C++
Requires: bdftopcf
Requires: coreutils
Requires: gcc-c++ >= 5.1
Requires: gpm-devel
Requires: grep
Requires: gzip
Requires: libfinal%{sover} = %{version}
Requires: ncurses-devel
Requires: sed
Requires: vim
Provides: finalcut-devel = %{version}
Obsoletes: finalcut-devel < %{version}
Recommends: %{name}-examples = %{version}
%description -n libfinal-devel
FINAL CUT is a class library and widget toolkit with full mouse
support for creating a text-based user interface. The library supports
the programmer to develop an application for the text console. It allows
the simultaneous handling of multiple windows on the screen.
The C++ class design was inspired by the Qt framework. It provides
common controls like dialog windows, push buttons, check boxes,
radio buttons, input lines, list boxes, status bars and so on.
%package -n libfinal-examples
Summary: Example files for the FINAL CUT library
Group: Development/Languages/C and C++
Provides: finalcut-examples = %{version}
Obsoletes: finalcut-examples < %{version}
%description -n libfinal-examples
FINAL CUT is a class library and widget toolkit with full mouse
support for creating a text-based user interface. The library supports
the programmer to develop an application for the text console. It allows
the simultaneous handling of multiple windows on the screen.
The C++ class design was inspired by the Qt framework. It provides
common controls like dialog windows, push buttons, check boxes,
radio buttons, input lines, list boxes, status bars and so on.
%package -n libfinal%{sover}
Summary: Console widget toolkit
Group: System/Libraries
%description -n libfinal%{sover}
FINAL CUT is a class library and widget toolkit with full mouse
support for creating a text-based user interface. The library supports
the programmer to develop an application for the text console. It allows
the simultaneous handling of multiple windows on the screen.
The C++ class design was inspired by the Qt framework. It provides
common controls like dialog windows, push buttons, check boxes,
radio buttons, input lines, list boxes, status bars and so on.
%package bitmap-fonts
Summary: Bitmap fonts for finalcut
Group: System/X11/Fonts
Requires(pre): fontconfig
# install the fonts only if we have X11 fonts anyways
Supplements: packageand(libfinal%{sover}:xorg-x11-fonts-core)
BuildArch: noarch
%description bitmap-fonts
This package include a special font uses by the FINAL CUT text
widget toolkit
%prep
%setup -q
%patch0 -p1
%build
autoreconf -vif
export CPPFLAGS="%{optflags} -Wall -Wextra -Wpedantic"
%ifnarch %ix86 x86_64
export CPPFLAGS="$CPPFLAGS -Wno-error=unused-parameter"
%endif
%configure --disable-static
make %{?_smp_mflags} V=1
%install
make install libdir=%{buildroot}%{_libdir}/ \
includedir=%{buildroot}%{_includedir} \
bindir=%{buildroot}%{_bindir} \
docdir=%{buildroot}%{_docdir}/%{name}/ \
fontdir=%{buildroot}%{_miscfontsdir}/%{name}/
mkdir -p %{buildroot}%{_miscfontsdir}/%{name}/
mkdir -p %{buildroot}%{_docdir}/%{name}
mkdir -p %{buildroot}%{_libdir}/%{name}/examples
cp -p examples/.libs/* %{buildroot}%{_libdir}/%{name}/examples
cp -p examples/*.cpp %{buildroot}%{_libdir}/%{name}/examples
cp -p examples/Makefile.clang %{buildroot}%{_libdir}/%{name}/examples
cp -p examples/Makefile.gcc %{buildroot}%{_libdir}/%{name}/examples
rm -f %{buildroot}%{_libdir}/libfinal.la
rm %{buildroot}%{_docdir}/%{name}/ChangeLog %{buildroot}%{_docdir}/%{name}/COPYING.LESSER
%post -n libfinal%{sover} -p /sbin/ldconfig
%postun -n libfinal%{sover} -p /sbin/ldconfig
%reconfigure_fonts_scriptlets -n %{name}-bitmap-fonts
%files -n libfinal-devel
%if 0%{?sle_version} > 120200 || 0%{?suse_version} > 1500
%license COPYING.LESSER
%else
%doc COPYING.LESSER
%endif
%doc ChangeLog README.md
%exclude %{_docdir}/%{name}/examples
%{_docdir}/%{name}
%{_libdir}/libfinal.so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/final
%files -n libfinal-examples
%{_libdir}/%{name}
%files -n libfinal%{sover}
%{_libdir}/libfinal.so.*
%files bitmap-fonts
%{_miscfontsdir}
%changelog