alsa-utils/utils/buildrpm

43 lines
752 B
Text
Raw Permalink Normal View History

1998-08-13 17:43:39 +02:00
#!/bin/bash
source=.
version=`cat $source/../version`
2001-11-20 10:04:26 +01:00
package=$source/../alsa-utils-$version.tar.bz2
packagedir=/usr/src/redhat
1998-08-13 17:43:39 +02:00
2001-11-20 10:04:26 +01:00
# SuSE path
if [ -d /usr/src/packages ]; then
packagedir=/usr/src/packages
fi
make -C .. clean
make -C .. dist
1999-01-18 23:43:25 +01:00
1998-08-13 17:43:39 +02:00
if [ ! -r $package ]; then
echo "Error: wrong package: $package"
exit 1
fi
2001-11-20 10:04:26 +01:00
cp -fv $package ${packagedir}/SOURCES
1998-08-13 17:43:39 +02:00
if [ ! -r $source/buildrpm ]; then
echo "Error: invalid directory: $source"
exit 1
fi
2001-11-20 10:04:26 +01:00
if [ ! -d ${packagedir} ]; then
echo "Error: ${packagedir} directory not found"
1998-08-13 17:43:39 +02:00
exit 1
fi
if [ ! -r $source/alsadriver.spec ]; then
cd $source/..
./configure
cd utils
fi
2001-11-20 10:04:26 +01:00
cp -fv $source/alsa-utils.spec ${packagedir}/SPECS
cd ${packagedir}/SPECS
1998-08-13 17:43:39 +02:00
rpm -ba alsa-utils.spec
2001-11-20 10:04:26 +01:00
cd ${packagedir}