-# TODO:
-# make --enable-docs work.
-# library should be installed in /usr/lib.
-Summary: Digital camera software
-Summary(pl): Oprogramowanie dla kamer cyfrowych
+#
+# Conditional build:
+%bcond_without aalib # AAlib support
+#
+Summary: Command-line frontend to libgphoto2
+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.0
-Release: 0.5
-License: GPL
-Group: X11/Applications
-Source0: http://www.gphoto.net/dist/%{name}-%{version}.tar.gz
-Patch0: %{name}-m4.patch
-Patch1: %{name}-am_ac.patch
-URL: http://www.gphoto.net/
-BuildRequires: aalib-devel
-BuildRequires: bison
-BuildRequires: cdk-devel
-BuildRequires: findutils
-BuildRequires: gettext-devel
-BuildRequires: libexif-devel
+Version: 2.5.4
+Release: 1
+License: LGPL v2+
+Group: Applications/Graphics
+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/
+%{?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: libusb-devel
+BuildRequires: libtool
BuildRequires: pkgconfig
-BuildRequires: libtool >= 1.4.2-9
+BuildRequires: popt-devel
+BuildRequires: readline-devel
+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
+Obsoletes: gphoto2-devel
+Obsoletes: gphoto2-static
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _prefix /usr/X11R6
-%define _mandir %{_prefix}/man
-
%description
-Digital camera software.
-
-%description -l pl
-Oprogramowanie dla kamer cyfrowych.
-
-%package lib
-Summary: Libraries for digital cameras
-Summary(pl): Biblioteki obs³ugi kamer cyfrowych
-Group: Libraries
-
-%description lib
-Libraries for digital cameras.
-
-%description lib -l pl
-Biblioteki obs³ugi kamer cyfrowych.
-
-%package static
-Summary: Static version of gphoto2-lib
-Summary(pl): Statyczna wersja gphoto2-lib
-Group: Development/Libraries
+gphoto2 is a command-line frontend to libgphoto2.
-%description static
-Static version of gphoto2-lib.
+%description -l pl.UTF-8
+gphoto2 to działający z linii poleceń program będący interfejsem
+użytkownika do libgphoto2.
-%description static -l pl
-Statyczna wersja gphoto2-lib.
-
-%package lib-devel
-Summary: Header files for gphoto2-lib
-Summary(pl): Pliki nag³ówkowe dla gphoto2-lib
-Group: Development/Libraries
-Requires: %{name}-lib = %{version}
-Requires: libexif-devel
-
-%description lib-devel
-Header files for gphoto2-lib.
-
-%description lib-devel -l pl
-Pliki nag³ówkowe dla gphoto2-lib.
+%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
-%build
-install /usr/share/automake/missing .
-libtoolize --copy --force
-aclocal
-autoconf
-cd libgphoto2_port
-install /usr/share/automake/missing .
-libtoolize --copy --force
-aclocal -I m4
-autoconf
-cd ..
+%{__rm} po/stamp-po
-CPPFLAGS="-I/usr/include/cdk -I/usr/include/ncurses"
-%configure CPPFLAGS="$CPPFLAGS"
- #--enable-docs --- doesn't build.
+%build
+%{__libtoolize}
+%{__aclocal} -I m4m
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
+%configure \
+ %{?with_aalib:--with-aalib}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-
-install -d "$RPM_BUILD_ROOT/%{_pkgconfigdir}"
-mv $RPM_BUILD_ROOT{%{_libdir}/pkgconfig,%{_pkgconfigdir}}
-
-gzip -9nf README ChangeLog
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}
-%find_lang libgphoto2_port
-
-%post lib -p /sbin/ldconfig
-%postun lib -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc *.gz
+%doc AUTHORS ChangeLog NEWS README TODO
%attr(755,root,root) %{_bindir}/gphoto2
-%{_datadir}/%{name}
-%{_mandir}/*/*
-
-%files lib -f libgphoto2_port
-%defattr(644,root,root,755)
-%{_libdir}/*.la
-%{_libdir}/*.so.*.*.*
-%{_libdir}/gphoto2/2.0/libgphoto2_*.??
-%{_libdir}/gphoto2_port/0.0.4/libgphoto2_port_*.??
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/*.a
-%{_libdir}/gphoto2/2.0/libgphoto2_*.a
-%{_libdir}/gphoto2_port/0.0.4/libgphoto2_port_*.a
-
-%files lib-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/gphoto2-*
-%{_includedir}/gphoto2
-%{_libdir}/*.so
-%{_pkgconfigdir}/*
+%{_mandir}/man1/gphoto2.1*