-%define pre pre2
+%bcond_with arts
+%define _pre pre3
Summary: GNU Gadu 2 - free talking
Summary(pl): GNU Gadu 2 - wolne gadanie
Name: gg2
-Version: %{pre}
-Release: 1
+Version: 2.0
+Release: 1.%{_pre}.1
Epoch: 1
License: GPL v2+
Group: Applications/Communications
-#Source0: http://www.hakore.com/~krzak/gg2/%{name}-%{snap}.tar.gz
-Source0: http://telia.dl.sourceforge.net/sourceforge/ggadu/gg2-2.0%{pre}.tar.bz2
+Source0: http://dl.sourceforge.net/sourceforge/ggadu/%{name}-%{version}%{_pre}.tar.gz
+# Source0-md5: 49c52cec6869c9ed1b3c015f37401879
Source1: %{name}.desktop
URL: http://www.gadu.gnu.pl/
#BuildRequires: arts-devel
+BuildRequires: perl-devel
BuildRequires: autoconf
-BuildRequires: automake >= 1.6
+BuildRequires: automake >= 1.7
BuildRequires: esound-devel >= 0.2.7
BuildRequires: iksemel-devel >= 0.0.1
BuildRequires: glib2-devel >= 2.2.0
BuildRequires: intltool
BuildRequires: gettext-devel >= 0.11.0
BuildRequires: xosd-devel >= 2.0.0
-BuildRequires: pkgconfig
+BuildRequires: pkgconfig
BuildRequires: fontconfig-devel
+%{?with_arts:BuildRequires: arts-devel}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Gadu-Gadu and Tlen.pl and any other instant messanger client with
+Gadu-Gadu, Tlen.pl and others instant messanger client with
GTK+2 GUI on GNU/GPL.
%description -l pl
-Klient Gadu-Gadu i Tlen.pl oraz innych protoko³ów z GUI pod GTK+2 na
+Klient Gadu-Gadu, Tlen.pl oraz innych protoko³ów z GUI pod GTK+2 na
licencji GNU/GPL.
+%package devel
+Summary: Headers for libgg2_core library to develop plugins
+Summary(pl): Pliki nag³ówkowe biblioteki libgg2_core potrzebne do rozwijania wtyczek
+Group: Applications/Communications
+Requires: %{name} = %{epoch}:%{version}
+Requires: glib2-devel
+Requires: perl-devel
+
+%description devel
+This package contains header files for libgg2_core library, needed to
+develop plugins for GNU Gadu 2.
+
+%description devel -l pl
+Ten pakiet zawiera pliki nag³ówkowe biblioteki libgg2_core, potrzebne
+do rozwijania wtyczek do GNU Gadu 2.
+
%package gui-gtk+2
Summary: GTK+2 GUI plugin
Summary(pl): Wtyczka z GUI w GTK+2
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description gui-gtk+2
GTK+2 GUI plugin for GNU Gadu 2.
Summary: Emoticons
Summary(pl): Emotikony
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description emoticons
Emotions icons and description files.
Summary: Gadu-Gadu plugin
Summary(pl): Wtyczka protoko³u Gadu-Gadu
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description gadu-gadu
Gadu-Gadu protocol plugin.
Summary: Tlen.pl plugin
Summary(pl): Wtyczka protoko³u Tlen.pl
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description tlen
Tlen.pl protocol plugin.
Summary: Jabber.org plugin
Summary(pl): Wtyczka protoko³u Jabber
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description jabber
Jabber protocol plugin.
%description jabber -l pl
-Wtyczka protoko³u Jabber.org.
+Wtyczka protoko³u Jabber.
%package sound-esd
Summary: Sound support with ESD
Summary(pl): Obs³uga d¼wiêku poprzez ESD
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description sound-esd
Sound support with ESD.
Summary: OSS sound support
Summary(pl): Obs³uga d¼wiêku OSS
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description sound-oss
OSS sound support.
Summary: Sound support with external player
Summary(pl): Obs³uga d¼wiêku przez zewnêtrzny program
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description sound-external
Sound support with external player.
%description sound-external -l pl
-Obs³uga d¼wiêku przez zewnêtrzny program
+Obs³uga d¼wiêku przez zewnêtrzny program.
-#%package sound-aRts
-#Summary: Sound support with aRts
-#Summary(pl): Obs³uga d¼wiêku poprzez aRts
-#Group: Applications/Communications
-#Requires: %{name} = %{version}
+%if %{with arts}
+%package sound-aRts
+Summary: Sound support with aRts
+Summary(pl): Obs³uga d¼wiêku poprzez aRts
+Group: Applications/Communications
+Requires: %{name} = %{version}
-#%description sound-aRts
-#Sound support with aRts.
+%description sound-aRts
+Sound support with aRts.
-#%description sound-aRts -l pl
-#Obs³uga d¼wiêku poprzez aRts.
+%description sound-aRts -l pl
+Obs³uga d¼wiêku poprzez aRts.
+%endif
%package xosd
Summary: Support for X On Screen Display
Summary(pl): Wy¶wietlanie komunikatów na ekranie X
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description xosd
Support for X On Screen Display.
Summary: Support for Window Managers docklets
Summary(pl): Obs³uga dokletów w ró¿nych zarz±dcach okien
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
%description docklet
Support for Window Managers docklets (GNOME, KDE).
Obs³uga dokletów w ró¿nych zarz±dcach okien (GNOME, KDE).
%package sms
-Summary: SMS Gateway
-Summary(pl): Bramka SMS
-Group: Applications/Communications
-Requires: %{name} = %{version}
+Summary: SMS Gateway
+Summary(pl): Bramka SMS
+Group: Applications/Communications
+Requires: %{name} = %{epoch}:%{version}
%description sms
-Send SMS to cellurar phones via web gateways.
+Send SMS to cellular phones via web gateways.
%description sms -l pl
-Wtyczka wysy³aj±ca SMS-y na telefony komórkowe przez bramki WWW.
+Wtyczka wysy³aj±ca wiadomo¶ci SMS na telefony komórkowe przez bramki WWW.
%package remote
-Summary: Remote access from other applications
-Summary(pl): Dostêp do programu z innych aplikacji
-Group: Applications/Communications
-Requires: %{name} = %{version}
+Summary: Remote access from other applications
+Summary(pl): Dostêp do programu z innych aplikacji
+Group: Applications/Communications
+Requires: %{name} = %{epoch}:%{version}
%description remote
Make possible exchange data with other applications.
Wtyczka umo¿liwiaj±ca wymianê informacji z innymi aplikacjami.
%package themes
-Summary: Themes for GnuGadu 2 GUI
-Summary(pl): Motywy graficzne dla GUI GnuGadu 2
+Summary: Themes for GNU Gadu 2 GUI
+Summary(pl): Motywy graficzne dla GUI GNU Gadu 2
Group: Applications/Communications
-Requires: %{name} = %{version}
+Requires: %{name} = %{epoch}:%{version}
Requires: %{name}-gui-gtk+2
%description themes
-Themes for GnuGadu 2 GUI.
+Themes for GNU Gadu 2 GUI.
-%description themes
-Motywy graficzne dla GUI GnuGadu 2.
+%description themes -l pl
+Motywy graficzne dla GUI GNU Gadu 2.
%prep
-%setup -q -n %{name}-2.0%{pre}
+%setup -q -n %{name}-%{version}%{_pre}
%build
rm -f missing
%configure \
--disable-gdb \
--disable-debug \
- --with-gui \
- --with-gadu \
- --with-tlen \
- --with-jabber \
- --with-xosd \
- --with-docklet \
- --with-esd \
- --with-oss \
- --with-sms \
- --with-external \
- --with-remote
-# --with-arts
+ --with-gui \
+ --with-gadu \
+ --with-tlen \
+ --with-jabber \
+ --with-xosd \
+ --with-docklet \
+ --with-esd \
+ --with-oss \
+ --with-sms \
+ --with-external \
+%if %{with arts}
+ --with-arts \
+%endif
+ --with-remote \
+ --enable-perl
%{__make}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_datadir}/applications
-install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/applications
+install -d $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
install -d $RPM_BUILD_ROOT%{_pixmapsdir}
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/sounds
-install $RPM_BUILD_ROOT%{_datadir}/%{name}/pixmaps/online.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+install $RPM_BUILD_ROOT%{_datadir}/%{name}/pixmaps/icon.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
%find_lang %{name} --all-name --with-gnome
+#Remove useless files
+rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README
-%doc $RPM_BUILD_ROOT%{_docdir}/gg2-2.0pre2/*
+%doc A* C* N* R* T* contrib doc/*
%attr(755,root,root) %{_bindir}/gg2
+%attr(755,root,root) %{_libdir}/libgg2_core.so.*.*.*
%dir %{_libdir}/gg2
%{_datadir}/%{name}/sounds
%{_datadir}/gg2/pixmaps/*.gif
%{_pixmapsdir}/%{name}.png
-%{_datadir}/applications/gg2.desktop
+%{_desktopdir}/gg2.desktop
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgg2_core.so
+%{_libdir}/libgg2_core.la
+%{_includedir}/gg2_core.h
+%{_pkgconfigdir}/gg2_core.pc
%files emoticons
%defattr(644,root,root,755)
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/gg2/libsound_external_plugin.so
+%if %{with arts}
+%files sound-aRts
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/gg2/libsound_arts_plugin.so
+%endif
+
%files xosd
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/gg2/libxosd_plugin.so