mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
	
		
			821 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
	
		
			821 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
source=.
 | 
						|
version=`cat $source/../version`
 | 
						|
package=$source/../../alsa-lib-$version.tar.bz2
 | 
						|
packagedir=/usr/src/redhat
 | 
						|
 | 
						|
if [ -d /usr/src/packages ]; then
 | 
						|
  packagedir=/usr/src/packages
 | 
						|
fi
 | 
						|
 | 
						|
make -C .. clean
 | 
						|
make -C .. dist
 | 
						|
 | 
						|
if [ ! -r $package ]; then
 | 
						|
  package=$source/../alsa-lib-$version.tar.bz2
 | 
						|
  if [ ! -r $package ]; then
 | 
						|
    echo "Error: wrong package: $package"
 | 
						|
    exit 1
 | 
						|
  fi
 | 
						|
fi
 | 
						|
 | 
						|
cp -fv $package ${packagedir}/SOURCES
 | 
						|
 | 
						|
if [ ! -r $source/buildrpm ]; then
 | 
						|
  echo "Error: invalid directory: $source"
 | 
						|
  exit 1
 | 
						|
fi
 | 
						|
 | 
						|
if [ ! -d ${packagedir} ]; then
 | 
						|
  echo "Error: ${packagedir} directory not found"
 | 
						|
  exit 1
 | 
						|
fi
 | 
						|
 | 
						|
if [ ! -r $source/alsa-lib.spec ]; then
 | 
						|
  cd $source/..
 | 
						|
  ./configure
 | 
						|
  cd utils
 | 
						|
fi
 | 
						|
 | 
						|
cp -fv $source/alsa-lib.spec ${packagedir}/SPECS
 | 
						|
cd ${packagedir}/SPECS
 | 
						|
rpm -ba alsa-lib.spec
 | 
						|
cd ${packagedir}
 | 
						|
 |