Пакет gkrellm-gkrellmms: Specfile

%define plugin gkrellmms

%def_without M24

%if_with M24
%define _release alt0.M24.1
%else
%define _release alt1
%endif

Name: gkrellm-%plugin
Version: 2.1.22
Release: %_release
Packager: Grigory Batalov <bga@altlinux.ru>

Summary: GKrellM XMMS plugin
Summary(ru_RU.KOI8-R): XMMS-\xd0\xcc\xc1\xc7\xc9\xce \xc4\xcc\xd1 GKrellM
License: GPL
Group: Monitoring
Url: http://gkrellm.luon.net/gkrellmms.phtml

Source0: http://gkrellm.luon.net/files/%plugin-%version.tar.bz2
Source1: gkrellmms-2.1.20-alt-ru_po.bz2
# removes gtk+-devel dependence
Patch0: http://lrn.ru/~bga/gkrellm/gkrellmms-2.1.9-alt-makefile.patch.gz
Patch1: http://lrn.ru/~bga/gkrellm/gkrellmms-2.1.6-alt-scroll_separator.patch.gz
Patch3: gkrellmms-2.1.22-alt-beep.patch.gz

Requires: gkrellm >= 2.2.0, xmms

# Automatically added by buildreq on Mon Apr 04 2005
BuildRequires: glib2-devel libatk-devel libgtk+2-devel libpango-devel pkgconfig
BuildRequires: gkrellm-devel >= 2.2.0
# XMMS
BuildRequires: gtk+-devel libxmms-devel
# Beep Media Player
BuildRequires: libbeep-devel >= 0.9.7, gnome-vfs2-devel
%if_without M24
BuildRequires: libGConf2-devel
%endif

%description
A plugin for GKrellM, which allows you to control XMMS player.

%description -l ru_RU.KOI8-R
\xf0\xcc\xc1\xc7\xc9\xce \xc4\xcc\xd1 GKrellM, \xd0\xcf\xda\xd7\xcf\xcc\xd1\xc0\xdd\xc9\xca \xd5\xd0\xd2\xc1\xd7\xcc\xd1\xd4\xd8 \xd0\xd2\xcf\xc9\xc7\xd2\xd9\xd7\xc1\xd4\xc5\xcc\xc5\xcd XMMS.

%package beep
Summary: GKrellM Beep plugin
Summary(ru_RU.KOI8-R): Beep-\xd0\xcc\xc1\xc7\xc9\xce \xc4\xcc\xd1 GKrellM
Group: Monitoring
Conflicts: %name
Requires: gkrellm >= 2.2.0, beep >= 0.9.7

%description beep
A plugin for GKrellM, which allows you to control Beep Media Player.

%description beep -l ru_RU.KOI8-R
\xf0\xcc\xc1\xc7\xc9\xce \xc4\xcc\xd1 GKrellM, \xd0\xcf\xda\xd7\xcf\xcc\xd1\xc0\xdd\xc9\xca \xd5\xd0\xd2\xc1\xd7\xcc\xd1\xd4\xd8 \xd0\xd2\xcf\xc9\xc7\xd2\xd9\xd7\xc1\xd4\xc5\xcc\xc5\xcd Beep.

%prep
%setup -q -n %plugin
#%patch0 -p0
%patch1 -p1
%patch3 -p1
%__bzip2 -cd %SOURCE1 > po/ru.po

# for old beep-0.9.6
#%%if_with M24
#%%__subst 's,pkg-config --cflags bmp,pkg-config --cflags beep,g' Makefile
#%%__subst 's,pkg-config --libs bmp,pkg-config --libs beep,g' Makefile
#%%__subst 's,bmp/beepctrl.h,beep/beepctrl.h,g' gkrellmms.h
#%%__subst 's,bmp/beepctrl.h,beep/beepctrl.h,g' playlist.h
#%%endif

%build
%make_build enable_nls=1 use_beep=yes CFLAGS="$RPM_OPT_FLAGS" LOCALEDIR=%_datadir/locale
%__mv %plugin.so %plugin-beep.so
%__rm -f *.o
%make_build enable_nls=1 use_beep=no CFLAGS="$RPM_OPT_FLAGS" LOCALEDIR=%_datadir/locale

%install
%__mkdir_p %buildroot%_libdir/gkrellm2/plugins
%make_install install enable_nls=1 DESTDIR=%buildroot LOCALEDIR=%_datadir/locale PLUGIN_DIR=%_libdir/gkrellm2/plugins
%__install -m 755 %plugin-beep.so %buildroot%_libdir/gkrellm2/plugins/%plugin-beep.so
%find_lang gkrellmms

%files -f gkrellmms.lang
%doc Changelog README Themes FAQ
%_libdir/gkrellm2/plugins/%plugin.so

%files beep -f gkrellmms.lang
%doc Changelog README Themes FAQ
%_libdir/gkrellm2/plugins/%plugin-beep.so

%changelog
* Mon Apr 04 2005 Grigory Batalov <bga@altlinux.ru> 2.1.22-alt1
- 2.1.22

* Tue Nov 02 2004 Grigory Batalov <bga@altlinux.ru> 2.1.20-alt3
- Beep patch updated for recent beep-devel package headers
- Exclude redundant title utf8-conversion for beep mode

* Fri Oct 22 2004 Grigory Batalov <bga@altlinux.ru> 2.1.20-alt2
- Patch to support either XMMS or Beep Media Player
- Build two conflicting packages at once

* Thu May 20 2004 Grigory Batalov <bga@altlinux.ru> 2.1.20-alt1
- 2.1.20
- ru.po updated
- GKrellMMS options callback fixed

* Mon Jun 30 2003 Grigory Batalov <bga@altlinux.ru> 2.1.12-alt1
- 2.1.12

* Tue Jun 10 2003 Grigory Batalov <bga@altlinux.ru> 2.1.11-alt1
- 2.1.11
- Forgotten GKRELLMMS_VERSION_REV updated to 11

* Mon May 05 2003 Grigory Batalov <bga@altlinux.ru> 2.1.9-alt1
- 2.1.9

* Sun Dec 29 2002 Grigory Batalov <bga@altlinux.ru> 2.1.6-alt1
- 2.1.6
- Various small fixes

* Thu Oct 31 2002 Grigory Batalov <bga@altlinux.ru> 2.1.3-alt1
- 2.1.3
- Patched for scroll_separator
- I18n patch improved

* Mon Oct 28 2002 Grigory Batalov <bga@altlinux.ru> 2.1.2-alt1
- 2.1.2
- New i18n patch made

* Fri May 17 2002 Grigory Batalov <bga@altlinux.ru> 0.5.6-alt2
- Group changed to GKrellM's one
- Small specfile changes

* Wed May 01 2002 Grigory Batalov <bga@altlinux.ru> 0.5.6-alt1
- 0.5.6 (updated for GKrellM >= 1.2.9)

* Sat Nov 24 2001 Grigory Batalov <bga@altlinux.ru> 0.5.5-alt1
- Built for ALTLinux
- Russian localization patch