#
# Conditional build:
-# _with_ioctl_daemon - with ioctl_daemon (suid-root!)
+# _with_ioctl_daemon - with ioctl_daemon (suid-root!)
+# _with_python - with python support
+# _with_voip - with voip support (libgsm)
#
+
+%define snapshot 20030529
+
Summary: A client compatible with Gadu-Gadu
Summary(de): Einen client kompatibel zu Gadu-Gadu
Summary(it): Esperimentale cliente di Gadu-Gadu
Summary(pl): Eksperymentalny Klient Gadu-Gadu
Name: ekg
-Version: 20020719
-Release: 0.1
-Epoch: 1
+Version: 1.0
+Release: 3.%{snapshot}.1
+Epoch: 3
License: GPL
Group: Applications/Communications
-Source0: http://dev.null.pl/ekg/%{name}-%{version}.tar.gz
-Patch0: ekg-DESTDIR-temporary.patch
+# Source0-md5: 4049340e57d0fc99e23662c6ce87c56f
+Source0: http://dev.null.pl/ekg/%{name}-%{snapshot}.tar.gz
+Source1: %{name}.conf
URL: http://dev.null.pl/ekg/
BuildRequires: autoconf
+BuildRequires: automake
+%{?_with_voip:BuildRequires: libgsm-devel}
BuildRequires: ncurses-devel
+BuildRequires: openssl-devel >= 0.9.7
+BuildRequires: %{_bindir}/perl
+%{?_with_python:BuildRequires: python-devel}
BuildRequires: readline-devel
-BuildRequires: libgsm-devel
+BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Summary: libgadu library development
Summary(pl): Czê¶æ biblioteki libgadu dla programistów
Group: Development/Libraries
-Requires: libgadu
+Requires: libgadu = %{version}
Obsoletes: libgg-devel
License: LGPL
Summary: Static libgadu Library
Summary(pl): Statyczna biblioteka libgadu
Group: Development/Libraries
-Requires: libgadu-devel
+Requires: libgadu-devel = %{version}
Obsoletes: libgg-static
License: LGPL
Statyczna biblioteka libgadu.
%prep
-%setup -q
-%patch0 -p1
+%setup -q -n %{name}-%{snapshot}
%build
+rm -f missing
+%{__aclocal}
+%{__autoheader}
%{__autoconf}
%configure \
- --with-shared \
- %{?!debug:--without-debug} \
- %{?!_with_ioctl_daemon:--without-ioctld}
-
+ --enable-shared \
+ --enable-static \
+ --with-pthread \
+ %{?_with_python:--with-python} \
+ %{?_with_voip:--with-libgsm} \
+ %{?!_with_ioctl_daemon:--disable-ioctld}
%{__make}
+%if %{?_with_ioctl_daemon:1}0
+cd src
+%{__make} ioctld
+cd ..
+%endif
+
+cd docs/api
+./make.pl
+cd ..
+
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
-install contrib/ekl2.pl $RPM_BUILD_ROOT%{_bindir}
-install contrib/ekl2.sh $RPM_BUILD_ROOT%{_bindir}
-install docs/ekg.man.pl $RPM_BUILD_ROOT%{_mandir}/pl/man1/ekg.1
-install docs/ekl2.man.pl $RPM_BUILD_ROOT%{_mandir}/pl/man1/ekl2.1
-install docs/ekl2.man.en $RPM_BUILD_ROOT%{_mandir}/man1/ekl2.1
-install docs/ekg.man.en $RPM_BUILD_ROOT%{_mandir}/man1/ekg.1
+%{__make} install install-ekl2 DESTDIR=$RPM_BUILD_ROOT
+
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/
# For libgadu-devel
-rm examples/Makefile examples/Makefile.in
+rm examples/Makefile examples/Makefile.in examples/.cvsignore
%if %{?_with_ioctl_daemon:1}%{?!_with_ioctl_daemon:0}
install src/ioctld $RPM_BUILD_ROOT%{_bindir}
%endif
+cd $RPM_BUILD_ROOT%{_libdir}
+ln -sf libgadu.so.*.* libgadu.so
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
+%doc docs/{7thguard,dcc,files,gdb,python,sim,themes,ui-ncurses,vars,voip}.txt
+%doc ChangeLog docs/{FAQ,README,TODO,ULOTKA} docs/emoticons.{ansi,sample}
%attr(755,root,root) %{_bindir}/e*
-%doc docs/{7thguard,dcc,emoticons,on,themes,ui,vars,voip}.txt
-%doc ChangeLog docs/{FAQ,README,TODO,ULOTKA} docs/emoticons.sample
%{?_with_ioctl_daemon:%attr(4755,root,root) %{_bindir}/ioctld}
+%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*.conf
%{_datadir}/ekg
%{_mandir}/man1/*
%lang(pl) %{_mandir}/pl/man1/*
%files -n libgadu
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libgadu.so.*
+%attr(755,root,root) %{_libdir}/libgadu.so.*.*
%files -n libgadu-devel
%defattr(644,root,root,755)
-%doc docs/{7thguard,api,dcc-protocol,devel-hints,http}.txt docs/protocol.html
+%doc docs/{7thguard,api,ui,devel-hints,przenosny-kod}.txt docs/protocol.html docs/api/{functions,index,types}.html
%doc ChangeLog docs/{README,TODO} examples
+%{_libdir}/libgadu.so
%{_includedir}/libgadu.h
+%{_includedir}/libgadu-config.h
+%{_pkgconfigdir}/*
%files -n libgadu-static
%defattr(644,root,root,755)