# # spec file for package openhpi # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?suse_version} > 1140 %define has_systemd 1 %endif Name: openhpi Version: 3.6.1 Release: 0 # # BuildRequires: OpenIPMI-devel BuildRequires: autoconf BuildRequires: automake BuildRequires: docbook-toys BuildRequires: docbook-utils BuildRequires: e2fsprogs-devel BuildRequires: gcc-c++ BuildRequires: gdbm-devel BuildRequires: glib2-devel BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: ncurses-devel BuildRequires: net-snmp-devel BuildRequires: tcpd-devel %if 0%{?has_systemd} BuildRequires: pkgconfig(systemd) %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build # Url: http://sourceforge.net/projects/openhpi/ # http://sourceforge.net/projects/openhpi/files/openhpi-stable/3.6.0/openhpi-3.6.0.tar.gz/download Source: openhpi-%{version}.tar.gz Source1: openhpi-rpmlintrc Source2: AUTHORS Patch: unlink-pidfile-on-error.patch Patch2: openhpi-3.4.0-systemd.patch Patch3: openhpi-3.6.0_fix_net-snmp_disable_MD5.patch # Summary: Implementation of SA Forum's Hardware Platform Interface (HPI) License: BSD-3-Clause Group: System/Monitoring %description OpenHPI is an open source project created with the intent of providing an implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers. HPI includes a resource modeling; access to and control over sensor, control, watchdog, and inventory data associated with resources; abstracted System Event Log interfaces; hardware events and alerts; and a managed hotswap interface. OpenHPI provides a modular mechanism for adding new hardware and device support easily. Many plug-ins exist in the OpenHPI source tree to provide access to various types of hardware. This includes, but is not limited to, IPMI based servers, Blade Center, and machines that export data via sysfs. For up-to-date status on these components, check out the status page. %package devel Requires: OpenIPMI-devel Requires: bzip2 Requires: e2fsprogs-devel Requires: gdbm-devel Requires: glib2-devel Requires: glibc-devel Requires: libstdc++-devel Requires: libtool Requires: ncurses-devel Requires: net-snmp-devel Requires: openhpi = %{version} Requires: openhpi-daemon Requires: openssl-devel Requires: popt-devel Requires: zlib-devel Summary: Development Files for HPI Group: Development/Libraries/C and C++ %description devel Contains additional files needed for a developer to create applications and/or middleware that use the Service Availability Forum's HPI specification %package clients Requires: openhpi = %{version} Summary: HPI Command-line Applications Group: System/Monitoring %description clients This package contains HPI command-line utilities Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers. %package daemon Requires: openhpi = %{version} Summary: Implementation of SA Forum's Hardware Platform Interface (HPI) Group: System/Monitoring %if 0%{?has_systemd} %{?systemd_requires} %else PreReq: %insserv_prereq %fillup_prereq %endif %description daemon OpenHPI is an open source project created with the intent of providing an implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers. HPI includes a resource modeling; access to and control over sensor, control, watchdog, and inventory data associated with resources; abstracted System Event Log interfaces; hardware events and alerts; and a managed hotswap interface. OpenHPI provides a modular mechanism for adding new hardware and device support easily. Many plugins exist in the OpenHPI source tree to provide access to various types of hardware. This includes, but is not limited to, IPMI based servers, Blade Center, and machines which export data via sysfs. For up-to-date status on these components, please check out the status page. %prep %setup -q %patch -p1 %if 0%{?has_systemd} %patch2 -p1 %endif %patch3 -p1 %build cp %{S:2} . autoreconf -fiv # fix permissions chmod a-x plugins/simulator/*.[ch] chmod a-x clients/*.[ch] export CFLAGS="%{optflags} -fno-strict-aliasing -DGLIB_DISABLE_DEPRECATION_WARNINGS" export CXXFLAGS="${CFLAGS}" %configure \ --disable-static \ --enable-ipmi --disable-sysfs --enable-daemon \ --enable-ipmidirect--enable-simulator --enable-clients \ --enable-ilo2_ribcl --enable-oa_soap \ %if 0%{?has_systemd} --with-systemdsystemunitdir=%{_unitdir} \ %endif --with-varpath=/var/lib/%{name} %{__make} %{__make} documentation ################################################### %install ################################################### %makeinstall %{__install} -Dd -m 0755 \ %{buildroot}%{_sysconfdir}/openhpi \ %{buildroot}/var/lib/openhpi %{__install} -m 0644 openhpi.conf.example %{buildroot}%{_sysconfdir}/openhpi/openhpi.conf #%{__cp} -a README COPYING docs/hld/openhpi-manual %{buildroot}%{_docdir}/%{name}/ %{__rm} -rv %{buildroot}%{_datadir}/doc/%{name} %{__rm} -v %{buildroot}%{_libdir}/{,openhpi/}*.la %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %if 0%{?has_systemd} %pre daemon %service_add_pre openhpid.service %endif %preun daemon %if 0%{?has_systemd} %service_del_preun openhpid.service %else %stop_on_removal openhpid %endif %post daemon /sbin/ldconfig %if 0%{?has_systemd} %service_add_post openhpid.service %else %fillup_and_insserv -f openhpid %endif echo "Check OPENHPI_UNCONFIGURED in /etc/openhpi/openhpi.conf !" %postun daemon /sbin/ldconfig %if 0%{?has_systemd} %service_del_postun openhpid.service %else %insserv_cleanup %restart_on_update openhpid %endif %files %defattr(-,root,root,0755) %dir %attr(0750,root,root) %{_sysconfdir}/openhpi %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/openhpi/* %doc ChangeLog COPYING AUTHORS README README.daemon *.example #%doc %{_docdir}/%{name}/ %dir /var/lib/openhpi %dir %{_libdir}/openhpi %{_libdir}/libopen*.so.* %{_libdir}/openhpi/lib*.so* %{_mandir}/man7/openhpi.7* %files devel %defattr(-,root,root) %{_includedir}/openhpi %{_libdir}/pkgconfig/openhpi.pc %{_libdir}/pkgconfig/openhpiutils.pc %{_libdir}/libopen*.so %files clients %defattr(-,root,root) %{_bindir}/hpi* %{_mandir}/man1/hpi*.1* %{_bindir}/oh* %{_mandir}/man1/oh*.1* %files daemon %defattr(-,root,root) %doc README.daemon %if 0%{?has_systemd} %{_unitdir}/openhpid.service %else /etc/init.d/openhpid %endif %{_sbindir}/openhpid %{_mandir}/man8/openhpid.8* %changelog