Update of /cvsroot/alsa/alsa-driver/utils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5833

Modified Files:
        buildrpm.in 
Log Message:
Added buildrpm and /usr/src/packages autodetection

Index: buildrpm.in
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/utils/buildrpm.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- buildrpm.in 5 Nov 2001 08:28:29 -0000       1.1
+++ buildrpm.in 14 Mar 2004 17:02:53 -0000      1.2
@@ -4,6 +4,10 @@
 source=.
 version=`cat $source/../version`
 package=$source/../../alsa-driver-$version.tar.bz2
+xpackages=/usr/src/redhat
+test -d /usr/src/packages && xpackages=/usr/src/packages
+xbuildrpm=rpm
+rpmbuild --usage 2> /dev/null > /dev/null && xbuildrpm=buildrpm
 
 if [ -z "$TARGET_KERNEL" ]; then
   export TARGET_KERNEL="$kversion"
@@ -16,15 +20,15 @@
   exit 1
 fi
 
-cp -fv $package /usr/src/redhat/SOURCES
+cp -fv $package $xpackages/SOURCES
 
 if [ ! -r $source/buildrpm ]; then
   echo "Error: invalid directory: $source"
   exit 1
 fi
 
-if [ ! -d /usr/src/redhat ]; then
-  echo "Error: /usr/src/redhat directory not found"
+if [ ! -d $xpackages ]; then
+  echo "Error: $xpackages directory not found"
   exit 1
 fi
 
@@ -34,7 +38,7 @@
   cd utils
 fi
 
-cp -fv $source/alsa-driver.spec /usr/src/redhat/SPECS
-cd /usr/src/redhat/SPECS
-rpm -ba alsa-driver.spec
-cd /usr/src/redhat
+cp -fv $source/alsa-driver.spec $xpackages/SPECS
+cd $xpackages/SPECS
+$xbuildrpm -ba alsa-driver.spec
+cd $xpackages



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to