blob: e9d3d9683e50f49bbf28fdd97d9817052dceea4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
# Copyright 1999-2001 Gentoo Technologies, Inc. Distributed under the terms
# of the GNU General Public License, v2 or later
# Author: Daniel Robbins <drobbins@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/app-doc/gentoo-web/gentoo-web-2.2.ebuild,v 1.26 2002/01/02 21:13:36 drobbins Exp $
# WARNING: THIS EBUILD SHOULD BE EDITED BY DANIEL ROBBINS ONLY
TEMPLATE="xsl/guide-main.xsl"
S=${WORKDIR}/gentoo-src/gentoo-web
DESCRIPTION="www.gentoo.org website"
SRC_URI="http://www.red-bean.com/cvs2cl/cvs2cl.pl"
HOMEPAGE="http://www.gentoo.org"
RDEPEND="virtual/python dev-libs/libxslt"
WEBROOT=/www/virtual/www.gentoo.org/htdocs
src_unpack() {
if [ "$MAINTAINER" != "yes" ]
then
echo "This will zap stuff in ${WEBROOT}."
echo "Beware -- maintainers only."
fi
cd ${WORKDIR}/${P}
cvs -d /home/cvsroot co gentoo-src
}
src_install() {
dodir ${WEBROOT}/doc
dodir ${WEBROOT}/projects
insinto ${WEBROOT}/doc
cd ${S}
local x
for x in build desktop xml-guide portage-user gentoo-howto faq nvidia_tsg openafs cvs-tutorial
do
xsltproc $TEMPLATE xml/${x}.xml > ${D}${WEBROOT}/doc/${x}.html || die
done
dodir ${WEBROOT}/images
insinto ${WEBROOT}/images
cd ${S}/images
doins paypal.png gtop-s.jpg gbot-s.gif gridtest.gif gentoo-new.gif install*.gif fishhead.gif line.gif icon-* keychain-2.gif gentoo-2.gif
insinto ${WEBROOT}
doins favicon.ico
#dynamic firewalls tools page
cd ${S}
xsltproc $TEMPLATE xml/dynfw.xml > ${D}${WEBROOT}/projects/dynfw.html || die
xsltproc $TEMPLATE xml/project-xml.xml > ${D}${WEBROOT}/projects/xml.html || die
#resume
xsltproc xsl/resume-html.xsl xml/resume.xml > ${D}${WEBROOT}/resume.html || die
#both URLs should work
dodir ${WEBROOT}/projects/keychain
xsltproc $TEMPLATE xml/keychain.xml > ${D}${WEBROOT}/projects/keychain.html || die
xsltproc $TEMPLATE xml/keychain.xml > ${D}${WEBROOT}/projects/keychain/index.html || die
insinto ${WEBROOT}/projects
doins dynfw/dynfw-1.0.1.tar.gz
cd ..
tar czvf ${D}${WEBROOT}/projects/guide-xml-latest.tar.gz gentoo-web
cd ${S}
insinto ${WEBROOT}
xsltproc $TEMPLATE xml/main-news.xml > ${D}${WEBROOT}/index.html || die
xsltproc $TEMPLATE xml/main-about.xml > ${D}${WEBROOT}/index-about.html || die
xsltproc $TEMPLATE xml/main-download.xml > ${D}${WEBROOT}/index-download.html || die
xsltproc $TEMPLATE xml/main-projects.xml > ${D}${WEBROOT}/index-projects.html || die
doins css/main-new.css css/resume.css
#install XSL for later use
dodir ${WEBROOT}/xsl
insinto ${WEBROOT}/xsl
cd ${S}/xsl
doins cvs.xsl guide-main.xsl
#install snddevices script
dodir ${WEBROOT}/scripts
insinto ${WEBROOT}/scripts
cd ${S}/scripts
doins snddevices
#wikistuffs
# dodir ${WEBROOT}/wiki/images
# dodir ${WEBROOT}/wiki/bios
# insinto ${WEBROOT}/wiki
# cd ${S}/wiki
# doins *.php
# cd images
# insinto ${WEBROOT}/wiki/images
# doins *.gif
# cd ../bios
# insinto ${WEBROOT}/wiki/bios
# doins *.png *.jpg *.gif
# cd ${D}
# chmod -R g+rw,o+r *
# chown -R root.root *
# cd ${D}/usr/local/httpd
# chown -R drobbins.webadmin htdocs
# chmod -R g+rws htdocs
dobin ${DISTDIR}/cvs2cl.pl
dosbin ${S}/bin/cvslog.sh
# dosbin ${FILESDIR}/bin/wiki.pl
# chmod o-rwx,g+rx ${D}/usr/sbin/wiki.pl
# chown root.dbadmin ${D}/usr/sbin/wiki.pl
# ln -s /home/mailman/icons ${D}${WEBROOT}/mailman-images
}
pkg_preinst() {
if [ -d ${WEBROOT}.bak ]
then
rm -rf ${WEBROOT}.bak
fi
if [ -d ${WEBROOT} ]
then
cp -ax ${WEBROOT} ${WEBROOT}.bak
fi
}
#pkg_postinst() {
# source /home/drobbins/.wiki-auth
# cd ${WEBROOT}/wiki
# cp functions.php functions.php.orig
# sed -e "s:##USER##:${WIKI_USER}:g" -e "s:##PASS##:${WIKI_PASS}:g" -e "s:##DB##:${WIKI_DB}:g" functions.php.orig > functions.php
# rm functions.php.orig
# cd /usr/sbin
# cp wiki.pl wiki.pl.orig
# sed -e "s:##USER##:${WIKI_USER}:g" -e "s:##PASS##:${WIKI_PASS}:g" -e "s:##DB##:${WIKI_DB}:g" wiki.pl.orig > wiki.pl
# rm wiki.pl.orig
#}
|