root/tags/release-1.3.12/distribute.sh.in

Revision 30, 2.2 kB (checked in by jan, 4 years ago)

moved everything below trunk/ and added branches/ and tags/

Line 
1#!/bin/sh
2PACKAGE=@PACKAGE_TARNAME@
3VERSION=@VERSION@
4NAME=@PACKAGE_TARNAME@-@VERSION@
5
6DISTDIR="/home/weigon/wwwroot/servers/www.lighttpd.net/pages/download/" 
7FILES="content-3 content-4 content-5 \
8        /usr/src/packages/RPMS/i586/${NAME}-1.i586.rpm \
9        /usr/src/packages/SRPMS/${NAME}-1.src.rpm \
10        ${NAME}.tar.gz \
11        NEWS.html \
12        ChangeLog \
13        release-news.${VERSION}.txt \
14        ${NAME}.tar.gz.sig"
15DLURL="http://www.lighttpd.net/download"
16pack=0
17echo $1
18case "$1" in
19        --pack) pack=1;;
20esac
21
22echo ${nopack}
23
24if test x${pack} = x1; then
25        make distcheck && rpmbuild -ta --nodeps ${NAME}.tar.gz
26        gpg --detach-sign ${NAME}.tar.gz
27        rpm --addsign /usr/src/packages/RPMS/i586/${NAME}-1.i586.rpm /usr/src/packages/SRPMS/${NAME}-1.src.rpm
28fi
29
30MD5RPM=`md5sum /usr/src/packages/RPMS/i586/${NAME}-1.i586.rpm| cut -b 1-32`
31MD5SRPM=`md5sum /usr/src/packages/SRPMS/${NAME}-1.src.rpm| cut -b 1-32`
32MD5TGZ=`md5sum ${NAME}.tar.gz| cut -b 1-32`
33DATE=`date +'%Y-%m-%d %H:%M'`
34NEWS=`cat NEWS | sed "/^- ${VERSION}/,/^-/p;d" | sed "/^- /d;/^$/d"`
35DLNAME="${DLURL}/${NAME}"
36
37cat > release-news.${VERSION} <<EOF
38!${PACKAGE} ${VERSION} - ${DATE}
39- *Changes*
40++QUOTED++
41<pre>${NEWS}
42</pre><br />
43--QUOTED--
44- *Download*
45- (${NAME}-1.i586.rpm|${NAME}-1.i586.rpm) [built on SuSE 9.0]
46  MD5: ${MD5RPM}
47- (${NAME}-1.src.rpm|${NAME}-1.src.rpm)
48  MD5: ${MD5SRPM}
49- (${NAME}.tar.gz|${NAME}.tar.gz)
50  MD5: ${MD5TGZ} (${NAME}.tar.gz.sig|signature)
51
52EOF
53
54cat > release-news.${VERSION}.txt <<EOF
55${PACKAGE} ${VERSION} - ${DATE}
56
57Changes
58-------
59${NEWS}
60
61Download
62- ${NAME}-1.i586.rpm [built on SuSE 9.0]
63  ${DLNAME}-1.i586.rpm
64  MD5: ${MD5RPM}
65- ${NAME}-1.src.rpm
66  ${DLNAME}-1.src.rpm
67  MD5: ${MD5SRPM}
68- ${NAME}.tar.gz
69  ${DLNAME}.tar.gz
70  MD5: ${MD5TGZ}
71  Signature: ${DLNAME}.tar.gz.sig
72
73EOF
74
75rst2html.py NEWS > NEWS.html
76
77cat content-4.foot | sed "/^\!${PACKAGE} ${VERSION}/,/^$/d" > content-4.foot.new
78cat release-news.${VERSION} content-4.foot.new > content-4.foot
79rm content-4.foot.new
80cat content-4.head content-4.foot > content-4
81
82for i in ${DISTDIR}; do
83        cp -u ${FILES} $i
84done
85
86curdir=`pwd`
87cd ~/wwwroot/servers/www.lighttpd.net/
88make put
89cd ${curdir}
90
91kmail -s "ANNOUNCE: ${NAME}" --msg `pwd`/release-news.${VERSION}.txt lighttpd-announce@lists.kneschke.de
Note: See TracBrowser for help on using the browser.