forked from chaos/powerman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
powerman.spec.in
140 lines (115 loc) · 3.5 KB
/
powerman.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
Name: @META_NAME@
Version: @META_VERSION@
Release: @META_RELEASE@%{?dist}
Summary: PowerMan - centralized power control for clusters
License: GPL
Group: Applications/System
Url: http://github.com/chaos/powerman
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: tcp_wrappers-devel
BuildRequires: genders
BuildRequires: curl-devel
BuildRequires: net-snmp-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(systemd)
%package devel
Requires: %{name} = %{version}-%{release}
Summary: Headers and libraries for developing applications using PowerMan
Group: Development/Libraries
%package libs
Requires: %{name} = %{version}-%{release}
Summary: Libraries for applications using PowerMan
Group: System Environment/Libraries
%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.
%description devel
A header file and static library for developing applications using PowerMan.
%description libs
A shared library for applications using PowerMan.
%prep
%setup
%build
%configure \
--with-genders \
--with-httppower \
--with-snmppower \
--with-tcp-wrappers \
--with-systemdsystemunitdir=%{_unitdir} \
--program-prefix=%{?_program_prefix:%{_program_prefix}}
make
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post
/bin/systemctl enable powerman > /dev/null 2>&1 ||:
%post libs
if [ -x /sbin/ldconfig ]; then /sbin/ldconfig %{_libdir}; fi
%preun
if [ "$1" = 0 ]; then
systemctl stop powerman >/dev/null 2>&1 || :
systemctl disable powerman > /dev/null 2>&1 || :
fi
%postun
if [ "$1" -ge 1 ]; then
systemctl try-restart powerman >/dev/null 2>&1 || :
fi
%postun libs
if [ -x /sbin/ldconfig ]; then /sbin/ldconfig %{_libdir}; fi
%files
%defattr(-,root,root,0755)
%doc DISCLAIMER
%doc COPYING
%doc NEWS
%doc TODO
%{_bindir}/powerman
%{_bindir}/pm
%{_sbindir}/powermand
%{_sbindir}/vpcd
%{_sbindir}/httppower
%{_sbindir}/snmppower
%{_sbindir}/plmpower
%dir %config %{_sysconfdir}/powerman
%{_sysconfdir}/powerman/*.dev
%{_sysconfdir}/powerman/powerman.conf.example
%{_mandir}/*1/*
%{_mandir}/*5/*
%{_mandir}/*8/*
%{_libdir}/stonith/plugins/external/powerman
%{_unitdir}/powerman.service
%files devel
%defattr(-,root,root,0755)
%{_includedir}/*
%{_libdir}/*.la
%{_mandir}/*3/*
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%files libs
%defattr(-,root,root,0755)
%{_libdir}/*.so.*
%changelog
* Fri Oct 23 2015 Jim Garlick <[email protected]> 2.3.24-1
- Don't package /var/run/powerman; let systemd manage this directory.
* Fri May 29 2015 Jim Garlick <[email protected]> 2.3.23-1
- Drop conditional builds as full build works everywhere now, more or less
- Drop AIX library handling conditionals (unused?)
* Fri May 29 2015 Jim Garlick <[email protected]> 2.3.20-1
- Switch to systemd init
* Tue Feb 14 2006 Ben Woodard <[email protected]> 1.0.22-3
- Changed /usr/bin to bindir
- Changed /usr/sbin to sbindir
- Added COPYING to list of docs.
- Changed /etc/rc.d/init.d/ to initrddir
- Changed /usr/man to mandir
- Added a fully qualified path to the source file.
- Fixed buildroot
- Added a patch which should fix a fc4 build problem.
* Thu Feb 09 2006 Ben Woodard <[email protected]> 1.0.22-2
- changed the buildroot to match fedora guidlines
- changed permissions of spec and src files.
- added changelog to spec file