File xforms.spec of Package xforms

#
# spec file for package xforms
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#

%define sover 2
%define libname libxforms%{sover}
Name:           xforms
Version:        1.2.5git20200210
Release:        0
Summary:        Toolkit based on Xlib for X Window Systems
License:        LGPL-2.1+
Group:          Development/Libraries/X11
Url:            http://xforms-toolkit.org/
Source:         https://download.savannah.gnu.org/releases/xforms/%{name}-%{version}.tar.gz
#Source1:        https://download.savannah.gnu.org/releases/xforms/%{name}-%{version}.tar.gz.sig
Source2:	%name.keyring
BuildRequires:  Mesa-libGL-devel
BuildRequires:  libXpm-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
XForms is a GUI toolkit based on Xlib for X Window Systems. It
features widgets such as buttons, sliders, and menus etc. integrated
into an easy and efficient object/event callback execution model that
allows construction of X applications. In addition, the library is
extensible and new objects can be created and added to the library.

%package -n %{libname}
Summary:        Toolkit library
Group:          Hardware/Other

%description -n %{libname}
XForms is a GUI toolkit based on Xlib for X Window Systems. It
features widgets such as buttons, sliders, and menus etc. integrated
into an easy and efficient object/event callback execution model that
allows construction of X applications. In addition, the library is
extensible and new objects can be created and added to the library.

%package devel
Summary:        Development files for the XForms toolkit library
Group:          Development/Libraries/X11
Requires:       %{libname} = %{version}

%description devel
XForms is a GUI toolkit based on Xlib for X Window Systems. It
features widgets such as buttons, sliders, and menus etc. integrated
into an easy and efficient object/event callback execution model that
allows construction of X applications. In addition, the library is
extensible and new objects can be created and added to the library.

%prep
%setup -q -n %{name}
# Remove build time references so build-compare can do its work
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" lib/version.c

%build
./autogen.sh
%configure \
    --disable-static \
    --enable-optimization="%{optflags}"

make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_bindir}/fd2ps
%{_bindir}/fdesign
%{_mandir}/man1/fd2ps.1%{ext_man}
%{_mandir}/man1/fdesign.1%{ext_man}
%{_mandir}/man5/xforms.5%{ext_man}

%files -n %{libname}
%defattr(-,root,root)
%doc COPYING.LIB Copyright ChangeLog README
%{_libdir}/libflimage.so.%{sover}*
%{_libdir}/libformsGL.so.%{sover}*
%{_libdir}/libforms.so.%{sover}*

%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/libflimage.so
%{_libdir}/libformsGL.so
%{_libdir}/libforms.so

%changelog
openSUSE Build Service is sponsored by