A new user interface for you!

File conky.spec of Package conky

# spec file for package conky (Version 1.8.1)
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# norootforbuild

Summary:        A light-weight system monitor
Name:           conky
URL:            http://conky.sourceforge.net/
License:        BSD License
Version:        1.8.1
Source0:		%{name}-%{version}.tar.bz2
#Source0:		http://dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
Source1:		conky.desktop
Source2:		conky.png
Patch0:         apcupsd.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  make
BuildRequires:	cairo-devel
BuildRequires:  glib2-devel
BuildRequires:  imlib2-devel
BuildRequires:  libxml2-devel
BuildRequires:  lua-devel
BuildRequires:  ncurses-devel
BuildRequires:	tolua++-devel

%if 0%{?mandriva_version}
Group:		Monitoring
Release: %mkrel 3
BuildRequires:	curl-devel
BuildRequires:	gettext-devel
BuildRequires:	libx11-devel
BuildRequires:	libxdamage-devel
BuildRequires:	libxext-devel
BuildRequires:	libxfixes-devel
BuildRequires:	libxft-devel
BuildRequires:	libxslt-proc
BuildRequires: 	libiw-devel

%if 0%{?suse_version}
Group:          System/Monitoring
Release:        3
BuildRequires:	libcurl-devel
BuildRequires:	cairomm-devel
BuildRequires:  freetype2-devel
BuildRequires:	update-desktop-files
BuildRequires:  xorg-x11-devel
BuildRequires:	zlib-devel
BuildRequires:	libXNVCtrl
BuildRequires: 	libiw-devel
Requires:       %{name}-devel = %{version}-%{release}
Requires:       imlib2-loaders
Requires:       hddtemp

%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
Group:          User Interface/X
Release:        3%{?dist}
BuildRequires:  libXft-devel
BuildRequires:  libXt-devel
BuildRequires:  libXdamage-devel
BuildRequires:  libXext-devel
BuildRequires:  curl-devel
BuildRequires:  libXNVCtrl-devel
BuildRequires:  wireless-tools-devel

BuildRoot:	%{_tmppath}/%{name}-%{version}-build

Autoreqprov:    on

Conky, a fork of torsmo, is a light-weight system monitor under active development.

This version has the following enabled;

* X11: X11 XDamage XDBE Xft ARGB
* Music detection: MPD MOC
* General: math hddtemp portmon wireless config-output Imlib2 apcupsd I/O stats
* Lua bindings: Cairo Imlib2

%if 0%{?suse_version}
%package feature-nvidia
Summary:	Pseudo Package for %{name} with nVidia Support
Group:		System/Monitoring
Requires:	%{name} = %{version}-%{release}

%description feature-nvidia
This is a pseudo-package that doesn't contain any files but
requires the build of %{name}, which includes support
for nVidia GPU statistics.

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/Other

%description devel
This package contains development files for %{name}.

%setup -q
%patch0 -p0


%if 0%{?suse_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
%configure --enable-wlan \
           --enable-curl \
           --enable-rss \
           --enable-imlib2 \
           --enable-lua \
	   --enable-lua-cairo \
	   --enable-lua-imlib2 \
	   --enable-nvidia=yes \

make %{?jobs:-j%jobs}

%if 0%{?mandriva_version}
%configure2_5x \
	--disable-static \
	--disable-rpath \
	--enable-ibm \
	--enable-rss \
    --enable-curl \
	--enable-wlan \
	--enable-imlib2 \
    --enable-lua \
	--enable-lua-cairo --enable-lua-imlib2


%__install -D -m 0644 "%{S:1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%__install -D -m 0644 "%{S:2}" "%{buildroot}%{_datadir}/pixmaps/%{name}.png"

%if 0%{?suse_version}
%suse_update_desktop_file -i "%{name}"
for feature in nvidia; do
cat<<EOF >README.feature-"$feature"
This package acts as a placeholder for %{name} with
support for ${feature}, to avoid accidential removal
of that functionality through upgrading to a package
from a different repository.


%{__rm} -f %{buildroot}%{_libdir}/%{name}/*.a
%{__rm} -f %{buildroot}%{_libdir}/%{name}/*.la

%{__rm} -rf '%{buildroot}'

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%if 0%{?suse_version}
%post devel -p /sbin/ldconfig

%postun devel -p /sbin/ldconfig

%dir %{_sysconfdir}/conky
%config(noreplace) %{_sysconfdir}/conky/conky.conf
%config(noreplace) %{_sysconfdir}/conky/conky_no_x11.conf
%dir %{_libdir}/%{name}

%if 0%{?suse_version}
%files devel
%dir %{_libdir}/%{name}

%files feature-nvidia
%doc README.feature-nvidia

* Fri Sep 2 2011 agnelo@unixversal.com
- enabled curl and rss
- added apcupsd.patch
- Mandriva & Fedora build
* Wed Oct  6 2010 malcolmlewis@opensuse.org
- Version update
- Spec file clean up
* Thu Aug  5 2010 malcolmlewis@opensuse.org
- nvidia feature added