File fox17.spec of Package fox17
#
# spec file for package fox17
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%define lname libFOX-1_7-0
%define _fox_version 1.7.84
%define _adie_version 3.5.0
%define _shutterbug_version 3.1.0
%define _calculator_version 2.2.0
%define _pathfinder_version 2.1.0
%define _controlpanel_version 1.1.0
Name: fox17
Version: %{_fox_version}
Release: 0
Summary: The FOX graphical toolkit
License: LGPL-3.0-or-later
Group: Development/Languages/C and C++
URL: http://www.fox-toolkit.org/
Source: http://ftp.fox-toolkit.org/pub/fox-%{version}.tar.xz
Source1: calculator.png
Source2: pathfinder.png
Source3: adie.png
Source4: fox17-rpmlintrc
Source5: adie.desktop
Source6: calculator.desktop
Source7: pathfinder.desktop
Patch0: fox-1.7-remove_date_from_adie.patch
Patch1: fox-1.7-remove_date_from_pathfinder.patch
BuildRequires: autoconf >= 2.62
BuildRequires: bzip2
BuildRequires: cups-devel
BuildRequires: doxygen
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: glibc-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: zlib-devel
BuildRequires: glu-devel
#
# SUSE Requires
#
%if 0%{?suse_version}
BuildRequires: freeglut-devel
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-Mesa-devel
%if 0%{?suse_version} > 01503
BuildRequires: pkgconfig(xorg-server)
BuildRequires: pkgconfig(xft)
%else
BuildRequires: xorg-x11-devel
%endif
%endif
#
# Mandriva Requires
#
%if 0%{?mandriva_version}
BuildRequires: cups
BuildRequires: cups-common
BuildRequires: libmesaglu-devel
BuildRequires: libxext-devel
BuildRequires: libxft-devel
BuildRequires: libxi-devel
BuildRequires: xorg-x11
%endif
#
# Fedora Requires
#
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: libGLU-devel
BuildRequires: libXext-devel
BuildRequires: libXft-devel
BuildRequires: libXi-devel
BuildRequires: xorg-x11-devel
%endif
%description
FOX is a C++-based library for graphical user interface development.
FOX supports modern GUI features such as drag-and-drop, tooltips, tab
books, tree lists, icons, multiple document interfaces (MDI), timers,
idle processing, automatic GUI updating, as well as OpenGL/Mesa for 3D
graphics. Subclassing of basic FOX widgets allows for easy extension
beyond the built-in widgets by application writers.
%package -n %{lname}
Summary: Shared libraries for the FOX toolkit 1.7
Group: System/Libraries
Provides: fox = %{version}-%{release}
# Added O/P in 13.2
Provides: libfox1_7 = %{version}-%{release}
Obsoletes: libfox1_7 < %{version}-%{release}
%description -n %{lname}
This package contains just the shared libraries for FOX 1.7 based
applications.
%package devel
Summary: Development Files and Documentation for the FOX GUI Toolkit 1.7
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}
Requires: %{name} = %{version}
Requires: libbz2-devel
Requires: libjpeg-devel
Requires: libpng-devel
Requires: libtiff-devel
Requires: cups-devel
# file "fox-config" is present in both
Conflicts: fox16-devel
Provides: fox-devel = %{version}-%{release}
%if 0%{?suse_version}
Requires: Mesa-devel
Requires: xorg-x11-libX11-devel
Requires: xorg-x11-libXau-devel
Requires: xorg-x11-libXdmcp-devel
Requires: xorg-x11-libXext-devel
Requires: xorg-x11-libXfixes-devel
Requires: xorg-x11-libXrender-devel
%endif
%if 0%{?suse_version} >= 1320
Requires: fontconfig-devel
Requires: freetype2-devel
Requires: glu-devel
Requires: libICE-devel
Requires: libSM-devel
Requires: libX11-devel
Requires: libXcursor-devel
Requires: libXext-devel
Requires: libXfixes-devel
Requires: libXft-devel
Requires: libXi-devel
Requires: libXrandr-devel
Requires: libXrender-devel
Requires: libjpeg8-devel
Requires: libpng16-compat-devel
Requires: zlib-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description devel
FOX is a C++-based library for graphical user interface development.
The devel package contains the files necessary to develop applications
using the FOX GUI toolkit: the header files, the reswrap resource
compiler, and manual pages.
%package devel-static
Summary: A version of the FOX GUI toolkit for static linking
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
%description devel-static
The fox-static package contains the files necessary to link applications
to the FOX GUI toolkit statically (rather than dynamically). Statically
linked applications do not require the library to be installed on the system
running the application.
%package doc
Summary: Documentation for the FOX Toolkit 1.7
Group: Documentation/HTML
BuildArch: noarch
%description doc
FOX is a C++-based library for graphical user interface development.
The doc subpackage contains the HTML documentation to the FOX toolkit 1.7.
%package -n adie
Version: %{_adie_version}
Summary: Programmer's Text Editor
Group: Productivity/Text/Editors
%description -n adie
Adie is an extremely fast and convenient programming text editor
written using the FOX Toolkit.
%package -n calculator
Version: %{_calculator_version}
Summary: Calculator Applet
Group: Productivity/Other
%description -n calculator
The FOX calculator is a simple desktop calculator geared towards the
programmer. It supports not only a full complement of scientific
functions, but also common operations that programmers need, such as
bitwise operations, bitwise shifting, and base-2 logarithm and
exponents, and numeric conversion between hexadecimal, octal, binary,
and decimal.
The FOX Calculator implements correct operator precedences, so
expressions like 2+3*5 yield the correct result, which is 17, and not
25. Also featured is a constant memory, which permanently stores its
value even if you exit the calculator and restart it later.
%package -n pathfinder
Version: %{_pathfinder_version}
Summary: File Browser
Group: Productivity/Other
%description -n pathfinder
PathFinder is a file browser application written using the FOX Toolkit.
%package -n shutterbug
Version: %{_shutterbug_version}
Summary: Screenshot Utility
Group: Productivity/Other
%description -n shutterbug
Shutterbug is a FOX-based screenshot utility.
%package -n controlpanel
Version: %{_controlpanel_version}
Summary: Control Panel Utility
Group: Productivity/Other
%description -n controlpanel
ControlPanel is an application to edit colors, file associations, and
various other parameters common between all FOX applications.
%prep
%setup -q -n fox-%{_fox_version}
%patch0 -p1
%patch1 -p1
%build
autoreconf -fi
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="%{optflags} -DNDEBUG -Wuninitialized -fno-strict-aliasing"
%configure \
--enable-threadsafe \
--enable-release \
--enable-cups \
--with-xft \
--with-x \
--with-xcursor \
--with-xrender \
--with-xrandr \
--with-opengl \
--with-shape \
--with-xshm \
%if 0%{?mandriva_version}
--with-opengl="no" \
%endif
--without-profiling
make %{?_smp_mflags}
%install
%make_install
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/html
# FIXME: to be done via configure
if [ -d %{buildroot}%{_datadir}/doc/fox-1.7 ]; then
mv %{buildroot}%{_datadir}/doc/fox-1.7/* %{buildroot}%{_defaultdocdir}/%{name}/
rm -rf %{buildroot}%{_datadir}/doc/fox-1.7
fi
install -m644 ADDITIONS AUTHORS LICENSE* README TRACING index.html %{buildroot}%{_defaultdocdir}/%{name}/
mv %{buildroot}%{_bindir}/reswrap %{buildroot}%{_bindir}/reswrap17
mv %{buildroot}%{_mandir}/man1/reswrap.1 %{buildroot}%{_mandir}/man1/reswrap17.1
# install desktop files for example applications
%if 0%{?suse_version}
mkdir -p %{buildroot}%{_datadir}/{applications,pixmaps}
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/
install -m 644 %{SOURCE5} %{buildroot}%{_datadir}/applications/
install -m 644 %{SOURCE6} %{buildroot}%{_datadir}/applications/
install -m 644 %{SOURCE7} %{buildroot}%{_datadir}/applications/
%suse_update_desktop_file calculator
%suse_update_desktop_file pathfinder
%suse_update_desktop_file adie
%endif
%clean
rm -rf %{buildroot}
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%post devel
test -f %{_bindir}/fox-config || ln -s fox17-config %{_bindir}/fox-config
test -f %{_bindir}/reswrap || ln -s reswrap17 %{_bindir}/reswrap
test -f %{_mandir}/man1/reswrap.1.gz || ln -s reswrap17.1.gz %{_mandir}/man1/reswrap.1.gz
%files doc
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}
%files -n %{lname}
%defattr(-,root,root)
%{_libdir}/libCHART-*.so.*
%{_libdir}/libFOX-*.so.*
%files devel
%defattr(-,root,root)
%{_mandir}/man1/reswrap17.1%{?ext_man}
%{_bindir}/reswrap17
%{_bindir}/fox-config
%{_includedir}/fox-*/
%{_libdir}/pkgconfig/fox*.pc
%{_libdir}/libCHART-*.la
%{_libdir}/libFOX-*.la
%{_libdir}/libFOX-*.so
%{_libdir}/libCHART-*.so
%files devel-static
%defattr(-,root,root)
%{_libdir}/libFOX-*.a
%{_libdir}/libCHART-*.a
%files -n adie
%defattr(-,root,root)
%{_bindir}/adie
%{_bindir}/Adie.stx
%{_mandir}/man1/adie.1%{?ext_man}
%if 0%{?suse_version}
%{_datadir}/applications/adie.desktop
%{_datadir}/pixmaps/adie.png
%endif
%files -n calculator
%defattr(-,root,root)
%{_bindir}/calculator
%{_mandir}/man1/calculator.1%{?ext_man}
%if 0%{?suse_version}
%{_datadir}/applications/calculator.desktop
%{_datadir}/pixmaps/calculator.png
%endif
%files -n pathfinder
%defattr(-,root,root)
%{_bindir}/PathFinder
%{_mandir}/man1/PathFinder.1%{?ext_man}
%if 0%{?suse_version}
%{_datadir}/applications/pathfinder.desktop
%{_datadir}/pixmaps/pathfinder.png
%endif
%files -n shutterbug
%defattr(-,root,root)
%{_bindir}/shutterbug
%{_mandir}/man1/shutterbug.1%{?ext_man}
%files -n controlpanel
%defattr(-,root,root)
%{_bindir}/ControlPanel
%{_mandir}/man1/ControlPanel.1%{?ext_man}
%changelog