/[gentoo-x86]/app-doc/gentoo-web/gentoo-web-2.3.ebuild
Gentoo

Contents of /app-doc/gentoo-web/gentoo-web-2.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Jun 24 18:36:03 2002 UTC (12 years, 2 months ago) by peitolm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
old versions, generally working, but use at your peril.

1 # Copyright 1999-2001 Gentoo Technologies, Inc. Distributed under the terms
2 # of the GNU General Public License, v2 or later
3 # Author: Daniel Robbins <drobbins@gentoo.org>
4 # $Header: /home/cvsroot/gentoo-x86/app-doc/gentoo-web/gentoo-web-2.3.ebuild,v 1.4 2002/06/22 12:17:55 peitolm Exp $
5
6
7 S=${WORKDIR}/gentoo-src/gentoo-web
8 TEMPLATE=${S}/xsl/guide-main.xsl
9 DESCRIPTION="www.gentoo.org website"
10 SRC_URI="http://www.red-bean.com/cvs2cl/cvs2cl.pl"
11 HOMEPAGE="http://www.gentoo.org"
12 RDEPEND="virtual/python dev-libs/libxslt"
13 WEBROOT=/www/virtual/www.gentoo.org/htdocs
14
15 src_unpack() {
16 local myhost
17 myhost=`hostname`
18 if [ "$myhost" = "laptop.kicks-ass.net" ]
19 then
20 export GENTOO_SRCDIR=/home/meekrob/gentoo-src
21 WEBROOT=/home/httpd/htdocs
22 echo -e "\e[32;1mMEEKROB detected.\e[0m"
23 echo "Setting GENTOO_SRCDIR to $GENTOO_SRCDIR"
24 echo "Setting WEBROOT to $WEBROOT"
25 fi
26 if [ "$MAINTAINER" != "yes" ]
27 then
28 echo "This will zap stuff in ${WEBROOT}."
29 echo "Beware -- maintainers only."
30 fi
31 cd ${WORKDIR}/${P}
32 if [ "$myhost" = "inventor.gentoo.org" ]
33 then
34 echo -e "\e[32;1mCHIBA detected.\e[0m"
35 ln -s /home/drobbins/gentoo-src gentoo-src
36 elif [ "$myhost" = "chiba.3jane.net" ]
37 then
38 cvs -d /home/cvsroot co gentoo-src
39 elif [ -n "$GENTOO_SRCDIR" ]
40 then
41 ln -s ${GENTOO_SRCDIR} gentoo-src || die
42 else
43 die "Please set the GENTOO_SRCDIR env var to point to the gentoo-src tree"
44 fi
45 }
46
47 src_compile() {
48 python ${S}/python/gendevlistxml.py txt/devlist.txt xml/main-devlist.xml
49 }
50
51 src_install() {
52 dodir ${WEBROOT}/doc
53 dodir ${WEBROOT}/projects
54 insinto ${WEBROOT}/doc
55
56 #process english docs
57 cd ${S}/xml/doc/en
58 local x
59 for x in *.xml
60 do
61 x=`basename ${x} .xml`
62 xsltproc $TEMPLATE ${x}.xml > ${D}${WEBROOT}/doc/${x}.html || die
63 done
64 cd ${S}
65
66 #process spanish docs
67 cd ${S}/xml/doc/es
68 local x
69 for x in *.xml
70 do
71 x=`basename ${x} .xml`
72 xsltproc $TEMPLATE ${x}.xml > ${D}${WEBROOT}/doc/${x}.html || die
73 done
74 cd ${S}
75
76 #process french docs
77 cd ${S}/xml/doc/fr
78 local x
79 for x in *.xml
80 do
81 x=`basename ${x} .xml`
82 xsltproc $TEMPLATE ${x}.xml > ${D}${WEBROOT}/doc/${x}.html || die
83 done
84 cd ${S}
85
86 cp txt/firewall ${D}${WEBROOT}/doc/
87 dodir ${WEBROOT}/images
88 insinto ${WEBROOT}/images
89 cp -a ${S}/images ${D}/${WEBROOT}
90 local x
91 cd images
92 for x in shots/desktop*.png
93 do
94 [ "${x%*small.png}" != "${x}" ] && continue
95 sed -e "s:TITLE:${x}:" -e "s:IMG:http\://www.ibiblio.org/gentoo/images/${x}:" ${S}/html/shell.html > ${D}${WEBROOT}/images/${x%.png}.html
96 done
97
98 insinto ${WEBROOT}
99 doins favicon.ico
100
101 #dynamic firewalls tools page
102 cd ${S}
103 xsltproc $TEMPLATE xml/dynfw.xml > ${D}${WEBROOT}/projects/dynfw.html || die
104 xsltproc $TEMPLATE xml/project-xml.xml > ${D}${WEBROOT}/projects/xml.html || die
105
106 #resume
107 xsltproc xsl/resume-html.xsl xml/resume.xml > ${D}${WEBROOT}/resume.html || die
108
109 #both URLs should work
110 dodir ${WEBROOT}/projects/keychain
111 xsltproc $TEMPLATE xml/keychain.xml > ${D}${WEBROOT}/projects/keychain.html || die
112 xsltproc $TEMPLATE xml/keychain.xml > ${D}${WEBROOT}/projects/keychain/index.html || die
113
114 insinto ${WEBROOT}/projects
115 doins dynfw/dynfw-1.0.1.tar.gz
116
117 cd ..
118 tar czvf ${D}${WEBROOT}/projects/guide-xml-latest.tar.gz gentoo-web
119 cd ${S}
120 dodir ${WEBROOT}/news
121 local mydate
122 mydate=`date +"%d %b %Y"`
123 echo "<?xml version='1.0'?>" > ${T}/main-news.xml
124 echo '<mainpage id="news"><title>Gentoo Linux News</title><author title="Author"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author>' >> ${T}/main-news.xml
125 echo "<version>1.0</version><date>${mydate}</date><newsitems>" >> ${T}/main-news.xml
126 local myext
127 for x in `find xml/news -iname 200*.xml | sort -r`
128 do
129 myext=`basename $x`
130 myext=${myext%*.xml}
131 cat $x | sed -e "1d" -e "s:<news:<news external=\"/news/${myext}.html\":" >> ${T}/main-news.xml
132 xsltproc xsl/guide-main.xsl $x > ${D}/${WEBROOT}/news/${myext}.html
133 done
134 echo "</newsitems></mainpage>" >> ${T}/main-news.xml
135 insinto ${WEBROOT}
136 xsltproc $TEMPLATE ${T}/main-news.xml > ${D}${WEBROOT}/index.html || die
137 xsltproc $TEMPLATE xml/main-about.xml > ${D}${WEBROOT}/index-about.html || die
138 xsltproc $TEMPLATE xml/main-download.xml > ${D}${WEBROOT}/index-download.html || die
139 xsltproc $TEMPLATE xml/main-projects.xml > ${D}${WEBROOT}/index-projects.html || die
140 xsltproc $TEMPLATE xml/main-docs.xml > ${D}${WEBROOT}/index-docs.html || die
141 xsltproc $TEMPLATE xml/main-articles.xml > ${D}${WEBROOT}/index-articles.html || die
142 xsltproc $TEMPLATE xml/main-contract.xml > ${D}${WEBROOT}/index-contract.html || die
143 xsltproc $TEMPLATE xml/main-graphics.xml > ${D}${WEBROOT}/index-graphics.html || die
144 OLDROOT=${ROOT} ; unset ROOT
145
146 mkdir -p xml/packages
147 dodir ${WEBROOT}/packages/
148 insinto ${WEBROOT}/packages/
149 python python/genpkgxml.py ${T}/main-packages-old-style.xml || die
150 python python/genpkgxml-v2.py ${T}/main-packages.xml || die
151 for DIR in `ls xml/packages`
152 do
153 echo "Making dir: (${DIR}) ${D}/${WEBROOT}/${DIR}/"
154 dodir ${WEBROOT}/packages/${DIR}
155 for FILE in `ls xml/packages/${DIR} | sed 's/.xml//'`
156 do
157 echo ${FILE}
158 echo "xsltproc $TEMPLATE xml/packages/${DIR}/${FILE}.xml > ${D}/${WEBROOT}/packages/${DIR}/${FILE}.html"
159 xsltproc $TEMPLATE xml/packages/${DIR}/${FILE}.xml > ${D}/${WEBROOT}/packages/${DIR}/${FILE}.html
160 done
161 done
162
163 ROOT=${OLDROOT}
164 xsltproc $TEMPLATE ${T}/main-packages.xml > ${D}${WEBROOT}/index-packages.html || die
165 xsltproc $TEMPLATE ${T}/main-packages-old-style.xml > ${D}${WEBROOT}/index-packages-old.html || die
166 xsltproc $TEMPLATE xml/main-devlist.xml > ${D}${WEBROOT}/index-devlist.html || die
167 doins css/main-new.css css/resume.css
168
169 #install XSL for later use
170 dodir ${WEBROOT}/xsl
171 insinto ${WEBROOT}/xsl
172 cd ${S}/xsl
173 doins cvs.xsl guide-main.xsl
174
175 #install snddevices script
176 dodir ${WEBROOT}/scripts
177 insinto ${WEBROOT}/scripts
178 cd ${S}/scripts
179 doins snddevices
180
181 dobin ${DISTDIR}/cvs2cl.pl
182 dosbin ${S}/bin/cvslog.sh
183
184 insinto ${WEBROOT}
185 doins ${S}/txt/robots.txt
186
187 cd ${D}
188 chmod -R +r *
189
190 insinto ${WEBROOT}/snapshots
191 newins ${S}/html/index.html-snapshots index.html
192 }
193
194 pkg_preinst() {
195 if [ -d ${WEBROOT}.bak ]
196 then
197 rm -rf ${WEBROOT}.bak
198 fi
199 if [ -d ${WEBROOT} ]
200 then
201 cp -ax ${WEBROOT} ${WEBROOT}.bak
202 fi
203 if [ "`hostname`" = "chiba.3jane.net" ]
204 then
205 echo '>>> Syncing up images to ibiblio...'
206 source ~drobbins/.ssh-agent-chiba.3jane.net
207 rsync --delete -ave ssh ${D}/${WEBROOT}/images/ drobbins@login.ibiblio.org:gentoo/images/
208 fi
209 }

  ViewVC Help
Powered by ViewVC 1.1.20