3 # do a smartmontools release
4 # (C) 2003-6 Bruce Allen <ballen4705@users.sourceforge.net>,
5 # Guido Guenther <agx@sigxcpu.org>
6 # $Id: do_release,v 1.39 2006/05/19 16:33:33 chrfranke Exp $
8 # Notes on generating releases:
10 # (2) update CHANGELOG -- put in release number
11 # (3) update release number in configure.in and smartmontools.spec
12 # (4) update internal changelog in smartmontools.spec
13 # (5) to test, set USECVS below to 0
14 # (6) when satisfied, set USECVS below to 1
20 if [ -f /etc
/redhat-release
]; then
21 RPM_BASE
=/usr
/src
/redhat
/
23 RPM_BASE
=/usr
/src
/rpm
/
25 SOURCES
=$RPM_BASE/SOURCES
/
30 unset CVS_SERVER ||
echo "can't unset CVS_SERVER=$CVS_SERVER"
32 CVSROOT
=:ext
:ballen4705@smartmontools.cvs.sourceforge.net
:/cvsroot
/smartmontools
37 VERSION
=`grep 'AC_INIT' configure.in | awk '{ print $2 }' | sed s/,//g`
38 RELEASE
="RELEASE_${VERSION//\./_}"
39 echo "Version: $VERSION"
40 echo "Release: $RELEASE"
45 MINOR
=`echo $VERSION | cut -d. -f2`
46 MAJOR
=`echo $VERSION | cut -d. -f1`
47 PERL_OLD
=$MAJOR\\.
$MINOR
49 NEW_VERSION
=$MAJOR.
$MINOR
50 PERL_NEW
=$MAJOR\\.
$MINOR
51 NEW_RELEASE
="RELEASE_${NEW_VERSION//\./_}"
52 echo "New Version: $NEW_VERSION"
53 echo "New Release: $NEW_RELEASE"
56 # run automake/autoconf
57 if [ -f Makefile
] ; then
58 make distcheck ||
exit 1
61 rm -f Makefile configure
64 smartmontools_release_date
=`date -u +"%Y/%m/%d"`
65 smartmontools_release_time
=`date -u +"%T %Z"`
66 cat configure.
in |
sed "s|smartmontools_release_date=.*|smartmontools_release_date=${smartmontools_release_date}|" > configure.tmp
67 cat configure.tmp |
sed "s|smartmontools_release_time=.*|smartmontools_release_time=\"${smartmontools_release_time}\"|" > configure.
in
75 if [ $USECVS -ne 0 ] ; then
77 cvs commit
-m "Release $VERSION $RELEASE"
87 make distcheck ||
exit 1
89 cp build
/smartmontools-
$VERSION.
tar.gz
$SOURCES
92 rpmbuild
-ba --sign smartmontools.spec
94 # remove source tarball
95 rm -f $SOURCES/smartmontools-
$VERSION.
tar.gz
97 # increase release number:
99 if [ $USECVS -ne 0 ] ; then
100 perl
-p -i.bak
-e "s/$PERL_OLD/$PERL_NEW/" configure.
in
101 perl
-p -i.bak
-e "s/Version:\t$PERL_OLD/Version:\t$PERL_NEW/" smartmontools.spec
104 mv -f $RPM_BASE/RPMS
/i386
/smartmontools-
$VERSION-*.i386.rpm . ||
mv -f $RPM_BASE/RPMS
/x86_64
/smartmontools-
$VERSION-*.x86_64.rpm .
105 mv -f $RPM_BASE/SRPMS
/smartmontools-
$VERSION-*.src.rpm .
106 cp -f build
/smartmontools-
$VERSION.
tar.gz .
107 if [ "$KEYID" ]; then
108 gpg
--default-key $KEYID --armor --detach-sign .
/smartmontools-
$VERSION.
tar.gz
112 rm -rf autom4te.cache build
/ config.h.
in Makefile.
in examplescripts
/Makefile.
in \
113 depcomp mkinstalldirs install-sh configure aclocal.
m4 missing
*.bak