powerman/powerman.spec
Ismail Dönmez 1170c1133b Accepting request 344286 from home:pluskalm:branches:hardware
- Update to 2.3.24
  * Don't package /var/run/powerman; let systemd manage it 
		[TOSS-2987]
  * Cleanup: drop trailing whitespace
- Changes for 2.3.23
  * Build: silence CC lines, fix AC_LANG_CONFTEST warnings, fix 
		$(EXEEXT) warnings.
	*	Build: install System V init scripts if 
		--with-systemdsystemunitdir is not configured and include both 
		in EXTRA_DIST.
	* Build: re-enable 'make check' unit tests.
	* Build: fix some 'make distcheck' issues, but until unit tests 
		are fixed to find *.exp and *.conf files in $(srcdir), this will still fail.
	* RPM: configure genders, httppower, snmppower, and tcp-wrappers 
		unconditionally; update URL.
- Cleanups spec file with spec-cleaner
- Drop powerman.service and use bundled one

OBS-URL: https://build.opensuse.org/request/show/344286
OBS-URL: https://build.opensuse.org/package/show/hardware/powerman?expand=0&rev=27
2015-11-16 13:42:29 +00:00

113 lines
3.2 KiB
RPMSpec

#
# spec file for package powerman
#
# Copyright (c) 2015 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/
#
Name: powerman
Version: 2.3.24
Release: 0
Summary: Centralized Power Control for Clusters
License: GPL-2.0+
Group: Productivity/Clustering/HA
Url: https://github.com/chaos/powerman
Source0: https://github.com/chaos/powerman/releases/download/%{version}/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: ncurses-devel
BuildRequires: pkg-config
BuildRequires: tcpd-devel
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(systemd)
%{?systemd_requires}
%description
PowerMan is a tool for manipulating remote power control (RPC) devices from a
central location. Several RPC varieties are supported natively by PowerMan and
Expect-like configurability simplifies the addition of new devices.
%package -n libpowerman0
Summary: Libraries for applications using PowerMan
Group: System/Libraries
%description -n libpowerman0
A shared library for applications using PowerMan.
%package devel
Summary: Headers and libraries for developing applications using PowerMan
Group: Development/Libraries/C and C++
Requires: libpowerman0 = %{version}
%description devel
A header file and static library for developing applications using PowerMan.
%prep
%setup -q
%build
%configure \
--disable-static\
--with-httppower
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
mv %{buildroot}%{_sysconfdir}/powerman/powerman.conf.example %{buildroot}%{_sysconfdir}/powerman/powerman.conf
rm -r %{buildroot}%{_libdir}/stonith
%fdupes -s %{buildroot}
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%post -n libpowerman0 -p /sbin/ldconfig
%postun -n libpowerman0 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS DISCLAIMER COPYING NEWS README TODO
%{_bindir}/*
%dir %attr(0755,daemon,root) %ghost /run/powerman
%{_mandir}/man?/*.*
%exclude %{_mandir}/man3/*.*
%{_sbindir}/*
%dir %{_sysconfdir}/powerman
%attr(0644,root,root) %{_unitdir}/%{name}.service
%config %{_sysconfdir}/powerman/powerman.conf
%{_sysconfdir}/powerman/*.dev
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*.*
%files -n libpowerman0
%defattr(-,root,root)
%{_libdir}/*.so.*
%changelog