File: cpqarrayd.spec

package info (click to toggle)
cpqarrayd 2.3-1.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,008 kB
  • sloc: sh: 2,907; ansic: 1,039; makefile: 83
file content (72 lines) | stat: -rw-r--r-- 1,946 bytes parent folder | download | duplicates (5)
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
# Note that this is NOT a relocatable package
%define name		cpqarrayd
%define version		2.2
%define release		1

# defaults for redhat
%define prefix		/usr
%define sysconfdir	/etc

Summary: Cpqarrayd monitors SmartArray controllers for you and notifies by sending SNMP traps and via syslog.
Name: %{name}
Version: %{version}
Release: %{release}
Copyright: GPL
Group: Applications/System
URL: http://www.strocamp.net/opensource/cpqarrayd.php
Source: http://www.strocamp.net/opensource/compaq/downloads/cpqarrayd-2.2.tar.gz
Requires: net-snmp
Packager: Hugo Trippaers <opensource@strocamp.net>
BuildRoot: /var/tmp/%{name}-%{version}-root

%description
Cpqarrayd monitors SmartArray controllers for you and notifies by sending SNMP traps and via syslog.

%prep
%setup -q

# seems as if xss support is broken on alpha :-(
if [ ! -f configure ]; then
  CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir}
else
  CFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir}
fi

%build
make

%install
make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir}  install-strip

perl -i -p -e 's:\@installroot\@:%{prefix}:;' scripts/cpqarrayd

# install the startup script manually
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/
install scripts/cpqarrayd $RPM_BUILD_ROOT/etc/rc.d/init.d/
install scripts/cpqarrayd.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/cpqarrayd

%post
/sbin/chkconfig --add cpqarrayd

%preun
if [ "$1" = 0 ]
then
        /etc/rc.d/init.d/cpqarrayd stop >/dev/null >&2
        /sbin/chkconfig --del cpqarrayd
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README
%{prefix}/sbin/cpqarrayd
/etc/rc.d/init.d/cpqarrayd
/etc/sysconfig/cpqarrayd
/usr/man/man1/cpqarrayd.1.gz

###################################################################
%changelog