|
楼主 |
发表于 2006-9-8 12:41:36
|
显示全部楼层
TUR 不通了, 改用 rpmextract .
PKGBUILD
- # $Id: PKGBUILD,v 7.0 2006/2/1 06:30:26 ardin Exp $
- # Maintainer: ardin <ardinz@163.com>
- pkgname=maya
- pkgver=7.0
- pkgrel=1
- pkgdesc="ALIAS MAYA UNLIMITED VERSION 7.0"
- url=""
- sfpath=""
- depends=('tcsh' 'rpmextract' 'j2re' 'xorg')
- install=maya.install
- source=(aksusbd-suse-1.7-2.i386.rpm AWCommon-9.5-1.i686.rpm\
- AWCommon-server-9.5-1.i686.rpm Maya7_0-7.0-374.i686.rpm\
- Maya7_0-docs_en_US-7.0-380.i686.rpm Maya7_0-docserver-7.0-380.i686.rpm\
- patch-0.1arch2.6 maya.sh)
- md5sums=('7d75b9f2e4b185163c7da28259f06382' '9e38403752742ba8146a644f13fe4ba8'\
- '65797655d429ea32b1d329c66638c7e3' '95fc4270e3b333b838b58b1ba688129f'\
- '21a88efcf35e33cc942daaa18f83fd76' '7df9b19eea049b96b35b752bc1746d61'\
- '6e79149964a8e2a3f07f8bb25f48983b' 'e96c4b2c49efc8d9d518856055a82227'\
- )
- build() {
- cd $startdir/pkg/
- #rpm2targz $startdir/src/*.rpm
- for rpm_file in $startdir/src/*.rpm; do
- /usr/bin/rpmextract.sh $rpm_file
- #rm -f $rpm_file
- done
- unset rpm_file
- #mv $startdir/pkg/usr/aw $startdir/pkg/opt
- mv $startdir/pkg/etc/init.d/* $startdir/pkg/etc/rc.d
- mv $startdir/pkg/etc/rc.d/init.d/* $startdir/pkg/etc/rc.d
- mkdir -p $startdir/pkg/etc/profile.d
- cp $startdir/src/maya.sh $startdir/pkg/etc/profile.d
- chmod -R 755 *
- ln -s /tmp usr
- rm -rf $startdir/pkg/usr/aw/maya7.0/docs/jre/ $startdir/pkg/usr/sbin/rcaksusbd $startdir/pkg/etc/init.d/ $startdir/pkg/etc/rc.d/init.d
- patch -Np1 -i $startdir/src/patch-0.1arch2.6
- }
复制代码
files 1:maya.install
- # arg 1: the new package version
- post_install() {
- ln -s /usr/aw/maya7.0/bin/Maya7.0 /opt/bin/maya
- if [ ! "`grep /usr/aw/maya7.0/lib etc/ld.so.conf`" ]; then
- echo -n "updating /etc/ld.so.conf... "
- echo "/usr/aw/maya7.0/lib" >>etc/ld.so.conf
- sbin/ldconfig -r .
- echo "done."
- fi
- }
- # arg 1: the new package version
- # arg 2: the old package version
- post_upgrade() {
- post_install $1
- }
- # arg 1: the old package version
- pre_remove() {
- rm /opt/bin/maya
- echo -ne "\nupdating /etc/ld.so.conf... "
- sed -i -e '/\/usr\/aw\/maya7.0\/lib ' etc/ld.so.conf
- sbin/ldconfig -r .
- echo "done."
- }
- op=$1
- shift
- $op $*
复制代码
files 2: patch for arch kernel 2.6
- diff -ruN pkg/etc/rc.d/aksusbd pkg-ok/etc/rc.d/aksusbd
- --- pkg/etc/rc.d/aksusbd 2003-05-22 23:04:27.000000000 +0800
- +++ pkg-ok/etc/rc.d/aksusbd 2006-02-05 10:57:21.000000000 +0800
- @@ -10,7 +10,7 @@
- ### END INIT INFO
- # $Id: aksusbd.suse,v 1.5 2002/11/13 13:20:16 chris Exp $
-
- -. /etc/rc.status
- +#. /etc/rc.status
- #. /etc/rc.config
-
- ## Determine the base and follow a runlevel link name.
- @@ -31,15 +31,15 @@
- # rc_exit exit appropriate to overall rc status
-
- # First reset status of this service
- -rc_reset
- +#rc_reset
- case "$1" in
- start)
- echo -n "Starting AKSUSB daemon"
-
- - startproc @@@AKSUSBDDESTDIR@@@/aksusbd
- + add_daemon @@@AKSUSBDDESTDIR@@@/aksusbd
-
- # Remember status and be verbose
- - rc_status -v
- + #rc_status -v
- ;;
- stop)
- echo -n "Shutting down AKSUSB daemon"
- @@ -47,29 +47,29 @@
- killproc -TERM @@@AKSUSBDDESTDIR@@@/aksusbd
-
- # Remember status and be verbose
- - rc_status -v
- + #rc_status -v
- ;;
- restart)
- $0 stop && $0 start
-
- # Remember status and be quiet
- - rc_status
- + #rc_status
- ;;
- - reload)
- + #reload)
-
- - $0 stop && $0 start
- + #$0 stop && $0 start
-
- # Remember status and be verbose
- - rc_status -v
- - ;;
- - status)
- - echo -n "Checking for AKSUSB daemon: "
- + #rc_status -v
- + #;;
- + #status)
- + #echo -n "Checking for AKSUSB daemon: "
-
- - checkproc @@@AKSUSBDDESTDIR@@@/aksusbd && echo OK || echo No process
- - ;;
- +# #checkproc @@@AKSUSBDDESTDIR@@@/aksusbd && echo OK || echo No process
- + #;;
- *)
- - echo "Usage: $0 {start|stop|status|restart|reload}"
- + echo "Usage: $0 {start|stop|restart}"
- exit 1
- ;;
- esac
- -rc_exit
- +#rc_exit
- diff -ruN pkg/etc/rc.d/aw_flexlm pkg-ok/etc/rc.d/aw_flexlm
- --- pkg/etc/rc.d/aw_flexlm 2005-06-09 22:30:47.000000000 +0800
- +++ pkg-ok/etc/rc.d/aw_flexlm 2006-02-05 10:59:28.000000000 +0800
- @@ -7,7 +7,7 @@
- # processname: lmgrd
-
- # source function library.
- -. /etc/rc.d/init.d/functions
- +. /etc/rc.d/functions
-
- FLEXLM=/usr/aw/COM/etc
- LICENSE_DIR=/var/flexlm
- @@ -19,7 +19,7 @@
- echo "Starting FLEXlm License Server Daemon for Alias|Wavefront software"
- if [ -x "$FLEXLM/lmgrd" ]; then
- if [ -f "$LICENSE_FILE" ] ; then
- - $SU "$FLEXLM/lmgrd -c $LICENSE_FILE -l /usr/tmp/aw_flexlm.log"
- + $SU "$FLEXLM/lmgrd -c $LICENSE_FILE -l /var/log/aw_flexlm.log"
- echo
- else
- echo "ERROR Cannot run FLEXlm Licensing daemon: lmgrd"
- diff -ruN pkg/usr/aw/maya7.0/bin/Maya7.0 pkg-ok/usr/aw/maya7.0/bin/Maya7.0
- --- pkg/usr/aw/maya7.0/bin/Maya7.0 2005-07-20 10:34:24.000000000 +0800
- +++ pkg-ok/usr/aw/maya7.0/bin/Maya7.0 2006-02-05 11:06:20.000000000 +0800
- @@ -1,4 +1,4 @@
- -#!/bin/csh -f
- +#!/usr/bin/tcsh -f
- #Tag 0x00C98a00
- #*
- #*+***********************************************************************
- diff -ruN pkg/usr/aw/maya7.0/docs/startDocServer.sh pkg-ok/usr/aw/maya7.0/docs/startDocServer.sh
- --- pkg/usr/aw/maya7.0/docs/startDocServer.sh 2005-07-15 18:31:52.000000000 +0800
- +++ pkg-ok/usr/aw/maya7.0/docs/startDocServer.sh 2006-02-05 11:11:42.000000000 +0800
- @@ -60,7 +60,7 @@
- fi
- ;;
- Linux)
- - JAVACMD=./jre/bin/java;
- + JAVACMD=${JAVA_HOME}/bin/java;
- ;;
- esac
-
复制代码
files 3:maya.sh
- export PATH=$PATH:/usr/aw/maya7.0/bin
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|