+#
+# Conditional build:
+%bcond_without aalib # AAlib support
+#
Summary: Command-line frontend to libgphoto2
-Summary(es): Foto GNU (gphoto) Release 2
-Summary(pl): Dzia³aj±cy z linii poleceñ program obs³uguj±cy libgphoto2
-Summary(pt_BR): GNU Photo - programa GNU para câmeras digitais
-Summary(zh_CN): gPhoto - LinuxϵÄʹÓÃÊýÂëÏà»úµÄ³ÌÐò
+Summary(es.UTF-8): Foto GNU (gphoto) Release 2
+Summary(pl.UTF-8): Działający z linii poleceń program obsługujący libgphoto2
+Summary(pt_BR.UTF-8): GNU Photo - programa GNU para câmeras digitais
+Summary(zh_CN.UTF-8): gPhoto - Linux下的使用数码相机的程序
Name: gphoto2
-Version: 2.1.6
-Release: 2
-License: GPL
+Version: 2.5.4
+Release: 1
+License: LGPL v2+
Group: Applications/Graphics
-Source0: http://dl.sourceforge.net/gphoto/%{name}-%{version}.tar.gz
-# Source0-md5: 2de2bcc62599b8a7337b54b0a067c50b
+Source0: http://downloads.sourceforge.net/gphoto/%{name}-%{version}.tar.bz2
+# Source0-md5: 55e062dfb09a9589b4f9d6d545724c60
Patch0: %{name}-manpage_addon.patch
+Patch1: automake-1.12.patch
+Patch2: %{name}-ac.patch
+Patch3: %{name}-pl.po-update.patch
URL: http://www.gphoto.org/
-BuildRequires: aalib-devel
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: cdk-devel
-BuildRequires: gettext-devel
-BuildRequires: libexif-devel
-BuildRequires: libgphoto2-devel >= 2.1.1
+%{?with_aalib:BuildRequires: aalib-devel}
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake >= 1:1.9
+BuildRequires: cdk-devel >= 5.0_td20010421
+BuildRequires: gettext-devel >= 0.14.1
+BuildRequires: libexif-devel >= 0.6.9
+BuildRequires: libgphoto2-devel >= 2.5.4
BuildRequires: libjpeg-devel
+BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: popt-devel
BuildRequires: readline-devel
-Requires: libgphoto2 >= 2.1.1
-#Requires: dcraw
+Requires: libgphoto2 >= 2.5.4
Obsoletes: gphoto2-progs
# these are not true (renamed to libgphoto2-{devel,static}) - we must have
# the way to just rename package which is not required by anything installed
%description
gphoto2 is a command-line frontend to libgphoto2.
-%description -l es
-Foto GNU (gphoto).
+%description -l pl.UTF-8
+gphoto2 to działający z linii poleceń program będący interfejsem
+użytkownika do libgphoto2.
-%description -l pl
-gphoto2 to dzia³aj±cy z linii poleceñ program bêd±cy interfejsem
-u¿ytkownika do libgphoto2.
-
-%description -l pt_BR
-O programa gphoto faz parte do projeto GNOME e é uma interface para
-uma grande variedade de câmeras fotográficas digitais.
+%description -l pt_BR.UTF-8
+O programa gphoto faz parte do projeto GNOME e é uma interface para
+uma grande variedade de câmeras fotográficas digitais.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%{__rm} po/stamp-po
%build
-cp -f /usr/share/automake/config.* .
-CPPFLAGS="-I/usr/include/ncurses"
-%{__aclocal}
-%{__autoheader}
+%{__libtoolize}
+%{__aclocal} -I m4m
%{__autoconf}
+%{__autoheader}
%{__automake}
-%configure
+CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
+%configure \
+ %{?with_aalib:--with-aalib}
%{__make}
%install
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc ChangeLog README TODO
+%doc AUTHORS ChangeLog NEWS README TODO
%attr(755,root,root) %{_bindir}/gphoto2
-%{_mandir}/man1/*
+%{_mandir}/man1/gphoto2.1*