OSDN Git Service

- Fix the old function prototype in pcm_plugin.h
[android-x86/external-alsa-lib.git] / utils / buildrpm
1 #!/bin/bash
2
3 source=.
4 version=`cat $source/../version`
5 package=$source/../../alsa-lib-$version.tar.bz2
6
7 make -C .. pack
8
9 if [ ! -r $package ]; then
10   package=$source/../alsa-lib-$version.tar.bz2
11   if [ ! -r $package ]; then
12     echo "Error: wrong package: $package"
13     exit 1
14   fi
15 fi
16
17 cp -fv $package /usr/src/redhat/SOURCES
18
19 if [ ! -r $source/buildrpm ]; then
20   echo "Error: invalid directory: $source"
21   exit 1
22 fi
23
24 if [ ! -d /usr/src/redhat ]; then
25   echo "Error: /usr/src/redhat directory not found"
26   exit 1
27 fi
28
29 if [ ! -r $source/alsa-lib.spec ]; then
30   cd $source/..
31   ./configure
32   cd utils
33 fi
34
35 cp -fv $source/alsa-lib.spec /usr/src/redhat/SPECS
36 cd /usr/src/redhat/SPECS
37 rpm -ba alsa-lib.spec
38 cd /usr/src/redhat