tuxpaint-config/tuxpaint-config.spec
2022-05-03 18:13:07 +02:00

83 lines
2.6 KiB
RPMSpec

%global debug_package %{nil}
Summary: Pictures for use with the paint program Tuxpaint
Name: tuxpaint-config
Version: 0.0.18
Release: 1
License: GPLv2+
Group: Graphics
Url: https://sourceforge.net/projects/tuxpaint
Source0: https://downloads.sourceforge.net/project/tuxpaint/%{name}/%{version}/%{name}-%{version}.tar.gz
Source100: %{name}.rpmlintrc
Patch0: tuxpaint-config-0.0.18-use-OPTFLAGS-for-our-compile-flags.patch
BuildRequires: desktop-file-utils
BuildRequires: fltk-devel
BuildRequires: libpaper-devel
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(libunibreak)
BuildRequires: pkgconfig(pixman-1)
BuildRequires: pkgconfig(xext)
Requires: tuxpaint
ExclusiveArch: x86_64
%description
Tux Paint Config is a graphical configuration tool for "Tux Paint." It
provides a point-and-click interface that allows parents and teachers to alter
Tux Paint's behavior -- disable sound effects, run in full-screen mode, etc. -
without needing to manipulate a text-based configuration file.
%files -f %{name}.lang
%doc %{_docdir}/%{name}/*
%{_bindir}/%{name}
%{_datadir}/%{name}/images/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_includedir}/X11/pixmaps/%{name}.xpm
%{_miconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%{_mandir}/man1/%{name}.1.*
#-----------------------------------------------------------------------------
%prep
%setup -q
%patch0 -p1
%build
%setup_compile_flags
make PREFIX=%{_prefix} OPTFLAGS="%{optflags}"
%install
%makeinstall_std PREFIX=%{_prefix} X11_ICON_PREFIX="%{_includedir}/X11/pixmaps/"
# Install provided icons...
install -m644 data/images/icon16x16.png -D %{buildroot}%{_miconsdir}/%{name}.png
install -m644 data/images/icon32x32.png -D %{buildroot}%{_iconsdir}/%{name}.png
install -m644 data/images/icon48x48.png -D %{buildroot}%{_liconsdir}/%{name}.png
# ... and .desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor="" \
--dir %{buildroot}%{_datadir}/applications \
--remove-category="Settings" \
--add-category="Education" \
src/tuxpaint-config.desktop
%if 0
mkdir -p %{buildroot} %{buildroot}%{_bindir}
make install BUILDPREFIX="%{buildroot}" PKG_ROOT="%{buildroot}" PREFIX="%{buildroot}%{_usr}" X11_ICON_PREFIX="%{buildroot}%{_includedir}/X11/pixmaps/" LIBDIR="%{buildroot}%{_libdir}"
%endif
# Fix perms
chmod -R go+r docs/
chmod -R go=u-w %{buildroot}/*
chmod -x %{buildroot}%{_docdir}/%{name}/html/README.html
chmod -x %{buildroot}%{_docdir}/%{name}/*.txt
# Drop unrecognized locale
rm -rf %{buildroot}%{_datadir}/locale/son/
%find_lang %{name}