Group :: Graphics
RPM: mtpaint
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%define docver 3.21
Summary: Painting program for creating icons and pixel-based artwork
Name: mtpaint
Version: 3.21
Release: alt1
License: GPLv3+
Group: Graphics
Url: http://mtpaint.sourceforge.net/
Source: http://downloads.sf.net/%name/%name-%version.tar.bz2
Source1: http://downloads.sf.net/%name/%{name}_handbook-%docver.zip
Patch: %name-3.19-xdg-open.patch
Patch1: %name-3.19-openjpeg.patch
Packager: Fr. Br. George <george at altlinux.ru>
BuildRequires: gtk2-devel zlib-devel unzip
BuildRequires: libpng-devel libungif-devel libjpeg-devel libtiff-devel
BuildRequires: desktop-file-utils gettext dos2unix
%description
mtPaint is a simple painting program designed for creating icons and
pixel-based artwork. It can edit indexed palette or 24 bit RGB images
and offers basic painting and palette manipulation tools. Its main
file format is PNG, although it can also handle JPEG, GIF, TIFF, BMP,
XPM, and XBM files.
%package handbook
Summary: Handbook for the mtpaint painting application
Group: Graphics
License: GFDL
Buildarch: noarch
Requires: %name = %version-%release
%description handbook
Install this package is want to read the handbook for the painting
application mtpaint.
%prep
%setup -q -a 1
%patch -p1
%patch1 -p1
# We have moved docs
sed -i 's,#define HANDBOOK_LOCATION "/usr/doc/mtpaint/index.html",#define HANDBOOK_LOCATION "%_docdir/%name-handbook-%version/index.html",' src/png.c
chmod 0755 %{name}_handbook-%docver/docs/{en_GB,img,files,cs}
dos2unix -k %{name}_handbook-%docver/docs/index.html
dos2unix -k %{name}_handbook-%docver/docs/{en_GB,cs}/*.html
%build
# This is not a "normal" configure
./configure cflags asneeded debug intl man gtk2 tiff jpeg GIF
%make_build
%install
rm -rf %buildroot
%makeinstall MT_PREFIX=%buildroot%prefix \
MT_MAN_DEST=%buildroot%_mandir/man1 \
MT_LANG_DEST=%buildroot%_datadir/locale \
BIN_INSTALL=%buildroot%_bindir
desktop-file-install --delete-original \
--vendor fedora \
--dir %buildroot%_datadir/applications \
%buildroot%_datadir/applications/%name.desktop
%find_lang %name
%files -f %name.lang
%doc COPYING NEWS README
%_mandir/man1/%{name}*
%_bindir/%name
%_datadir/applications/*.desktop
%_datadir/pixmaps/%name.png
%files handbook
%doc %{name}_handbook-%docver/COPYING %{name}_handbook-%docver/docs/*
%changelog
…
Full changelog you can see here
Summary: Painting program for creating icons and pixel-based artwork
Name: mtpaint
Version: 3.21
Release: alt1
License: GPLv3+
Group: Graphics
Url: http://mtpaint.sourceforge.net/
Source: http://downloads.sf.net/%name/%name-%version.tar.bz2
Source1: http://downloads.sf.net/%name/%{name}_handbook-%docver.zip
Patch: %name-3.19-xdg-open.patch
Patch1: %name-3.19-openjpeg.patch
Packager: Fr. Br. George <george at altlinux.ru>
BuildRequires: gtk2-devel zlib-devel unzip
BuildRequires: libpng-devel libungif-devel libjpeg-devel libtiff-devel
BuildRequires: desktop-file-utils gettext dos2unix
%description
mtPaint is a simple painting program designed for creating icons and
pixel-based artwork. It can edit indexed palette or 24 bit RGB images
and offers basic painting and palette manipulation tools. Its main
file format is PNG, although it can also handle JPEG, GIF, TIFF, BMP,
XPM, and XBM files.
%package handbook
Summary: Handbook for the mtpaint painting application
Group: Graphics
License: GFDL
Buildarch: noarch
Requires: %name = %version-%release
%description handbook
Install this package is want to read the handbook for the painting
application mtpaint.
%prep
%setup -q -a 1
%patch -p1
%patch1 -p1
# We have moved docs
sed -i 's,#define HANDBOOK_LOCATION "/usr/doc/mtpaint/index.html",#define HANDBOOK_LOCATION "%_docdir/%name-handbook-%version/index.html",' src/png.c
chmod 0755 %{name}_handbook-%docver/docs/{en_GB,img,files,cs}
dos2unix -k %{name}_handbook-%docver/docs/index.html
dos2unix -k %{name}_handbook-%docver/docs/{en_GB,cs}/*.html
%build
# This is not a "normal" configure
./configure cflags asneeded debug intl man gtk2 tiff jpeg GIF
%make_build
%install
rm -rf %buildroot
%makeinstall MT_PREFIX=%buildroot%prefix \
MT_MAN_DEST=%buildroot%_mandir/man1 \
MT_LANG_DEST=%buildroot%_datadir/locale \
BIN_INSTALL=%buildroot%_bindir
desktop-file-install --delete-original \
--vendor fedora \
--dir %buildroot%_datadir/applications \
%buildroot%_datadir/applications/%name.desktop
%find_lang %name
%files -f %name.lang
%doc COPYING NEWS README
%_mandir/man1/%{name}*
%_bindir/%name
%_datadir/applications/*.desktop
%_datadir/pixmaps/%name.png
%files handbook
%doc %{name}_handbook-%docver/COPYING %{name}_handbook-%docver/docs/*
%changelog
…
Full changelog you can see here