source: projects/web/branches/VINE_6_0_REL/bin/mkpackagenews.sh @ 4486

Revision 4486, 2.2 KB checked in by daisuke, 13 years ago (diff)

Vine Linux 6 向けに更新

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