]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blobdiff - smartmontools/smartmontools.nm
smartmontools: Update to version 7.4-1
[people/pmueller/ipfire-3.x.git] / smartmontools / smartmontools.nm
index cf16053408e1752852e99b4b133167ba19c5731b..4c50175bcbf99883119b16f32f1b014a12647461 100644 (file)
@@ -4,43 +4,70 @@
 ###############################################################################
 
 name       = smartmontools
-version    = 5.40
+version    = 7.4
 release    = 1
 
 groups     = System/Statistics
-url        = http://smartmontools.sourceforge.net/
+url        = https://www.smartmontools.org
 license    = GPLv2
-summary    = A set of tools that watches HDD S.M.A.R.T status.
+summary    = A set of tools that watches HDD S.M.A.R.T status
 
 description
-       The smartmontools package contains two utility programs (smartctl \
-       and smartd) to control and monitor storage systems using the \
-       Self-Monitoring, Analysis and Reporting Technology System (SMART) \
-       built into most modern ATA and SCSI harddisks. In many cases, \
-       these utilities will provide advanced warning of disk degradation \
+       The smartmontools package contains two utility programs (smartctl
+       and smartd) to control and monitor storage systems using the
+       Self-Monitoring, Analysis and Reporting Technology System (SMART)
+       built into most modern ATA and SCSI harddisks. In many cases,
+       these utilities will provide advanced warning of disk degradation
        and failure.
 end
 
-source_dl  = http://downloads.sourceforge.net/project/%{name}/%{name}/%{thisapp}
+source_dl  = https://sourceforge.net/projects/smartmontools/files/smartmontools/%{version}
 
 build
        requires
                gcc-c++
-               libselinux-devel
+               libcap-ng-devel
+               systemd-devel
        end
 
        configure_options += \
-               --mandir=/usr/share/man \
-               --sysconfdir=/etc \
-               --with-selinux
+               --sysconfdir=%{sysconfdir}/%{name} \
+               --with-libcap-ng=yes \
+               --with-libsystemd \
+               --with-systemdsystemunitdir=%{unitdir}
 
-       install_cmds
-               rm -rvf %{BUILDROOT}/etc/rc.d
+       test
+               make check
        end
 end
 
 packages
        package %{name}
+               configfiles
+                       %{sysconfdir}/smartmontools/smartd.conf
+               end
+
+               prerequires
+                       systemd-units
+               end
+
+               script postin
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script preun
+                       systemctl --no-reload disable smartd.service >/dev/null 2>&1 || :
+                       systemctl stop smartd.service >/dev/null 2>&1 || :
+               end
+
+               script postun
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl try-restart smartd.service >/dev/null 2>&1 || :
+               end
        end
 
        package %{name}-debuginfo