+#
+# Conditional build:
+%bcond_without static_libs # don't build static library
+#
Summary: Evas "smart objects"
Summary(pl): "Inteligentne obiekty" Evas
Name: esmart
-Version: 0.9.0
-%define _snap 20050701
-Release: 0.%{_snap}.0.1
+Version: 0.9.0.007
+#%define _snap 20051025
+Release: 2
+#.%{_snap}.1
License: BSD
Group: X11/Libraries
-#Source0: http://dl.sourceforge.net/enlightenment/%{name}-%{version}.tar.gz
-Source0: http://sparky.homelinux.org/snaps/enli/e17/libs/%{name}-%{_snap}.tar.gz
-# Source0-md5: fd426d6d36dc57c857f5e91f8950b5d7
+Source0: http://enlightenment.freedesktop.org/files/%{name}-%{version}.tar.gz
+# Source0-md5: a65b4a08818ac9ef9de3dd9d4f20f148
+#Source0: http://sparky.homelinux.org/snaps/enli/e17/libs/%{name}-%{_snap}.tar.bz2
+Patch0: efl-m4.patch
+Patch1: %{name}-layout_in_libdir.patch
URL: http://enlightenment.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: edje-devel
BuildRequires: epeg-devel
BuildRequires: epsilon-devel
-BuildRequires: libltdl-devel
BuildRequires: libtool
+Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%undefine __cxx
+
%description
Esmart contains "smart" pre-built evas objects. It currently includes
a thumbnail generator and a horizontal/vertical container.
Esmart zawiera "inteligentne" wstêpnie zbudowane obiekty evas.
Aktualnie zawiera generator miniaturek i kontener poziomy/pionowy.
+%package libs
+Summary: Esmart libraries
+Summary(pl): Biblioteka Esmart
+Group: X11/Libraries
+
+%description libs
+Esmart libraries.
+
+%description libs -l pl
+Biblioteka Esmart.
+
%package devel
Summary: Evas "smart objects" header files
Summary(pl): Pliki nag³ówkowe "inteligentnych obiektów" Evas
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-libs = %{version}-%{release}
Requires: edje-devel
Requires: epeg-devel
Requires: epsilon-devel
Statyczne biblioteki Esmart.
%prep
-%setup -q -n %{name}
+%setup -q
+# -n %{name}
+%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
-%configure
+%configure \
+ %{!?with_static_libs:--disable-static}
%{__make}
%install
%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
%attr(755,root,root) %{_bindir}/esmart_file_dialog_test
%attr(755,root,root) %{_bindir}/esmart_test
+%{_datadir}/%{name}
+
+%files libs
+%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libesmart_*.so.*.*.*
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/layout
%attr(755,root,root) %{_libdir}/%{name}/layout/*.so
-%{_datadir}/%{name}
%files devel
%defattr(644,root,root,755)
%{_includedir}/Esmart/Esmart_*
%{_pkgconfigdir}/esmart.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libesmart_*.a
%{_libdir}/%{name}/layout/*.a
+%endif