File: release_i586_mdk

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 (52 lines) | stat: -rwxr-xr-x 1,569 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
#
# $RCSfile: release_i586_mdk,v $
#

if [ ! -d "adm" ]; then
     echo "You must be running this script from the topdir directory."
     exit 1;
fi

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

echo "== Getting version number"
VERSION=`adm/get_version`
echo "==   Version is " $VERSION

echo "== Getting and creating top dir"
BUILDROOT=`rpm --showrc | egrep "[^{]_topdir" | cut --fields=2 | sed -e 'sX%{_usrsrc}X/usr/srcX'`
mkdir -p $BUILDROOT/{SPECS,SOURCES,BUILD,SRPMS,RPMS}

# echo "== Creating spec file"
# cp adm/xxdiff-mdk.spec $BUILDROOT/SPECS/xxdiff-$VERSION.spec

echo "== Copying pristine build to $BUILDROOT/SOURCES"
PRISTINE=../xxdiff-$VERSION.tar.gz
if [ ! -f "$PRISTINE" ]; then
     echo "Cannot find pristine sources in $PRISTINE"
fi
cp $PRISTINE $BUILDROOT/SOURCES

echo "== Building source and binary packages"
# Note: we use nodeps here because tmake package is not quite common yet under 
# rh-7.1.

# use -bs to build source only

rpmbuild -ba --nodeps --clean --rmsource adm/xxdiff-mdk.spec

#rpm -bs --nodeps adm/xxdiff-mdk.spec
#rpm -bs --nodeps --rmsource --rmspec $BUILDROOT/SPECS/xxdiff-$VERSION.spec
#rpm -bs --nodeps --rmsource --rmspec $BUILDROOT/SPECS/xxdiff-$VERSION.spec
#rpm -ts --nodeps --clean --rmsource --rmspec $PRISTINE

DEST=$HOME
echo "== Copying source and binary packages to $DEST"
cp $BUILDROOT/RPMS/i586/xxdiff-$VERSION*.i586.rpm $DEST
cp $BUILDROOT/SRPMS/xxdiff-$VERSION*.src.rpm $DEST

echo "== Signing package files in $DEST"
rpm --addsign $DEST/xxdiff-$VERSION*.rpm

echo "== Done."