Blob Blame History Raw
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           earcandy
Version:        0.9
Release:        2%{?dist}
Summary:        Sound level manager

Group:          Applications/Multimedia
# pulseaudio/lib.py is BSD-licensed, the rest is GPLv2+
License:        BSD and GPLv2+
URL:            https://launchpad.net/earcandy
Source0:        http://launchpad.net/%{name}/0.9/0.9/+download/%{name}_%{version}.tar.gz

BuildRequires:  python-devel
BuildRequires:  desktop-file-utils
BuildRequires:  python-distutils-extra
BuildRequires:  intltool
Requires:       pygobject2
Requires:       pygtk2
Requires:       dbus-python
Requires:       notify-python
Requires:       gnome-python2-libwnck
Requires:       pulseaudio-libs
Requires:       gnome-python2-gconf
BuildArch:      noarch


%description
A sound level manager that nicely fades applications in and out based on
their profile and window focus. It is useful if you need to fade out music
or video players during VoIP calls, switch to music player with focus when
more using than one, push sound to USB headsets on plugin, etc. Settings
can be configured via nice and simple UI.


%prep
%setup -q -n %{name}


%build
# Fix the shebangs
find . -name '*.py' -o -type f -name 'ear_candy' |
while read F
do
        S='/^#!/d'
        echo $F |grep -q '\.py$' || S='s,^#!/usr/bin/env python,#!/usr/bin/python,'
        sed "$S" $F >$F.new
        touch -r $F $F.new
        mv $F.new $F
done
%{__python} setup.py build


%install
%{__python} setup.py install --root %{buildroot} --prefix %{_prefix}
install -d %{buildroot}/%{_datadir}/applications
install -pm644 earcandy.desktop.in %{buildroot}/%{_datadir}/applications/earcandy.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/earcandy.desktop


%files
%{_bindir}/earcandy
%{_datadir}/applications/earcandy.desktop
%{_datadir}/earcandy
%{python_sitelib}/earcandy
%{python_sitelib}/*.egg-info
%doc debian/copyright


%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon Oct 28 2013 Lubomir Rintel <lkundrak@v3.sk> - 0.9-1
- Update to a later release

* Thu Oct 24 2013 Lubomir Rintel <lkundrak@v3.sk> - 0.5.1-13
- Bulk sad and useless attempt at consistent SPEC file formatting

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.5.1-7
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Sun Mar 28 2010 Lubomir Rintel <lkundrak@v3.sk> - 0.5.1-6
- Don't exclude the desktop file in share, it's used for autostart

* Tue Dec 29 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.5.1-5
- Don't depend on specific version of libpulse

* Thu Dec 24 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.5.1-4
- Don't require on 32bit libpulse

* Sun Oct 18 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.5.1-3
- Drop unnecessary python dependency
- Ignore duplicate desktop file

* Mon Oct 05 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.5.1-2
- Correct the license (Martin Gieseking, #527059#c2)
- Fix up the shebangs (Martin Gieseking, #527059#c2)
- Depend on specific version of PulseAudio ABI

* Sat Oct 03 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.5.1-1
- Initial packaging