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
#!/bin/sh
# 2006, 2008 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# , ,
# , :
# rpmrb []
# 2.6.1 (), 2.6 (major) .1 (minor)
# load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common
load_mod spec
REMOTE=
if [ "$1" = "-r" ] ; then
REMOTE=$1
shift
fi
SPEC=$1
VER=$2
# need for rpmgs
GSSETRELEASE=$3
test -n "$GSSETRELEASE" || GSSETRELEASE=alt1
export GSSETRELEASE
if [ "$1" = "-h" ]; then
echo "rpmrb spec [vermajor][.verminor] [rel] - update spec to vermajor.verminor version, build %rel release"
exit 0
fi
test -e "$SPEC" || fatal "use with spec"
rpmgs $SPEC $VER || fatal "Error with get source"
add_changelog_helper "- new version $(get_version $SPEC) (with rpmrb script)" $SPEC || echog "Changelog entry already exists"
rpmbsh $REMOTE -i $SPEC || fatal "Error with build in hasher"
rpmbs -u $SPEC || fatal "Error with upload"