"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "gxine-0.5.903/misc/build_rpms.sh.in" of archive gxine-0.5.903.tar.gz:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1 #!/bin/sh
2
3 DATE=`date +%y%m%d`
4 #DATE=1
5
6 # Some rpm checks
7 RPMVERSION=`rpm --version | tr [A-Z] [a-z] | sed -e 's/[a-z]//g' -e 's/\.//g' -e 's/ //g'`
8
9 # rpm version 4 return 40
10 if [ `expr $RPMVERSION` -lt 100 ]; then
11 RPMVERSION=`expr $RPMVERSION \* 10`
12 fi
13
14 if [ `expr $RPMVERSION` -lt 400 ]; then
15 RPM_BA="rpm -ba -ta ./@PACKAGE@-@VERSION@.tar.gz"
16 RPM_BB="rpm -bb -ta ./@PACKAGE@-@VERSION@.tar.gz"
17 else
18 RPM_BA="rpm -ta ./@PACKAGE@-@VERSION@.tar.gz -ba"
19 RPM_BB="rpm -ta ./@PACKAGE@-@VERSION@.tar.gz -bb"
20 fi
21
22 echo "Creating tarball..."
23 rm -f config.cache && ./autogen.sh && make dist
24 rm -rf rpms
25 mkdir rpms
26
27 echo "*****************************************************"
28 echo
29 echo "building rpm for @PACKAGE@ @VERSION@"
30 echo
31 echo "current architecture:pentium"
32 echo "rpms will be copied to ./rpms directory"
33 echo
34 echo "*****************************************************"
35
36 export XINE_BUILD=i586-pc-linux-gnu
37
38 eval $RPM_BA
39
40 cp /usr/src/redhat/SRPMS/@PACKAGE@-@VERSION@-$DATE.src.rpm ./rpms/
41 mv /usr/src/redhat/RPMS/i386/@PACKAGE@-@VERSION@-$DATE.i386.rpm ./rpms/@PACKAGE@-@VERSION@-$DATE.i586.rpm
42
43 echo "Done."