Search
j0ke.net Open Build Service
>
Projects
>
hardware
:
raid
>
hpacucli
> hpacucli.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File hpacucli.spec of Package hpacucli
#!BuildIgnore: post-build-checks Name: hpacucli Version: 9.40 Release: 12.0 Group: Applications/System License: See hpacucli.license URL: http://www.hp.com/linux Summary: HP Command Line Array Configuration Utility %ifarch x86_64 Source0: %{name}-%{version}-x86_64.tar.bz2 %else Source0: %{name}-%{version}-i386.tar.bz2 %endif Source1: %{name}-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: bzip2 procps %description The HP Command Line Array Configuration Utility is the disk array configuration program for Array Controllers. %prep %build %install mkdir -p %{buildroot} tar -C %{buildroot} -xjf %{S:0} export NO_BRP_CHECK_RPATH=true chmod -x %{buildroot}/usr/share/man/man8/* %pre PROCESSES=`ps -e|grep hpacucli|grep -v "\.pre"` if [ "$PROCESSES" != "" ]; then echo "hpacucli still running! Stop it first." exit 1; fi %post CPQARRAY_VERSION=2 CPQARRAY_PATCHLEVEL=4 CPQARRAY_SUBLEVEL=25 CCISS_VERSION=2 CCISS_PATCHLEVEL=4 CCISS_SUBLEVEL=44 cpqarray_status=0 cciss_status=0 CPQARRAY_DRIVER_FILE=\ `/sbin/insmod -p cpqarray 2>/dev/null|grep Using|sed -e 's/Using //'` CCISS_DRIVER_FILE=\ `/sbin/insmod -p cciss 2>/dev/null|grep Using|sed -e 's/Using //'` [ "$CPQARRAY_DRIVER_FILE" != "" ] && [ -f $CPQARRAY_DRIVER_FILE ] && { VER=`modinfo -d cpqarray | sed -e 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\)*.*/\1/g'` VERSION=`echo "$VER" | sed 's|[.]| |g' | awk '{print $1}'` PATCHLEVEL=`echo "$VER" | sed 's|[.]| |g' | awk '{print $2}'` SUBLEVEL=`echo "$VER" | sed 's|[.]| |g' | awk '{print $3}'` if [ $[$VERSION] -ge $CPQARRAY_VERSION ]; then if [ $[$PATCHLEVEL] -ge $CPQARRAY_PATCHLEVEL ]; then if [ $[$SUBLEVEL] -ge $CPQARRAY_SUBLEVEL ]; then echo " " > /dev/null else cpqarray_status=1 fi else cpqarray_status=1 fi else cpqarray_status=1 fi [ $cpqarray_status -eq 1 ] && { echo " " echo " " echo " ********************************************************" echo " WARNING: The version of cpqarray driver should be" echo " greater than or equal to "$CPQARRAY_VERSION"."$CPQARRAY_PATCHLEVEL"."$CPQARRAY_SUBLEVEL". " echo " If you have cpqarray controllers, " echo " please upgrade your cpqarray driver for proper " echo " functionality of Array Configuration Utility." echo " ********************************************************" } echo " " > /dev/null } [ "$CCISS_DRIVER_FILE" != "" ] && [ -f $CCISS_DRIVER_FILE ] && { VER=`modinfo -d cciss | sed -e 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\)*.*/\1/g'` VERSION=`echo "$VER" | sed 's|[.]| |g' | awk '{print $1}'` PATCHLEVEL=`echo "$VER" | sed 's|[.]| |g' | awk '{print $2}'` SUBLEVEL=`echo "$VER" | sed 's|[.]| |g' | awk '{print $3}'` if [ $[$VERSION] -ge $CCISS_VERSION ]; then if [ $[$PATCHLEVEL] -ge $CCISS_PATCHLEVEL ]; then if [ $[$SUBLEVEL] -ge $CCISS_SUBLEVEL ]; then echo " " > /dev/null else cciss_status=1 fi else cciss_status=1 fi else cciss_status=1 fi [ $cciss_status -eq 1 ] && { echo " " echo " " echo " ********************************************************" echo " WARNING: The version of cciss driver should be greater" echo " than or equal to "$CCISS_VERSION"."$CCISS_PATCHLEVEL"."$CCISS_SUBLEVEL". " echo " If you have cciss controllers, " echo " please upgrade your cciss driver for proper " echo " functionality of Array Configuration Utility." echo " ********************************************************" } echo " " > /dev/null } #land the lock file for sure mkdir -p --mode=700 /opt/compaq/cpqacuxe/bld/locks/ touch -t 0405060708 /opt/compaq/cpqacuxe/bld/locks/CPQACU_MUTEX %preun PROCESSES=`ps -e|grep hpacucli|grep -v "\.pre"` if [ "$PROCESSES" != "" ]; then echo "hpacucli still running! Stop it first." exit 1; else exit 0 fi %postun ARG1=$1 if [ "$ARG1" == "0" ] # the user is removing then INSTALL_ROOT=/opt/compaq/hpacucli rm -Rf "$INSTALL_ROOT" LOCK_ROOT=/var/opt/compaq rm -Rf "$LOCK_ROOT" fi %files %defattr(-,root,root) %dir /opt/compaq %dir /opt/compaq/hpacucli %dir /opt/compaq/hpacucli/bld /opt/compaq/hpacucli/bld/.hpacucli /opt/compaq/hpacucli/bld/.hpacuscripting /opt/compaq/hpacucli/bld/hpacucli /opt/compaq/hpacucli/bld/hpacucli-*.txt /opt/compaq/hpacucli/bld/hpacucli.license /opt/compaq/hpacucli/bld/hpacuscripting /opt/compaq/hpacucli/bld/libcpqimgr*.so /opt/compaq/hpacucli/bld/mklocks.sh /usr/share/man/man8/hpacucli.8.gz /usr/sbin/hpacucli /usr/sbin/hpacuscripting %changelog * Sat Apr 20 2013 Carsten Schoene <cs@linux-administrator.com> - 9.40-12 - update to release 9.40 * Sun Nov 18 2012 Carsten Schoene <cs@linux-administrator.com> - 9.30-15 - update to release 9.30 * Tue Jun 05 2012 Carsten Schoene <cs@linux-administrator.com> - 9.10-22 - update to release 9.10 * Tue Jun 05 2012 Carsten Schoene <cs@linux-administrator.com> - 9.0-24 - update to release 9.0 * Fri Jan 13 2012 Carsten Schoene <cs@linux-administrator.com> - 8.75-8 - update to release 8.75 * Sun Jun 12 2011 Carsten Schoene <cs@linux-administrator.com> - 8.70-8 - update to release 8.70 * Mon Oct 04 2010 Carsten Schoene <cs@linux-administrator.com> - 8.60-8 - update to release 8.60 * Mon Jun 28 2010 Carsten Schoene <cs@linux-administrator.com> - 8.50-6 - update to release 8.50 * Tue Mar 30 2010 Carsten Schoene <cs@linux-administrator.com> - 8.40-4 - initial rebuild of official package