/[packages]/cauldron/powerman/current/SPECS/powerman.spec
ViewVC logotype

Contents of /cauldron/powerman/current/SPECS/powerman.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 404859 - (show annotations) (download)
Sun Mar 24 15:20:47 2013 UTC (11 years ago) by colin
File size: 3634 byte(s)
Add systemd requires and general post/pre fixes (mga#9302)
1 %define major 0
2 %define libname %mklibname powerman %{major}
3 %define develname %mklibname -d powerman
4
5 Summary: Power to the Cluster
6 Name: powerman
7 Version: 2.3.9
8 Release: %mkrel 4
9 Group: System/Servers
10 License: GPLv2+
11 URL: http://code.google.com/p/powerman/
12 Source0: http://powerman.googlecode.com/files/powerman-%{version}.tar.gz
13 Requires(post): systemd >= %{systemd_required_version}
14 Requires(post): rpm-helper
15 Requires(preun): rpm-helper
16 Requires(pre): rpm-helper
17 Requires(postun): rpm-helper
18 BuildRequires: bison
19 BuildRequires: flex
20 BuildRequires: genders-devel
21 BuildRequires: libcurl-devel
22 BuildRequires: ncurses-devel
23 BuildRequires: net-snmp-devel
24 BuildRequires: readline-devel
25 BuildRequires: tcp_wrappers-devel
26 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
27
28 %description
29 PowerMan is a tool for manipulating remote power control (RPC) devices from a
30 central location. Several RPC varieties are supported natively by PowerMan and
31 Expect-like configurability simplifies the addition of new devices.
32
33 %package -n %{libname}
34 Summary: PowerMan library
35 Group: System/Libraries
36
37 %description -n %{libname}
38 PowerMan is a tool for manipulating remote power control (RPC) devices from a
39 central location. Several RPC varieties are supported natively by PowerMan and
40 Expect-like configurability simplifies the addition of new devices.
41
42 %package -n %{develname}
43 Summary: Static library and header files for the PowerMan library
44 Group: Development/C
45 Provides: %{name}-devel = %{version}
46 Provides: lib%{name}-devel = %{version}
47 Requires: %{libname} = %{version}
48
49 %description -n %{develname}
50 PowerMan is a tool for manipulating remote power control (RPC) devices from a
51 central location. Several RPC varieties are supported natively by PowerMan and
52 Expect-like configurability simplifies the addition of new devices.
53
54 This package contains the static genders library and its header files.
55
56 %prep
57
58 %setup -q
59
60 %build
61 %serverbuild
62 %configure2_5x \
63 --with-snmppower \
64 --with-httppower \
65 --with-genders \
66 --with-ncurses \
67 --with-user=powerman
68
69 # parallel makes often fail
70 make -e VERSION=%{version} EXTRA_CFLAGS="$CFLAGS"
71
72 %install
73 rm -rf %{buildroot}
74
75 install -d %{buildroot}%{_initrddir}
76
77 %makeinstall_std mandir=%{_mandir}
78
79 # work around a problem in the install make file target
80 rm %{buildroot}%{_bindir}/pm
81 pushd %{buildroot}%{_bindir}
82 ln -s powerman pm
83 popd
84
85 # get rid of execute bit on powerman script files to fix rpmlint errror
86 chmod -x %{buildroot}%{_sysconfdir}/%{name}/*
87
88 mv %{buildroot}%{_sysconfdir}/init.d/%{name} %{buildroot}%{_initrddir}/
89
90 # Don't turn on by default
91 %{__perl} -pi -e 's|chkconfig:.*95 5|chkconfig: - 95 5|g' %{buildroot}%{_initrddir}/%{name}
92
93 # don't package this for now
94 rm -rf %{buildroot}%{_libdir}/stonith
95
96 mkdir -p %{buildroot}%{_tmpfilesdir}
97 cat <<EOF > %{buildroot}%{_tmpfilesdir}/%{name}.conf
98 d /run/powerman 0755 powerman powerman
99 EOF
100
101 %pre
102 %_pre_useradd powerman /var/empty /bin/sh
103
104 %postun
105 %_postun_userdel powerman
106
107 %post
108 %_tmpfilescreate %{name}
109 %_post_service powerman
110
111 %preun
112 %_preun_service powerman
113
114 %clean
115 rm -rf %{buildroot}
116
117 %files
118 %doc ChangeLog DISCLAIMER COPYING NEWS TODO
119 %{_initrddir}/%{name}
120 %{_bindir}/powerman
121 %{_bindir}/pm
122 %{_sbindir}/plmpower
123 %{_sbindir}/powermand
124 %{_sbindir}/httppower
125 %{_sbindir}/snmppower
126 %{_sbindir}/vpcd
127 %dir %{_sysconfdir}/%{name}/
128 %config(noreplace) %{_sysconfdir}/%{name}/*
129 %{_tmpfilesdir}/%{name}.conf
130 %{_mandir}/man*/*
131
132 %files -n %{libname}
133 %doc COPYING
134 %{_libdir}/*.so.%{major}*
135
136 %files -n %{develname}
137 %{_includedir}/*
138 %{_libdir}/*.so
139 %{_libdir}/*.a
140 %{_libdir}/*.la
141 %{_libdir}/pkgconfig/*.pc

  ViewVC Help
Powered by ViewVC 1.1.30