X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=gg.spec;h=07fc2dee5a8de24fc04be773000261513cd8ce51;hb=14fee98c2de3db3a6716e7fafdd807b21ded2d7c;hp=35a4aa503b026a547c334b3da8d2c947877bdca2;hpb=7e5e9072d3ab7d42c7392a59fc3a7d791431b9c4;p=packages%2Fgg.git diff --git a/gg.spec b/gg.spec index 35a4aa5..07fc2de 100644 --- a/gg.spec +++ b/gg.spec @@ -1,19 +1,43 @@ +# +# Conditional build: +# +# _without_gnome +# _without_gnome_applet +# _without_kde +# _without_wm_applet +# _without_sound + + +# This looks like overkill but some day we might have *everything* bconded :) +%{!?_without_gnome: %define _need_gnome 1} +%{!?_without_gnome: %define _need_esd 1} +%{!?_without_gnome_applet: %define _need_gnome 1} +%{!?_without_gnome_applet: %define _nees_esd 1} +%{!?_without_kde: %define _need_arts 1} +%{!?_without_wm_applet: %define _need_esd 1} + + Summary: GNU Gadu - free talking Summary(pl): GNU Gadu - wolne gadanie Name: gg -Version: 0.2.2 -Release: 2.pre5 -Epoch: 1 +Version: 0.2.2.1 +Release: 4 +Epoch: 4 License: GPL Group: Applications/Communications -Source0: http://netkrab.slackware.pl/gg/%{name}-%{version}pre5.tar.gz -Source2: %{name}.png +Source0: ftp://ftp.slackware.pl/gg/%{name}-%{version}.tar.gz +Source1: %{name}.png +Patch0: %{name}-home_etc.patch Icon: gg.xpm URL: http://netkrab.slackware.pl/gg/ -BuildRequires: gtk+-devel > 1.2.8 -BuildRequires: esound-devel > 0.2.7 -BuildRequires: gnome-libs-devel -BuildRequires: gnome-core-devel +BuildRequires: gtk+-devel > 1.2.8 +%{?_need_gnome:BuildRequires: gnome-libs-devel} +%{?_need_gnome:BuildRequires: gnome-core-devel} +%if %{!?_without_sound:1}%{?_without_sound:0} +%{?_need_arts:BuildRequires: arts-devel} +%{?_need_esd:BuildRequires: esound-devel > 0.2.7} +%endif + BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _prefix /usr/X11R6 @@ -42,7 +66,7 @@ Klient Gadu-Gadu na licencji GNU/GPL. Summary: GNU Gadu - free talking Summary(pl): GNU Gadu - wolne gadanie Group: Applications/Communications -Prereq: %{name}-common = %{epoch}:%{version} +PreReq: %{name}-common = %{epoch}:%{version} Provides: gg = %{epoch}:%{version}-%{release} %description X11 @@ -55,7 +79,7 @@ Klient Gadu-Gadu na licencji GNU/GPL. Wersja dla X11. Summary: GNU Gadu - free talking - GNOME version Summary(pl): GNU Gadu - wolne gadanie - wersja dla GNOME Group: Applications/Communications -Prereq: %{name}-common = %{epoch}:%{version} +PreReq: %{name}-common = %{epoch}:%{version} Provides: gg = %{epoch}:%{version}-%{release} %description gnome @@ -68,7 +92,7 @@ Klient Gadu-Gadu na licencji GNU/GPL. Wersja dla GNOME. Summary: GNU Gadu - free talking - GNOME dockable version Summary(pl): GNU Gadu - wolne gadanie - wersja dokowalna dla GNOME Group: Applications/Communications -Prereq: %{name}-common = %{epoch}:%{version} +PreReq: %{name}-common = %{epoch}:%{version} Provides: gg = %{epoch}:%{version}-%{release} %description gnome-applet @@ -81,7 +105,7 @@ Klient Gadu-Gadu na licencji GNU/GPL. Wersja dokowalna dla gnome. Summary: GNU Gadu - free talking - WindowMaker dockable version. Summary(pl): GNU Gadu - wolne gadanie - wersja dokowalna dla WindowMaker'a. Group: Applications/Communications -Prereq: %{name}-common = %{epoch}:%{version} +PreReq: %{name}-common = %{epoch}:%{version} Provides: gg = %{epoch}:%{version}-%{release} %description wm-applet @@ -95,7 +119,7 @@ WindowMaker'a. Summary: GNU Gadu - free talking - KDE version. Summary(pl): GNU Gadu - wolne gadanie - wersja dla KDE. Group: Applications/Communications -Prereq: %{name}-common = %{epoch}:%{version} +PreReq: %{name}-common = %{epoch}:%{version} Provides: gg = %{epoch}:%{version}-%{release} %description kde @@ -105,36 +129,51 @@ Gadu-Gadu client released on GNU/GPL. KDE version Klient Gadu-Gadu na licencji GNU/GPL. Wersja dla KDE. %prep -%setup -q -n %{name}-%{version}pre5 +%setup -q -n %{name}-%{version} +%patch0 -p1 %build LDFLAGS=" -L%{_libdir} %{rpmldflags}" + +%if %{!?_without_gnome_applet:1}%{?_without_gnome_applet:0} %configure \ + %{?_without_sound:--disable-esd} \ --enable-gnome \ --enable-panel %{__make} mv -f src/gg src/gg_applet %{__make} clean +%endif +%if %{!?_without_gnome:1}%{?_without_gnome:0} %configure \ + %{?_without_sound:--disable-esd} \ --enable-gnome %{__make} mv -f src/gg src/gg_gnome %{__make} clean +%endif +%if %{!?_without_wm_applet:1}%{?_without_wm_applet:0} %configure \ + %{?_without_sound:--disable-esd} \ --enable-dockapp %{__make} mv -f src/gg src/gg_wm %{__make} clean +%endif +%if %{!?_without_kde:1}%{?_without_kde:0} %configure \ - --enable-docklet + --enable-docklet \ + %{!?_without_sound:--enable-arts} \ + --disable-esd %{__make} mv -f src/gg src/gg_kde %{__make} clean +%endif -%configure +%configure %{?_without_sound:--disable-esd} %{__make} %install @@ -142,17 +181,17 @@ rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_applnkdir}/Network/Communications,%{_pixmapsdir},%{_datadir}/applets/Network/} %{__make} install DESTDIR=$RPM_BUILD_ROOT -install src/gg_applet $RPM_BUILD_ROOT%{_bindir} -install src/gg_gnome $RPM_BUILD_ROOT%{_bindir} -install src/gg_wm $RPM_BUILD_ROOT%{_bindir} -install src/gg_kde $RPM_BUILD_ROOT%{_bindir} +%{!?_without_gnome_applet:install src/gg_applet $RPM_BUILD_ROOT%{_bindir}} +%{!?_without_gnome:install src/gg_gnome $RPM_BUILD_ROOT%{_bindir}} +%{!?_without_wm_applet:install src/gg_wm $RPM_BUILD_ROOT%{_bindir}} +%{!?_without_kde:install src/gg_kde $RPM_BUILD_ROOT%{_bindir}} sed -e 's/xpm$/png/' src/GnuGadu.desktop \ > $RPM_BUILD_ROOT%{_applnkdir}/Network/Communications/GnuGadu.desktop sed -e 's/xpm$/png/' -e 's/Exec=gg/Exec=gg_applet\ --activate-goad-server=gg/' \ src/GnuGadu.desktop > $RPM_BUILD_ROOT%{_datadir}/applets/Network/GnuGadu.desktop -install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} +install %{SOURCE1} $RPM_BUILD_ROOT%{_pixmapsdir} gzip -9nf README ChangeLog TODO install -d $RPM_BUILD_ROOT%{_sysconfdir}/CORBA/servers/ @@ -197,23 +236,31 @@ fi %{_applnkdir}/Network/Communications/GnuGadu.desktop %attr(755,root,root) %{_bindir}/gg +%if %{!?_without_gnome:1}%{?_without_gnome:0} %files gnome %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/gg_gnome %{_applnkdir}/Network/Communications/GnuGadu.desktop +%endif +%if %{!?_without_gnome_applet:1}%{?_without_gnome_applet:0} %files gnome-applet %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/gg_applet %attr(755,root,root) %{_datadir}/applets/Network/GnuGadu.desktop %attr(755,root,root) %{_sysconfdir}/CORBA/servers/GnuGadu.gnorba +%endif +%if %{!?_without_wm_applet:1}%{?_without_wm_applet:0} %files wm-applet %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/gg_wm %attr(755,root,root) %{_datadir}/applets/Network/GnuGadu.desktop +%endif +%if %{!?_without_kde:1}%{?_without_kde:0} %files kde %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/gg_kde %attr(755,root,root) %{_datadir}/applets/Network/GnuGadu.desktop +%endif