]>
Commit | Line | Data |
---|---|---|
18ca76c1 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
18ca76c1 BS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = smartmontools |
9059d74c | 7 | version = 6.5 |
7dcf09a6 | 8 | release = 2 |
18ca76c1 | 9 | |
802ea3af MT |
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. | |
18ca76c1 | 14 | |
802ea3af | 15 | description |
7dcf09a6 SS |
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 | |
18ca76c1 | 21 | and failure. |
802ea3af MT |
22 | end |
23 | ||
9059d74c | 24 | source_dl = http://sourceforge.net/projects/smartmontools/files/smartmontools/%{version} |
802ea3af MT |
25 | |
26 | build | |
27 | requires | |
28 | gcc-c++ | |
7dcf09a6 | 29 | libcap-ng-devel |
802ea3af MT |
30 | end |
31 | ||
32 | configure_options += \ | |
7dcf09a6 SS |
33 | --mandir=%{mandir} \ |
34 | --sysconfdir=%{sysconfdir}/%{name} \ | |
35 | --with-libcap-ng=yes \ | |
36 | --with-systemdsystemunitdir=%{unitdir} | |
37 | ||
38 | test | |
39 | make check | |
40 | end | |
802ea3af MT |
41 | |
42 | install_cmds | |
7dcf09a6 | 43 | # Drop old sysvinit script. |
802ea3af | 44 | rm -rvf %{BUILDROOT}/etc/rc.d |
7dcf09a6 SS |
45 | |
46 | # Fix sysconfig path in systemd file. | |
47 | sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' \ | |
48 | %{BUILDROOT}%{unitdir}/smartd.service | |
802ea3af MT |
49 | end |
50 | end | |
51 | ||
52 | packages | |
53 | package %{name} | |
7dcf09a6 SS |
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 | |
802ea3af | 79 | end |
1f9bc2f0 MT |
80 | |
81 | package %{name}-debuginfo | |
82 | template DEBUGINFO | |
83 | end | |
802ea3af | 84 | end |