summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2001-11-20 09:29:21 +0000
committerJaroslav Kysela <perex@perex.cz>2001-11-20 09:29:21 +0000
commit8a99a9eb4f01346b79b1a10939214a6df3d4817b (patch)
treecc94e8b8ca8410b695482bd71bbf7c6e9f5d58d3 /utils
parenteb391e81f0ccb81ed9d57bdd6c05bf63540320d2 (diff)
Added support for SuSE and automake
Diffstat (limited to 'utils')
-rw-r--r--utils/buildrpm21
1 files changed, 14 insertions, 7 deletions
diff --git a/utils/buildrpm b/utils/buildrpm
index 0a5f25d3..8af05f9b 100644
--- a/utils/buildrpm
+++ b/utils/buildrpm
@@ -3,8 +3,14 @@
source=.
version=`cat $source/../version`
package=$source/../../alsa-lib-$version.tar.bz2
+packagedir=/usr/src/redhat
-make -C .. pack
+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
@@ -14,15 +20,15 @@ if [ ! -r $package ]; then
fi
fi
-cp -fv $package /usr/src/redhat/SOURCES
+cp -fv $package ${packagedir}/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 ${packagedir} ]; then
+ echo "Error: ${packagedir} directory not found"
exit 1
fi
@@ -32,7 +38,8 @@ if [ ! -r $source/alsa-lib.spec ]; then
cd utils
fi
-cp -fv $source/alsa-lib.spec /usr/src/redhat/SPECS
-cd /usr/src/redhat/SPECS
+cp -fv $source/alsa-lib.spec ${packagedir}/SPECS
+cd ${packagedir}/SPECS
rpm -ba alsa-lib.spec
-cd /usr/src/redhat
+cd ${packagedir}
+