source: projects/web/trunk/bin/mkpackagenews.sh @ 1414

Revision 1414, 2.1 KB checked in by daisuke, 14 years ago (diff)

increase the number of packages (30->40)

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3DISTVER=VinePlus/5
4CATLIST=vine5x
5if [ "$1" == "VineSeed" ]; then
6  DISTVER=VineSeed
7  CATLIST=vineseed
8fi
9
10TOPDIR=/home/ftp/pub/Vine
11SRPMSDIR=${TOPDIR}/${DISTVER}/pool
12CATEGORYLIST=${TOPDIR}/VineSeed/category/packages-${CATLIST}.list
13
14NEWRPMS=""
15
16#NEWRPMS=$(rpm -qp --qf '%{BUILDTIME}\t%{NAME}-%{VERSION}-%{RELEASE}.src.rpm\n' $SRPMSDIR/*.rpm | sort -rn | head -30 | \
17#while read buildtime srcrpm
18#do
19#  echo -n "$srcrpm "
20#done)
21
22NEWRPMS=$(ls -1t ${SRPMSDIR}/*.rpm | head -40 | xargs rpm -qp --qf '%{name}-%{version}-%{release}.src.rpm ')
23
24cat template/header.tmpl
25
26cat << EOF
27<div id="wrapper">
28<!-- start page -->
29<div id="page">
30  <!-- start content -->
31  <div id="content-wide">
32
33<h1 class="title">最近更新された ${DISTVER} パッケージの情報</h1>
34<div class="entry">
35
36EOF
37
38# contents
39for i in $NEWRPMS
40do
41  LANG=ja_JP.UTF-8 rpm -qp \
42      --qf '<a name="%{NAME}-%{VERSION}-%{RELEASE}">\n' \
43      --qf '<h3>%{name}</h3>\n' \
44      --qf '</a>\n' \
45      --qf '<dd>\n' \
46      --qf '  <b>パッケージ名:</b> \n' \
47      --qf "  <a href=\"http://updates.vinelinux.org/${DISTVER}/pool/%{NAME}-%{VERSION}-%{RELEASE}.src.rpm\">" \
48      --qf '  %{NAME}-%{VERSION}-%{RELEASE}.src.rpm\n' \
49      --qf '  </a><br />\n' \
50      --qf '  <b>サマリ:</b> %{SUMMARY}<br />\n' \
51      --qf '  <br />\n' \
52      --qf '  <b>変更履歴:</b><br />\n' \
53      --qf '  <blockquote><pre>\n'  $SRPMSDIR/$i
54  LANG=ja_JP.UTF-8 rpm -qp \
55      --qf '%{changelogtext}\n' $SRPMSDIR/$i | sed -e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/@/ at /g'
56  echo     '  </pre></blockquote>'
57  echo     '</dd>'
58  echo     '<br />'
59done | sed -e 's/new upstream release/開発元のバージョン更新に追従/g' \
60           -e 's/[Ii]nitial build.*/新規パッケージ/g' \
61           -e 's/- .*built with new toolchain/- 新しいtoolchainでリビルド/g' \
62           -e 's/updated \(.*\) to \(.*\)/\1を\2に更新/g' \
63           -e 's/updated to \(.*\)/\1に更新/g' \
64           -e 's/[Rr]ebuil? with \(.*\)/\1でリビルド/g' \
65
66#
67cat << EOF
68</div>
69  </div><!-- end content-wide -->
70EOF
71
72# sidebar
73cat template/sidebar2.tmpl
74
75# footer
76cat template/footer.tmpl
Note: See TracBrowser for help on using the repository browser.