Spec file modernization and fixes:

Update to SPDX license tag
  Clean up spec file formatting
  Remove obsolete snapshot build support
  Migrate from uname -i to uname -m
This commit is contained in:
Richard Shaw 2022-08-27 16:02:17 -05:00
parent cea97d4577
commit 6ab01c0d48

View File

@ -1,46 +1,37 @@
#global snap r9671
# trim changelog included in binary rpms # trim changelog included in binary rpms
%global _changelog_trimtime %(date +%s -d "1 year ago") %global _changelog_trimtime %(date +%s -d "1 year ago")
Summary: C++ user interface toolkit Name: fltk
Name: fltk Version: 1.3.8
Version: 1.3.8 Release: 4%{?dist}
Release: 3%{?dist} Summary: C++ user interface toolkit
# see COPYING (or http://www.fltk.org/COPYING.php ) for exceptions details # see COPYING (or http://www.fltk.org/COPYING.php ) for exceptions details
License: LGPLv2+ with exceptions License: LGPL-2.0-or-later with exceptions
URL: http://www.fltk.org/ URL: http://www.fltk.org/
%if "%{?snap:1}" == "1"
Source0: http://ftp.easysw.com/pub/fltk/snapshots/fltk-1.3.x-%{snap}.tar.bz2
%else
Source0: http://fltk.org/pub/%{name}/%{version}/%{name}-%{version}-source.tar.gz Source0: http://fltk.org/pub/%{name}/%{version}/%{name}-%{version}-source.tar.gz
%endif
Source1: fltk-config.sh Source1: fltk-config.sh
Patch0: fltk-cmake.patch Patch0: fltk-cmake.patch
# add lib64 support, drop extraneous libs (bug #708185) and ldflags (#1112930) # add lib64 support, drop extraneous libs (bug #708185) and ldflags (#1112930)
Patch1: fltk-1.3.4-fltk_config.patch Patch1: fltk-1.3.4-fltk_config.patch
BuildRequires: gcc-c++ BuildRequires: cmake
BuildRequires: cmake BuildRequires: desktop-file-utils
BuildRequires: desktop-file-utils BuildRequires: doxygen
BuildRequires: doxygen BuildRequires: gcc-c++
BuildRequires: texlive-latex BuildRequires: make
# fltk bug with pdf generation, investigate later BuildRequires: texlive-latex
#BuildRequires: texlive-epstopdf BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(gl) pkgconfig(glu)
BuildRequires: pkgconfig(gl) pkgconfig(glu) BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(ice) BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(xext) pkgconfig(xinerama) pkgconfig(xft) pkgconfig(xt) pkgconfig(x11)
BuildRequires: pkgconfig(xext) pkgconfig(xinerama) pkgconfig(xft) pkgconfig(xt) pkgconfig(x11) BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xproto)
BuildRequires: pkgconfig(xproto) BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(zlib)
BuildRequires: make
%description %description
FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit. FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit.
@ -77,11 +68,7 @@ Requires: %{name}-devel
%prep %prep
%if 0%{?snap:1}
%autosetup -p1 -n fltk-1.3.x-%{snap}
%else
%autosetup -p1 %autosetup -p1
%endif
%build %build
@ -100,8 +87,8 @@ make docs -C %{_vpath_builddir}
%cmake_install %cmake_install
# we only apply this hack to multilib arch's # we only apply this hack to multilib arch's
%ifarch x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparc %ifarch x86_64 %{ix86}
%global arch %(uname -i 2>/dev/null || echo undefined) %global arch %(uname -m 2>/dev/null || echo undefined)
mv $RPM_BUILD_ROOT%{_bindir}/fltk-config \ mv $RPM_BUILD_ROOT%{_bindir}/fltk-config \
$RPM_BUILD_ROOT%{_bindir}/fltk-config-%{arch} $RPM_BUILD_ROOT%{_bindir}/fltk-config-%{arch}
install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/fltk-config install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/fltk-config
@ -109,11 +96,12 @@ install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/fltk-config
%check %check
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/fluid.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/fluid.desktop
%ldconfig_scriptlets %ldconfig_scriptlets
%files %files
%doc ANNOUNCEMENT CHANGES CREDITS README %doc ANNOUNCEMENT CHANGES CREDITS README
%license COPYING %license COPYING
@ -151,6 +139,13 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/fluid.desktop
%changelog %changelog
* Sat Aug 27 2022 Richard Shaw <hobbes1069@gmail.com> - 1.3.8-4
- Spec file modernization and fixes:
Update to SPDX license tag
Clean up spec file formatting
Remove obsolete snapshot build support
Migrate from uname -i to uname -m
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-3 * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild