File: build_rpm

package info (click to toggle)
xxdiff 1%3A2.5-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,936 kB
  • ctags: 3,420
  • sloc: cpp: 16,125; ansic: 16,104; sh: 1,684; makefile: 295; yacc: 238; lex: 218; python: 216
file content (32 lines) | stat: -rwxr-xr-x 994 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
#
# $Id: build_rpm,v 1.4 2001/11/06 06:29:57 blais Exp $
#

if [ ! -f "configure.in" -o ! -f "tools/rpm_spec" ]; then
     echo "You must be running this script from the topdir directory."
fi

# Note: this script assume that release_bin has already been called.

echo "Getting version number"
VERSION=`grep AM_INIT_AUTOMAKE configure.in | sed -e 's/[^0-9]*\([.0-9]*\).*/\1/'`
echo "   Version is " $VERSION

echo "Creating spec file"
sed -e "s/@VERSION@/$VERSION/" tools/rpm_spec > /usr/src/redhat/SPECS/xxdiff-$VERSION.spec

echo "Copying pristine build"
if [ ! -f "../xxdiff-$VERSION.i386.tar.gz" ]; then
     echo "You must be running this script from the topdir directory."
fi
cp ../xxdiff-$VERSION.i386.tar.gz /usr/src/redhat/SOURCES

echo "Building binary package"
rpm -ba /usr/src/redhat/SPECS/xxdiff-$VERSION.spec

echo "Copy binary package home"
cp /usr/src/redhat/RPMS/i386/xxdiff-$VERSION*.i386.rpm /home/blais
chmod 777 /home/blais/xxdiff-$VERSION*.i386.rpm

echo "Done."