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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20