You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
6.1 KiB

Name: pnmixer
Version: 0.7.2
Release: 2%{?dist}
Summary: Lightweight mixer applet
Group: Applications/Multimedia
License: GPLv3
URL: https://github.com/nicklan/pnmixer
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# revert https://github.com/nicklan/pnmixer/commit/238fbb8
# and add mate-volume-control
Patch1: pnmixer_default-mixer-command.patch
# Fix GtkNotebook for gtk+ themes
Patch2: pnmixer_add-frame-style-class-to-GtkNotebook.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: alsa-lib-devel
BuildRequires: gtk3-devel
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: libnotify-devel
BuildRequires: cmake3
BuildRequires: ninja-build
# pavucontrol should be the default in fedora
Requires: pavucontrol
%description
PNMixer is system tray sound mixer. Currently it supports ALSA and PulseAudio.
It is written in C, depends only on GTK+, and does not require Gnome.
PNMixer is a fork of OBMixer with a number of additions. These include:
* Volume adjustment with the scroll wheel
* Textual display of volume level in popup window
* Continuous volume adjustment when dragging the slider (not just when you let
go)
* Draw a volume level onto system tray icon
* Use system icon theme for icons and use mute/low/medium/high volume icons
* Configurable middle click action (default is mute/unmute)
* Preferences for:
* volume text display
* volume text position
* icon theme
* amount to adjust per scroll
* middle click action
* drawing of volume level on tray icon
%prep
%autosetup -p1
# Fix icon in launcher
sed -i 's/Icon=pnmixer/Icon=multimedia-volume-control/' data/desktop/pnmixer.desktop.in
%build
%__mkdir_p %_target_platform
pushd %_target_platform
%cmake3 -DWITH_GTK3:BOOL=ON -DWITH_LIBNOTIFY:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=ON -GNinja ..
%ninja_build
popd
%install
%ninja_install -C %_target_platform
# Don't install a launcher in the menu but in autostart
mkdir -p %{buildroot}%{_sysconfdir}/xdg/autostart
mv %{buildroot}%{_datadir}/applications/%{name}.desktop \
%{buildroot}%{_sysconfdir}/xdg/autostart/
rm -rf %{buildroot}/applications/
# minor fixes for the desktop file
# upstream https://github.com/nicklan/pnmixer/issues/18
desktop-file-install \
--delete-original \
--dir=%{buildroot}%{_sysconfdir}/xdg/autostart \
--add-category="Audio" \
--add-category="TrayIcon" \
--add-only-show-in="MATE;XFCE;LXDE;X-Cinnamon;" \
%{buildroot}%{_sysconfdir}/xdg/autostart/%{name}.desktop
#move doc dir
mv %{buildroot}%{_datadir}/doc .
%find_lang %{name} --with-gnome --all-name
%files -f %{name}.lang
%doc AUTHORS ChangeLog HACKING.md MAINTAINING.md README.md doc/PNMixer/html
%license COPYING
%{_bindir}/%{name}
%{_datadir}/%{name}/
%config %{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%{_mandir}/man1/%{name}.1.*
%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 14 2018 Wolfgang Ulbrich <fedora@raveit.de> - 0.7.2-1
- update to 0.7.2 and modernize spec file
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Jul 05 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.5.1-11
- Let configure.in honor CFLAGS (Fix FTBFS).
- Modernize spec file.
- Remove dysfunctional attempt to fix RHBZ#800642.
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Sep 01 2013 Mat Booth <fedora@matbooth.co.uk> - 0.5.1-7
- Add missing BRs, rhbz #992808
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Mar 10 2012 Christoph Wickert <cwickert@fedoraproject.org> - 0.5.1-3
- Build with $RPM_OPT_FLAGS (#800642)
- Minor fixes for desktop file
* Sun Mar 04 2012 Christoph Wickert <cwickert@fedoraproject.org> - 0.5.1-2
- Fix launcher icon
- Don't install a launcher in the application menu
* Sat Mar 03 2012 Christoph Wickert <cwickert@fedoraproject.org> - 0.5.1-1
- Update to 0.5.1
- Only autostart in LXDE or Xfce
* Fri Dec 09 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.5-1
- Update to 0.5 (#729741)
- Drop on_mixer patch (similar change included)
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 0.3-2
- Rebuild for new libpng
* Wed Jun 08 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.3-1
- Update to 0.3
- Change license tag to GPLv3 (only)
- Patch default mouse scroll step to 5
* Fri Jun 03 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.2-1
- Initial package based on obmixer package