File: build_rpm

package info (click to toggle)
xxdiff 1%3A4.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,716 kB
  • ctags: 2,245
  • sloc: cpp: 18,495; python: 6,134; sh: 1,543; ansic: 1,535; perl: 308; lex: 284; yacc: 279; lisp: 250; tcl: 213; makefile: 82
file content (32 lines) | stat: -rwxr-xr-x 947 bytes parent folder | download | duplicates (10)
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
#
# $RCSfile$
#

if [ ! -f "configure.in" -o ! -f "adm/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/" adm/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."