| 1 | #!/bin/sh |
|---|
| 2 | PACKAGE=@PACKAGE_TARNAME@ |
|---|
| 3 | VERSION=@VERSION@ |
|---|
| 4 | NAME=@PACKAGE_TARNAME@-@VERSION@ |
|---|
| 5 | |
|---|
| 6 | DISTDIR="/home/weigon/wwwroot/servers/www.lighttpd.net/pages/download/" |
|---|
| 7 | FILES="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" |
|---|
| 15 | DLURL="http://www.lighttpd.net/download" |
|---|
| 16 | pack=0 |
|---|
| 17 | echo $1 |
|---|
| 18 | case "$1" in |
|---|
| 19 | --pack) pack=1;; |
|---|
| 20 | esac |
|---|
| 21 | |
|---|
| 22 | echo ${nopack} |
|---|
| 23 | |
|---|
| 24 | if 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 |
|---|
| 28 | fi |
|---|
| 29 | |
|---|
| 30 | MD5RPM=`md5sum /usr/src/packages/RPMS/i586/${NAME}-1.i586.rpm| cut -b 1-32` |
|---|
| 31 | MD5SRPM=`md5sum /usr/src/packages/SRPMS/${NAME}-1.src.rpm| cut -b 1-32` |
|---|
| 32 | MD5TGZ=`md5sum ${NAME}.tar.gz| cut -b 1-32` |
|---|
| 33 | DATE=`date +'%Y-%m-%d %H:%M'` |
|---|
| 34 | NEWS=`cat NEWS | sed "/^- ${VERSION}/,/^-/p;d" | sed "/^- /d;/^$/d"` |
|---|
| 35 | DLNAME="${DLURL}/${NAME}" |
|---|
| 36 | |
|---|
| 37 | cat > 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 | |
|---|
| 52 | EOF |
|---|
| 53 | |
|---|
| 54 | cat > release-news.${VERSION}.txt <<EOF |
|---|
| 55 | ${PACKAGE} ${VERSION} - ${DATE} |
|---|
| 56 | |
|---|
| 57 | Changes |
|---|
| 58 | ------- |
|---|
| 59 | ${NEWS} |
|---|
| 60 | |
|---|
| 61 | Download |
|---|
| 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 | |
|---|
| 73 | EOF |
|---|
| 74 | |
|---|
| 75 | rst2html.py NEWS > NEWS.html |
|---|
| 76 | |
|---|
| 77 | cat content-4.foot | sed "/^\!${PACKAGE} ${VERSION}/,/^$/d" > content-4.foot.new |
|---|
| 78 | cat release-news.${VERSION} content-4.foot.new > content-4.foot |
|---|
| 79 | rm content-4.foot.new |
|---|
| 80 | cat content-4.head content-4.foot > content-4 |
|---|
| 81 | |
|---|
| 82 | for i in ${DISTDIR}; do |
|---|
| 83 | cp -u ${FILES} $i |
|---|
| 84 | done |
|---|
| 85 | |
|---|
| 86 | curdir=`pwd` |
|---|
| 87 | cd ~/wwwroot/servers/www.lighttpd.net/ |
|---|
| 88 | make put |
|---|
| 89 | cd ${curdir} |
|---|
| 90 | |
|---|
| 91 | kmail -s "ANNOUNCE: ${NAME}" --msg `pwd`/release-news.${VERSION}.txt lighttpd-announce@lists.kneschke.de |
|---|