]> git.pld-linux.org Git - packages/ppc64-diag.git/blob - ppc64-diag.spec
b9e3dddc16aeeae14c5bc25b7a590ab74300bbd1
[packages/ppc64-diag.git] / ppc64-diag.spec
1 # TODO: PLDify init scripts
2 Summary:        Diagnostics tools for Linux on Power platform
3 Summary(pl.UTF-8):      Narzędzia diagnostyczne dla Linuksa na platformie Power
4 Name:           ppc64-diag
5 Version:        2.7.2
6 Release:        0.1
7 License:        GPL v2+
8 Group:          Applications/System
9 Source0:        http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz
10 # Source0-md5:  e25d744043a29f9d5d2fb7c718958b34
11 Patch0:         %{name}-verbose.patch
12 URL:            http://linux-diag.sourceforge.net/ppc64-diag/
13 BuildRequires:  bison
14 BuildRequires:  flex
15 BuildRequires:  librtas-devel
16 BuildRequires:  libservicelog-devel
17 BuildRequires:  libstdc++-devel
18 BuildRequires:  libvpd-devel
19 BuildRequires:  ncurses-devel
20 BuildRequires:  sed >= 4.0
21 BuildRequires:  sqlite3-devel
22 Requires(post,preun):   rc-scripts
23 Requires(post,preun):   /sbin/chkconfig
24 Requires:       lsvpd >= 0.14
25 Requires:       rc-scripts
26 Requires:       servicelog >= 1.1
27 Conflicts:      powerpc-utils-ibm < 1.2.15
28 ExclusiveArch:  ppc ppc64
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Platform diagnostics for Linux for Power writes events reported by the
33 System p or System i platform firmware to the servicelog, provides
34 automated responses to urgent events such as environmental conditions
35 and predictive failures, and provides notifications of the event to
36 system administrators or connected service frameworks. Some error log
37 analysis parameters can be configured in
38 /etc/ppc64-diag/ppc64-diag.config.
39
40 %description -l pl.UTF-8
41 System diagnostyczny dla Linuksa na platformie Power zapisuje
42 zdarzenia zgłaszane przez firmware platformy Systemu p lub Systemu i
43 do logu serwisowego (servicelog), zapewnia automatyczne odpowiedzi na
44 pilne zdarzenia (jak np. warunki środowiskowe czy przewidywane awarie)
45 oraz powiadomienia o zdarzeniach dla administratorów lub podłączonych
46 systemów serwisowych. Pewne parametry analizy logów błędów można
47 ustawić w /etc/ppc64-diag/ppc64-diag.config.
48
49 %prep
50 %setup -q
51 %patch0 -p1
52
53 %{__sed} -i -e 's/yacc/\$(YACC)/' ela/Makefile
54
55 %{__sed} -i -e 's,/usr/libexec/ppc64-diag/,/etc/rc.d/init.d/,' scripts/*.service
56
57 %build
58 CFLAGS="%{rpmcflags}" \
59 CXXFLAGS="%{rpmcxxflags}" \
60 %{__make} \
61         CC="%{__cc}" \
62         CXX="%{__cxx}" \
63         YACC="bison -y"
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %{__make} install \
69         DESTDIR=$RPM_BUILD_ROOT \
70         LIB_DIR=%{_libdir} \
71         LIBEXEC_DIR=/etc/rc.d/init.d \
72         SYSTEMD_DIR=%{systemdunitdir}
73
74 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/packages
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %post
80 /etc/ppc64-diag/ppc64_diag_setup --register >/dev/null
81 /sbin/chkconfig --add rtas_errd
82 %service rtas_errd restart
83
84 %preun
85 if [ "$1" = "0" ]; then
86         %service -q rtas_errd stop
87         /sbin/chkconfig --del rtas_errd
88         /etc/ppc64-diag/ppc64_diag_setup --unregister >/dev/null
89 fi
90 %{nil}
91
92 # trigger on librtas upgrades
93 %triggerin -- librtas
94 if [ "$2" = "2" ]; then
95         /etc/rc.d/init.d/rtas_errd restart
96 fi
97
98 %files
99 %defattr(644,root,root,755)
100 %attr(755,root,root) %{_sbindir}/add_regex
101 %attr(755,root,root) %{_sbindir}/convert_dt_node_props
102 %attr(755,root,root) %{_sbindir}/diag_encl
103 %attr(755,root,root) %{_sbindir}/encl_led
104 %attr(755,root,root) %{_sbindir}/explain_syslog
105 %attr(755,root,root) %{_sbindir}/extract_opal_dump
106 %attr(755,root,root) %{_sbindir}/extract_platdump
107 %attr(755,root,root) %{_sbindir}/lp_diag
108 %attr(755,root,root) %{_sbindir}/opal-dump-parse
109 %attr(755,root,root) %{_sbindir}/opal-elog-parse
110 %attr(755,root,root) %{_sbindir}/opal_errd
111 %attr(755,root,root) %{_sbindir}/rtas_errd
112 %attr(755,root,root) %{_sbindir}/syslog_to_svclog
113 %attr(755,root,root) %{_sbindir}/usysattn
114 %attr(755,root,root) %{_sbindir}/usysident
115 %dir %{_sysconfdir}/ppc64-diag
116 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppc64-diag/ppc64-diag.config
117 %attr(754,root,root) %{_sysconfdir}/ppc64-diag/lp_diag_notify
118 %attr(754,root,root) %{_sysconfdir}/ppc64-diag/lp_diag_setup
119 %attr(754,root,root) %{_sysconfdir}/ppc64-diag/ppc64_diag_*
120 %{_sysconfdir}/ppc64-diag/servevent_parse.pl
121 %dir %{_sysconfdir}/ppc64-diag/message_catalog
122 %config(noreplace) %{_sysconfdir}/ppc64-diag/message_catalog/cxgb3
123 %config(noreplace) %{_sysconfdir}/ppc64-diag/message_catalog/e1000e
124 %config(noreplace) %{_sysconfdir}/ppc64-diag/message_catalog/exceptions
125 %config(noreplace) %{_sysconfdir}/ppc64-diag/message_catalog/gpfs
126 %config(noreplace) %{_sysconfdir}/ppc64-diag/message_catalog/reporters
127 %dir %{_sysconfdir}/ppc64-diag/message_catalog/with_regex
128 %config(noreplace) %{_sysconfdir}/ppc64-diag/message_catalog/with_regex/cxgb3
129 %config(noreplace) %{_sysconfdir}/ppc64-diag/message_catalog/with_regex/e1000e
130 %config(noreplace) %{_sysconfdir}/ppc64-diag/message_catalog/with_regex/gpfs
131 %config(noreplace) /etc/rc.powerfail
132 %config(noreplace) /etc/rc.d/init.d/opal_errd
133 %config(noreplace) /etc/rc.d/init.d/rtas_errd
134 %{systemdunitdir}/opal_errd.service
135 %{systemdunitdir}/rtas_errd.service
136 %dir /var/log/ppc64-diag
137 %{_mandir}/man8/diag_encl.8*
138 %{_mandir}/man8/encl_led.8*
139 %{_mandir}/man8/explain_syslog.8*
140 %{_mandir}/man8/lp_diag.8*
141 %{_mandir}/man8/opal-dump-parse.8*
142 %{_mandir}/man8/opal-elog-parse.8*
143 %{_mandir}/man8/opal_errd.8*
144 %{_mandir}/man8/syslog_to_svclog.8*
145 %{_mandir}/man8/usysattn.8*
146 %{_mandir}/man8/usysfault.8*
147 %{_mandir}/man8/usysident.8*
This page took 0.070205 seconds and 2 git commands to generate.