File xfce4-panel-plugin-pulseaudio.spec of Package xfce4-panel-plugin-pulseaudio

#
# spec file for package xfce4-panel-plugin-pulseaudio
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 Guido Berhoerster.
#
# 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/
#


%define panel_version 4.11.0
%define plugin_name xfce4-pulseaudio-plugin

Name:           xfce4-panel-plugin-pulseaudio
Version:        0.4.1
Release:        0
Summary:        Pulseaudio Volume Control Plugin for the Xfce Panel
License:        GPL-2.0-or-later
Group:          Productivity/Multimedia/Sound/Mixers
Url:            http://goodies.xfce.org/projects/panel-plugins/xfce4-pulseaudio-plugin
Source0:        http://archive.xfce.org/src/panel-plugins/%{plugin_name}/0.4/%{plugin_name}-%{version}.tar.bz2
BuildRequires:  intltool
BuildRequires:  pkgconfig(exo-1)
BuildRequires:  pkgconfig(glib-2.0) >= 2.42.0
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.20.0
BuildRequires:  pkgconfig(libpulse-mainloop-glib) >= 0.9.19
BuildRequires:  pkgconfig(libxfce4panel-2.0) >= 4.11.0
BuildRequires:  pkgconfig(libxfce4ui-2) >= 4.11.0
BuildRequires:  pkgconfig(libxfce4util-1.0) >= 4.9.0
BuildRequires:  pkgconfig(libxfconf-0) >= 4.6.0
# optional requirements
BuildRequires:  pkgconfig(gio-2.0) >= 2.42
BuildRequires:  pkgconfig(keybinder-3.0) >= 0.2.2
BuildRequires:  pkgconfig(libnotify) >= 0.7.0
BuildRequires:  pkgconfig(libwnck-3.0) >= 3.20
Requires:       pulseaudio
Requires:       xfce4-panel >= %{panel_version}
Recommends:     pavucontrol
Recommends:     %{name}-lang = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Xfce4-pulseaudio-plugin is a panel plugin for controlling an audio
output volume of the PulseAudio mixer. The volume can be adjusted using
keyboard shortcuts, mouse wheel, a slider in a popup menu, or via
a linked external audio mixer tool.

%lang_package

%prep
%setup -q -n %{plugin_name}-%{version}

%build
%if 0%{?suse_version} < 1330
## LEAP 42.x complains about "for (int i=0; ...)"
export CFLAGS="%{optflags} -std=c99"
%endif
%configure
make %{?_smp_mflags} V=1

%install
%make_install

rm -f %{buildroot}%{_libdir}/xfce4/panel/plugins/libpulseaudio-plugin.la

%find_lang %{plugin_name} %{?no_lang_C}

%if 0%{?suse_version} < 1500
%post
%icon_theme_cache_post

%postun
%icon_theme_cache_postun
%endif

%files
%defattr(-,root,root)
%doc ChangeLog README COPYING
%{_libdir}/xfce4/panel/plugins/libpulseaudio-plugin.so
%{_datadir}/xfce4/panel/plugins/pulseaudio.desktop
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/hicolor/*/status/*

%files lang -f %{plugin_name}.lang

%changelog
openSUSE Build Service is sponsored by