Blob Blame Raw
Name:     nagstamon
Version:  1.0.1
Release:  9%{?dist}
Summary:  Nagios status monitor for desktop

License:  GPLv2+
URL:      http://nagstamon.ifw-dresden.de/
Source0:  https://nagstamon.ifw-dresden.de/files-nagstamon/stable/Nagstamon-%{version}.tar.gz

BuildArch:     noarch
BuildRequires: pygtk2
BuildRequires: python2-devel  
BuildRequires: desktop-file-utils
Requires:      pygtk2
Requires:      python2-setuptools
Requires:      python2-beautifulsoup

%description
Nagstamon is a Nagios status monitor which takes place in system tray
or on desktop (GNOME, KDE, Windows) as floating status bar to inform
you in real-time about the status of your Nagios and derivatives
monitored network. It allows to connect to multiple Nagios,
Icinga, Opsview, Op5, Check_MK/Multisite, Centreon and Thruk servers.

%prep
%setup -q -n Nagstamon

#Remove embedded BeautifulSoup http://sourceforge.net/p/nagstamon/bugs/44/
rm -rf Nagstamon/BeautifulSoup.py

%build
%py2_build

%install
%py2_install

#Fix 'non-executable-script' error
chmod +x %{buildroot}%{python_sitelib}/Nagstamon/Server/Multisite.py

#Provide directory to install icon for desktop file
mkdir -p %{buildroot}%{_datadir}/pixmaps

#Copy icon to pixmaps directory
cp Nagstamon/resources/%{name}.svg %{buildroot}%{_datadir}/pixmaps/%{name}.svg

#Remove execute bit from icon
chmod -x %{buildroot}%{_datadir}/pixmaps/%{name}.svg

#Remove the file extension for convenience
mv %{buildroot}%{_bindir}/%{name}.py %{buildroot}%{_bindir}/%{name}

desktop-file-install --dir %{buildroot}/%{_datadir}/applications\
                     --delete-original\
                     --set-icon=%{name}.svg\
                     %{buildroot}%{python_sitelib}/Nagstamon/resources/%{name}.desktop

%files
%doc ChangeLog COPYRIGHT LICENSE
%{_datadir}/pixmaps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%{python2_sitelib}/Nagstamon/
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{python2_sitelib}/%{name}*.egg-info

%changelog
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Jan 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.1-6
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sun Nov 1 2015 Eduardo Echeverria <echevemaster@gmail.com> 1.0.1-1
- Updated to 1.0.1

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

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

* Mon Sep 16 2013 Nikita Klimov <nk@jaur.su> 0.9.11-1
- Updated to 0.9.11
- Updated description

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

* Wed Jul 17 2013 Nikita Klimov <nk@jaur.su> 0.9.10-2
- Fixed source url
- Fixed directory name in setup section

* Wed Jul 17 2013 Nikita Klimov <nk@jaur.su> 0.9.10-1
- Updated to 0.9.10
- Removed patch for fix security hole in updates-checking mechanism
- Removed gnome-python2-libegg from requires

* Sat Jul 06 2013 Nikita Klimov <nk@jaur.su> 0.9.9-9
- Added patch for fix security hole in updates-checking mechanism 

* Mon Apr 30 2013 Nikita Klimov <nk@jaur.su> 0.9.9-8
- Added gnome-python2-libegg to 'Requires' for fix incorrect display in tray

* Fri Apr 05 2013 Nikita Klimov <nk@jaur.su> 0.9.9-7
- Removed patch to fix FSF address, wait while upstream fix it yourself

* Fri Apr 05 2013 Nikita Klimov <nk@jaur.su> 0.9.9-6
- Added patch to fix FSF address in setup.py

* Tue Apr 02 2013 Nikita Klimov <nk@jaur.su> 0.9.9-5
- Fix icon file mode bits

* Mon Apr 01 2013 Nikita Klimov <nk@jaur.su> 0.9.9-4
- Replace python-devel to python2-devel in BuldRequires
- Copy desktop icon to pixmaps directory

* Mon Apr 01 2013 Nikita Klimov <nk@jaur.su> 0.9.9-3
- Remove embedded BeautifulSoup
- Add python-BeautifulSoup as Requires 
- Fix typo in files section

* Sun Mar 31 2013 Nikita Klimov <nk@jaur.su> 0.9.9-2
- Change license from GPLv2 to GPLv2+
- Added comments to install section
- Hard-coded paths replaced to macros

* Tue Mar 26 2013 Nikita Klimov <nk@jaur.su> 0.9.9-1
- Initial version of the package