File alsamixergui.spec of Package alsamixergui

#
# spec file for package alsamixergui
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           alsamixergui
BuildRequires:  alsa-devel
BuildRequires:  automake
BuildRequires:  fltk-devel
BuildRequires:  gcc-c++
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-devel
%define _prefix	/usr
%define package_version 0.9.0rc1-2
Summary:        An FLTK-Based Front-End for alsamixer
Version:        0.9.0rc1
Release:        0
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Mixers
# Source:		%{name}-%{version}.tar.bz2
Source:         %{name}-%{package_version}.tar.bz2
Source1:        alsamixergui.desktop
Source2:        alsamixergui.png
Patch:          alsamixergui.dif
Patch1:         alsamixergui-memleak-fix.diff
Patch2:         alsamixergui-lvalue.diff
Patch3:         alsamixergui-fltk13.diff
Url:            ftp://www.iua.upf.es/pub/mdeboer
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
AlsaMixerGui is an FLTK-based front-end for alsamixer. It is written
directly on top of the alsamixer source, so it should provide the same
functionality.

%prep
%setup -q -n %{name}-%{package_version}
#%setup
%patch
%patch1
%patch2
%patch3 -p1
%{?suse_update_config:%{suse_update_config -f}}

%build
autoreconf -fi
export CXXFLAGS="$RPM_OPT_FLAGS" 
%configure
make %{?_smp_mflags}

%install
make DESTDIR="$RPM_BUILD_ROOT" install
%if %suse_version > 820
%suse_update_desktop_file -i alsamixergui AudioVideo Mixer
%endif
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
cp %{SOURCE2} $RPM_BUILD_ROOT/usr/share/pixmaps

%files
%defattr(-, root, root)
%{_bindir}/alsamixergui
%if %suse_version > 820
/usr/share/applications/*.desktop
%endif
/usr/share/pixmaps/*.png
%doc README AUTHORS COPYING ChangeLog NEWS

%changelog