]> git.ipfire.org Git - ipfire-3.x.git/blob - smartmontools/smartmontools.nm
pcengines-firmware: update to 4.9.0.7
[ipfire-3.x.git] / smartmontools / smartmontools.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = smartmontools
7 version = 6.5
8 release = 2
9
10 groups = System/Statistics
11 url = http://smartmontools.sourceforge.net/
12 license = GPLv2
13 summary = A set of tools that watches HDD S.M.A.R.T status.
14
15 description
16 The smartmontools package contains two utility programs (smartctl
17 and smartd) to control and monitor storage systems using the
18 Self-Monitoring, Analysis and Reporting Technology System (SMART)
19 built into most modern ATA and SCSI harddisks. In many cases,
20 these utilities will provide advanced warning of disk degradation
21 and failure.
22 end
23
24 source_dl = http://sourceforge.net/projects/smartmontools/files/smartmontools/%{version}
25
26 build
27 requires
28 gcc-c++
29 libcap-ng-devel
30 end
31
32 configure_options += \
33 --mandir=%{mandir} \
34 --sysconfdir=%{sysconfdir}/%{name} \
35 --with-libcap-ng=yes \
36 --with-systemdsystemunitdir=%{unitdir}
37
38 test
39 make check
40 end
41
42 install_cmds
43 # Drop old sysvinit script.
44 rm -rvf %{BUILDROOT}/etc/rc.d
45
46 # Fix sysconfig path in systemd file.
47 sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' \
48 %{BUILDROOT}%{unitdir}/smartd.service
49 end
50 end
51
52 packages
53 package %{name}
54 configfiles
55 %{sysconfdir}/smartmontools/smartd.conf
56 end
57
58 prerequires
59 systemd-units
60 end
61
62 script postin
63 systemctl daemon-reload >/dev/null 2>&1 || :
64 end
65
66 script preun
67 systemctl --no-reload disable smartd.service >/dev/null 2>&1 || :
68 systemctl stop smartd.service >/dev/null 2>&1 || :
69 end
70
71 script postun
72 systemctl daemon-reload >/dev/null 2>&1 || :
73 end
74
75 script postup
76 systemctl daemon-reload >/dev/null 2>&1 || :
77 systemctl try-restart smartd.service >/dev/null 2>&1 || :
78 end
79 end
80
81 package %{name}-debuginfo
82 template DEBUGINFO
83 end
84 end