%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} Name: gsmartcontrol Version: 1.0.2 Release: 1%{?dist} Summary: Graphical user interface for smartctl Group: Applications/System # Note that the "Whatever" license is effectively the MIT license. See email # from Tom Callaway to Fedora-legal-list on 18-APR-2011. License: (GPLv2 or GPLv3) and BSD and zlib and Boost and MIT URL: http://gsmartcontrol.sourceforge.net Source0: https://downloads.sourceforge.net/project/%{name}/%{version}/%{name}-%{version}.tar.bz2 Requires: smartmontools Requires: hicolor-icon-theme Requires: usermode-gtk # Patch man page and .desktop file to drop references to gsmartcontrol-root, # as Fedora uses console-helper instead. Patch0: gsmartcontrol-0.8.7-console-helper.patch # Avoid bundled pcrecpp Patch1: gsmartcontrol-0.8.7-system-pcrecpp.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gtkmm30-devel BuildRequires: pcre-devel BuildRequires: desktop-file-utils %description GSmartControl is a graphical user interface for smartctl (from smartmontools package), which is a tool for querying and controlling SMART (Self-Monitoring, Analysis, and Reporting Technology) data on modern hard disk drives. It allows you to inspect the drive's SMART data to determine its health, as well as run various tests on it. %prep %setup -q rm -f src/pcrecpp/* %patch -P 0 -p1 -b .console-helper %patch1 -p2 -b .system-pcrecpp autoreconf -fiv %build %configure --docdir=%{_pkgdocdir} %make_build %install %make_install install -pm 644 COPYING %{buildroot}%{_pkgdocdir} # Fedora uses console-helper to run privileged programs, so we don't # need the gsmartcontrol-root executable rm %{buildroot}%{_bindir}/%{name}-root # Set up for console-helper mkdir -p %{buildroot}%{_sbindir} mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}/%{name} ln -s consolehelper %{buildroot}%{_bindir}/%{name} mkdir -p %{buildroot}%{_sysconfdir}/pam.d cat <%{buildroot}%{_sysconfdir}/pam.d/%{name} #%%PAM-1.0 auth include config-util account include config-util session include config-util EOF mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps cat <%{buildroot}%{_sysconfdir}/security/console.apps/%{name} USER=root PROGRAM=/usr/sbin/gsmartcontrol SESSION=true EOF %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %{_bindir}/%{name} %{_sbindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/%{name} %{_datadir}/pixmaps/%{name}.png %{_datadir}/pixmaps/%{name}.xpm %{_datadir}/icons/hicolor/*x*/apps/%{name}.png %{_mandir}/man1/%{name}.1.* %{_mandir}/man1/%{name}-root.1.* %{_pkgdocdir} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/security/console.apps/%{name} %{_datadir}/metainfo/gsmartcontrol.appdata.xml %changelog * Fri Jul 21 2017 Vasiliy N. Glazov - 1.0.2-1 - Update to 1.0.2 * Mon Jun 19 2017 Vasiliy N. Glazov - 1.0.1-1 - Update to 1.0.1 * Sat Jun 17 2017 Vasiliy N. Glazov - 1.0.0-1 - Update to 1.0.0 * Thu May 11 2017 Vasiliy N. Glazov - 0.9.0-1 - Update to 0.9.0 - Update source url * Wed Sep 28 2016 Vasiliy N. Glazov - 0.8.7-10 - Use system pcrecpp (#1119134) - Require usermode-gtk (#1368430) * Fri Oct 26 2012 Eric Smith 0.8.7-1 - Update to latest upstream. - Dropped patches 1 and 2. * Thu Jul 19 2012 Fedora Release Engineering - 0.8.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Feb 10 2012 Petr Pisar - 0.8.6-6 - Rebuild against PCRE 8.30 * Mon Jan 16 2012 Eric Smith 0.8.6-5 - Patch to compile with GCC 4.7. * Fri Jan 13 2012 Fedora Release Engineering - 0.8.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Dec 12 2011 Eric Smith 0.8.6-3 - Patch to work around deprecated g_static_mutex. * Sat Dec 03 2011 Eric Smith 0.8.6-2 - Updated per package review comments. * Sat Oct 08 2011 Eric Smith 0.8.6-1 - Updated to latest upstream release. - Removed obsolte BuildRoot tag, clean section, defattr, etc. - Added runtime requirements for smartmontools and hicolor-icon-theme, per the suggestions in the package review (bug 697247). * Mon Apr 18 2011 Eric Smith 0.8.5-2 - Changed "Whatever" to "MIT" in license tag, based on Tom Callaway's post to Fedora-legal-list. * Sun Apr 17 2011 Eric Smith 0.8.5-1 - Initial version