From: Alex Veber <coronalvr@gentoo.org>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] proposal: webapp.eclass (long)
Date: Wed, 2 Jul 2003 21:29:40 +0300 [thread overview]
Message-ID: <200307022129.53121.coronalvr@gentoo.org> (raw)
In-Reply-To: <59270000.1057167330@valkyrie.lsit.ucsb.edu>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 02 July 2003 20:35, Max Kalika wrote:
> There was a discussion a while back about where and how to install
> web-related applications. As it is now, most webapps try to do some grep
> magic to see where the apache/apache2 doc root is. Why not consolidate all
> this into an eclass with the following (very rough) design spec:
>
>
> --BEGIN---------------------------------------------------------
> inherit webapp
>
> # The directory to install. Defaults to "${S}"
> WEBAPP_SOURCE="/path/to/source/dir"
>
> # Override which files to install relative to ${WEBAPP_SOURCE}.
> # Allows files, and directories. Defaults to all (unset).
> WEBAPP_FILES="file1.php file2.cgi dir1 dir2/file3.html"
>
> # Files to move to /etc/webapps/${PN} and link back so they
> # can be taken into account via CONFIG_PROTECT.
> # Defaults to none (unset).
> WEBAPP_CONFIGS="file1.php dir/config.php"
>
> # Whether or not this webapp contains CGIs. See below.
> # I can see a few packages benefiting from this: e.g. xmltv, mailman
> # nut, apcupsd. Defaults to no (unset).
> WEBAPP_CGI="yes"
>
> # Path to a file contain other directives for the generated apache
> # configuration file. Defaults to none (unset)
> WEBAPP_EXTRA="${FILESDIR}/somefile.conf"
>
> src_unpack() nothing changes -- unpack as normal;
> src_compile() nothing changes -- should have nothing to compile;
> src_install() by default runs webapp_src_install()
> pkg_postinst() by default runs webapp_pkg_postinst()
> pkg_config() by default runs webapp_pkg_config()
>
>
> webapp_src_install() is the workhorse
> - copies ${WEBAPP_SOURCE} all together or the items specified under
> ${WEBAPP_FILES} to /usr/share/webapps/${PN}. (I believe /usr/share/web
> was mentioned as a target candidate as well)
> - copies anything in ${WEBAPP_CONFIG} to /etc/webapps/${PN} and links
> back
> to /usr/share/webapps/${PN}. (Maybe /etc/web?)
> - generates a ${PN}.conf and places it into /etc/apache2/conf/modules.d
> or
> /etc/apache/conf/addon-modules (or both, depending on what exists).
> - the conf file may look something like:
>
> Alias /${PN}/ /usr/share/webapps/${PN}/
> <Directory /usr/share/webapps/${PN}>
> AllowOverride Limit
> Options Indexes FollowSymLinks # ExecCGI if ${WEBAPP_CGI}
> # contents of ${WEBAPP_EXTRA} if it exists
> </Directory>
>
> webapp_pkg_postinst()
> - prints an einfo about running /var/db/pkg/${PF}/${PF}.ebuild config
>
> webapp_pkg_config()
> - activates the $PN.conf file created by webapp_src_install()
> ----END---------------------------------------------------------
>
>
> Again, this is all very rough and is probably missing important features.
> Here's a sample ebuild that can take advantage of this eclass (there's
> absolutely zero testing done because the said eclass is not yet
> implemented).
>
>
> --BEGIN-[net-www/myweb-0.10.ebuild]-----------------------------
> inherit webapp
>
> IUSE=""
> DESCRIPTION="PHP scripts intended to manage MythTV from a web browser."
> HOMEPAGE="http://www.mythtv.org/"
> SRC_URI="http://www.mythtv.org/mc/${P}.tar.bz2"
>
> LICENSE="GPL-2"
> SLOT="0"
> KEYWORDS="~x86"
>
> RDEPEND="dev-db/mysql
> dev-php/mod_php"
>
> src_install() {
>
> WEBAPP_CONFIGS="settings.php"
> webapp_src_install()
>
> dodoc README
>
> }
> ----END---------------------------------------------------------
>
> ---max kalika
> --max@lsit.ucsb.edu
> -lsit systems administrator
>
> --
> gentoo-dev@gentoo.org mailing list
ohh, I like it, I am working on ebuilds for ACID and its deps so ALL the
ebuilds could use that eclass.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/AySX0Q5UUdinJT4RAqX2AKDaoILdqePeaF4MCxQguiEsBEv+VACgsOkm
QMaAvHaNpVpZPZvMLhWSKzE=
=ktKt
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
next prev parent reply other threads:[~2003-07-02 18:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-02 17:35 [gentoo-dev] proposal: webapp.eclass (long) Max Kalika
2003-07-02 18:29 ` Alex Veber [this message]
2003-07-02 21:14 ` Dylan Carlson
2003-07-02 22:47 ` Max Kalika
2003-07-02 22:57 ` Donny Davies
2003-07-03 4:42 ` Max Kalika
2003-07-02 23:16 ` Dylan Carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200307022129.53121.coronalvr@gentoo.org \
--to=coronalvr@gentoo.org \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox