+#
+# Conditional build:
+%bcond_without static_libs # don't build static library
+#
+%define _snap 20080813
+%define rel 4
Summary: JPEG Scaling Library
+Summary(pl.UTF-8): Biblioteka do skalowania JPEG-ów
Name: epeg
-Version: 0.9.0
-%define _snap 20050105
-Release: 0.%{_snap}.0.1
+Version: 0.9.1.043
+Release: 0.%{_snap}.%{rel}
License: BSD
-Group: X11/Libraries
-#Source0: http://dl.sourceforge.net/enlightenment/%{name}-%{version}.tar.gz
-Source0: ftp://ftp.sparky.homelinux.org/pub/e17/%{name}-%{version}-%{_snap}.tar.gz
-# Source0-md5: 3780cd02824944b1d64db8d57869b8fd
-URL: http://enlightenment.org/
-BuildRequires: autoconf
-BuildRequires: automake
+Group: Libraries
+Source0: %{name}-%{version}-%{_snap}.tar.bz2
+# Source0-md5: a7331984bef4543a6ed1b385ccd7cc0d
+URL: http://enlightenment.org/Libraries/Epeg/
+BuildRequires: autoconf >= 2.52
+BuildRequires: automake >= 1.6
BuildRequires: libjpeg-devel
BuildRequires: libtool
+Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Epeg is a library which provides facilities for scaling JPEG images
very quickly.
+Note: this library is obsolete; new software uses Evas to scale JPEG
+images.
+
+%description -l pl.UTF-8
+Epeg to biblioteka ułatwiająca bardzo szybkie skalowanie obrazów JPEG.
+
+Uwaga: ta biblioteka jest przestarzała; nowy kod do skalowania obrazów
+JPEG wykorzystuje bibliotekę Evas.
+
+%package libs
+Summary: Epeg library
+Summary(pl.UTF-8): Biblioteka epeg
+Group: Libraries
+
+%description libs
+Epeg library.
+
+%description libs -l pl.UTF-8
+Biblioteka epeg.
+
%package devel
-Summary: Epeg headers, documentation and test programs
+Summary: Epeg header files
+Summary(pl.UTF-8): Pliki nagłówkowe Epeg
Group: Development/Libraries
-Requires: %{name} = %{version}
+Requires: %{name}-libs = %{version}-%{release}
Requires: libjpeg-devel
%description devel
-Headers, test programs and documentation for Epeg.
+Header files for Epeg.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe Epeg.
%package static
-Summary: Static libraries
+Summary: Static Epeg library
+Summary(pl.UTF-8): Statyczna biblioteka Epeg
Group: Development/Libraries
-Requires: %{name}-devel = %{version}
+Requires: %{name}-devel = %{version}-%{release}
%description static
-Static libraries.
+Static Epeg library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka Epeg.
%prep
-%setup -q -n %{name}
+%setup -q -n %{name}-%{version}-%{_snap}
%build
%{__libtoolize}
%{__autoconf}
%{__autoheader}
%{__automake}
-%configure
+%configure \
+ %{!?with_static_libs:--disable-static}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
+
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
-%doc AUTHORS COPYING README
+%doc AUTHORS COPYING COPYING-PLAIN README
%attr(755,root,root) %{_bindir}/epeg
-%attr(755,root,root) %{_libdir}/libepeg.so*
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libepeg.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libepeg.so.0
%files devel
%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libepeg.so
%{_libdir}/libepeg.la
-%attr(755,root,root) %{_bindir}/epeg-config
-%{_includedir}/Epeg*
+%{_includedir}/Epeg.h
+%{_pkgconfigdir}/epeg.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libepeg.a
+%endif