blob: c510b68f747b383835e08de90c8bc8e5a64c7fe8 (
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
|
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/gallery/gallery-1.4.1_rc4.ebuild,v 1.2 2003/11/20 18:49:50 mholzer Exp $
inherit webapp-apache
MY_P=${P/_rc/-RC}
DESCRIPTION="Web based (PHP Script) photo album viewer/creator."
HOMEPAGE="http://gallery.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
RESTRICT="nomirror"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64"
DEPEND=">=net-www/apache-1.3.24-r1
>=dev-php/mod_php-4.1.2-r5
>=media-gfx/jhead-1.6
>=media-libs/netpbm-9.12
>=media-gfx/imagemagick-5.4.9.1-r1"
S="${WORKDIR}/${PN}"
#DST_PATH="/home/httpd/htdocs/gallery"
webapp-detect || NO_WEBSERVER=1
HTTPD_USER="apache"
HTTPD_GROUP="apache"
pkg_setup() {
webapp-pkg_setup "${NO_WEBSERVER}"
einfo "Installing into ${ROOT}${HTTPD_ROOT}."
}
src_install() {
local DocumentRoot=${HTTPD_ROOT}
local destdir=${DocumentRoot}/${PN}
dodir ${destdir}
dodoc AUTHORS ChangeLog README LICENSE.txt UPGRADING
rm -rf AUTHORS ChangeLog README LICENSE.txt UPGRADING
cp -r . ${D}/${HTTPD_ROOT}/${PN}
cd ${D}/${HTTPD_ROOT}
chown -R ${HTTPD_USER}.${HTTPD_GROUP} ${PN}
# Fix permissions
find ${D}${destdir} -type d | xargs chmod 755
find ${D}${destdir} -type f | xargs chmod 644
#dohtml docs/*
}
pkg_postinst() {
local DocumentRoot=${HTTPD_ROOT}
local destdir=${DocumentRoot}/${PN}
# chown -R apache.apache ${DST_PATH}
chown root.root ${destdir}/secure.sh ${destdir}/configure.sh
chmod 700 ${destdir}/secure.sh ${destdir}/configure.sh
einfo
einfo "For new installations point your browser to "
einfo "http://www.yourhost.com/gallery/setup/"
einfo "and follow the instructions."
einfo "--------------------------------------------"
einfo "For upgrades, just run"
einfo "# cd ${destdir}"
einfo "# sh ./secure.sh"
einfo
}
|