| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- ##
- ## tsmc.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package information
- Name: tsmc
- Summary: Tivoli Storage Manager (TSM) Client
- URL: http://www.tivoli.com/support/storage_mgr/clients.html
- Vendor: Tivoli
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: EVAL
- Group: System
- License: Commercial
- Version: 5.1.6.2
- Release: 20040429
- # list of sources
- Source0: ftp://service.boulder.ibm.com/storage/tivoli-storage-management/patches/client/v5r1/Linux/Linux86/v516/TIVsm-BA.i386.rpm
- Source1: ftp://service.boulder.ibm.com/storage/tivoli-storage-management/patches/client/v5r1/Solaris/v516/IP22658_FIX9.tar.Z
- Source2: dsmexec
- Source3: dsm.sys
- Source4: dsm.opt
- Source5: rc.tsmc
- %NoSource 0
- %NoSource 1
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040217
- PreReq: OpenPKG, openpkg >= 20040217
- AutoReq: no
- AutoReqProv: no
- %description
- This is a stripped down version of the client part of the Tivoli
- Storage Manager (TSM v5) software. It can be used to backup Solaris,
- Linux and FreeBSD machines to a TSM server.
- %track
- prog tsmc:linux = {
- comment = "rse: 22654 was 5.1.6.2"
- version = 22654
- url = ftp://service.boulder.ibm.com/storage/tivoli-storage-management/patches/client/v5r1/Linux/Linux86/
- regex = (v5\d+)
- url = ftp://service.boulder.ibm.com/storage/tivoli-storage-management/patches/client/v5r1/Linux/Linux86/__NEWVER__/
- regex = IP([\d+_]+(_FIX\d+)?)\.README
- }
- prog tsmc:solaris = {
- comment = "rse: 22658 was 5.1.6.2"
- version = 22658_FIX9
- url = ftp://service.boulder.ibm.com/storage/tivoli-storage-management/patches/client/v5r1/Solaris
- regex = (v5\d+)
- url = ftp://service.boulder.ibm.com/storage/tivoli-storage-management/patches/client/v5r1/Solaris/__NEWVER__/
- regex = IP([\d+_]+(_FIX\d+)?)\.README
- }
- %prep
- %setup -q -T -c
- %build
- # unpack the corresponding binary only
- case "%{l_platform -t}" in
- *-freebsd* | *-linux* )
- %{l_rpm2cpio} %{SOURCE0} | cpio -idmu
- mv opt/tivoli/tsm/client root
- ;;
- *-sunos* )
- %{l_gzip} -d -c %{SOURCE1} | %{l_tar} xf -
- pkgtrans `pwd`/TIVsmCba.pkg `pwd` TIVsmCba
- mv TIVsmCba/reloc root
- ;;
- esac
- %install
- rm -rf $RPM_BUILD_ROOT
- # create filesystem hiearchy
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tsmc \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/en_US \
- $RPM_BUILD_ROOT%{l_prefix}/var/tsmc
- # install execution wrapper
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE dsmexec} $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/
- # install binaries
- for f in dsmadmc dsmagent dsmc dsmcad dsmtca ; do
- file="root/ba/bin/$f"
- if [ -f "root/admin/bin/$f" ]; then
- file="root/admin/bin/$f"
- fi
- %{l_shtool} install -c -m 755 \
- $file $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/
- case "%{l_platform -t}" in
- *-freebsd* ) brandelf -t Linux $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/$f ;;
- esac
- ln $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/dsmexec \
- $RPM_BUILD_ROOT%{l_prefix}/bin/$f
- done
- # install required NLS stuff
- %{l_shtool} install -c -m 644 \
- root/ba/bin/en_US/* \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/en_US
- rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/en_US/wchelp.htl >/dev/null 2>&1 || true
- # install default configuration
- case "%{l_platform -t}" in
- *-freebsd* ) l_resutil="1" ;;
- * ) l_resutil="2" ;;
- esac
- %{l_shtool} install -c -m 755 \
- -e "s;@resutil@;${l_resutil};g" %{l_value -s -a} \
- %{SOURCE dsm.opt} %{SOURCE dsm.sys} \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/
- mv $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/dsm.sys \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tsmc/dsm.sys
- ln -s ../../etc/tsmc/dsm.sys \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/
- mv $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/dsm.opt \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tsmc/dsm.opt
- ln -s ../../etc/tsmc/dsm.opt \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/tsmc/
- # install run-command script
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.tsmc} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%config %{l_prefix}/etc/tsmc/*' \
- '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/libexec/tsmc/dsmtca'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- # after initial install, check requirements and make recommendations
- if [ $1 -eq 1 ]; then
- case "%{l_platform -t}" in
- *-freebsd*)
- if [ ! -f /compat/linux/bin/sh ]; then
- ( echo "The Linux ABI base system is not installed under /compat/linux/."
- echo "Please install the FreeBSD port/package linux_base-6.1."
- ) | %{l_rpmtool} msg -b
- fi
- if [ ! -f /compat/linux/etc/mtab ]; then
- ( echo "TSM insists on an /etc/mtab in the Linux ABI base system. Please"
- echo "create /compat/linux/etc/mtab with at least these lines:"
- awk </etc/fstab '
- /^\/.+ufs.+/ { printf("%s\t%s\text2\trw\t1\t1\n", $1, $2); }
- '
- ) | %{l_rpmtool} msg -b
- fi
- ( if [ -r /etc/defaults/rc.conf ]; then
- . /etc/defaults/rc.conf
- fi
- if [ -r /etc/rc.conf ]; then
- . /etc/rc.conf
- fi
- case ${linux_enable} in
- [Yy][Ee][Ss])
- ;;
- * )
- ( echo "TSM requires the Linux ABI in the kernel."
- echo "Run /usr/sbin/linux manually before running TSM"
- echo "or add the following line to /etc/rc.conf:"
- echo "linux_enable=\"YES\""
- ) | %{l_rpmtool} msg -b
- ;;
- esac
- ) || exit $?
- ;;
- *-linux*)
- ( echo "Please make sure you have the vendor libstdc++ 2.9 package installed:"
- echo "- RedHat Linux 7.x: compat-libstdc++-6.2-2.9.0.16"
- echo "- RedHat Linux 8.0: compat-libstdc++-7.3-2.96.110"
- echo "- RedHat RHEL 3: compat-libstdc++-7.3-2.96.122.i386.rpm"
- echo "- Debian GNU/Linux 2.2: libstdc++2.9-glibc2.1"
- echo "- Debian GNU/Linux 3.0: libstdc++2.9-glibc2.1"
- echo "The resulting library file has to be named libstdc++-libc6.1-1.so.2"
- ) | %{l_rpmtool} msg -b
- ;;
- esac
- fi
- # after upgrade, restart service
- if [ $1 -eq 2 ]; then
- eval `%{l_rc} tsmc status 2>/dev/null`
- [ ".$tsmc_active" = .yes ] && %{l_rc} tsmc restart
- fi
- exit 0
- %preun
- # before erase, stop service and remove log files
- if [ $1 -eq 0 ]; then
- %{l_rc} tsmc stop 2>/dev/null
- rm -f $RPM_INSTALL_PREFIX/var/tsmc/*.log* >/dev/null 2>&1 || true
- fi
- exit 0
|