Package flphoto: Specfile

Name: flphoto
Version: 1.3.1
Release: alt4.2

Packager: Victor Forsyuk <force@altlinux.org>

Summary: A simple image management, viewing, and printing program
License: GPLv2+
Group: Graphics

Url: http://www.easysw.com/~mike/flphoto
Source: http://dl.sourceforge.net/fltk/flphoto-%version-source.tar.bz2
Source1: flphoto.desktop
Patch0: flphoto-1.3.1-prototype.patch

# Automatically added by buildreq on Mon Dec 15 2008
BuildRequires: gcc-c++ groff-base libX11-devel libXext-devel libXft-devel libcups-devel libfltk-devel libgphoto2-devel libjpeg-devel libpng-devel

BuildPreReq: libcairo-devel libpixman-devel libXinerama-devel

%description
flphoto is a basic image management and display program based on the FLTK
toolkit. It can read, display, print, and export many image file formats,
and supports EXIF information provided by digital cameras.

%prep
%setup
%patch0 -p1

sed -i 's|^\(LIBS.*\)|\1 -ljpeg|' Makefile.in

%build
%add_optflags -DHAVE_LIBJPEG -DHAVE_LIBPNG
# 1) We want to see real commands in buildlog
# 2) Fix obsoleted desktop files path
subst 's/.SILENT://g; s@/etc/X11/applnk/Graphics@%_desktopdir@' Makefile.in

subst 's/OPTIM="-O"/OPTIM="%optflags"/' configure
%configure --with-docdir=%_docdir/%name-%version

# Quick fix for SMP build bug in Makefile - be sure espmsg built before running
# parallel make:
%make espmsg
%make_build

%install
%makeinstall_std
install -pD -m644 %SOURCE1 %buildroot%_desktopdir/flphoto.desktop

%files
%_bindir/*
%_desktopdir/*
%_pixmapsdir/*
%_man1dir/*
%_man5dir/*
%_datadir/mimelnk/application/*
# Author used home-made message translation implementation, message files are
# not standard and have no usual .mo extension. So, we cannot use find_lang.
%_datadir/locale/*/*
# This is not just usual (optional to install) %%doc files, they used in
# Help menu in program's UI.
%_docdir/%name-%version/

%changelog
* Fri Apr 15 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.3.1-alt4.2
- Rebuilt with FLTK 1.3.0.r8575

* Wed Mar 30 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.3.1-alt4.1
- Rebuilt with libfltk13 and for debuginfo

* Mon Dec 15 2008 Victor Forsyuk <force@altlinux.org> 1.3.1-alt4
- Remove obsolete install time scripts.

* Mon Sep 08 2008 Victor Forsyuk <force@altlinux.org> 1.3.1-alt3
- Added sys/stat.h to fix mkdir prototype (previously it was leaked in via
  libgphoto2 headers).

* Fri Mar 28 2008 Victor Forsyuk <force@altlinux.org> 1.3.1-alt2
- Apply fixes suggested by repocop.

* Thu Sep 27 2007 Victor Forsyuk <force@altlinux.org> 1.3.1-alt1
- Initial build.