/[gentoo-x86]/www-apps/webdavcgi/webdavcgi-0.8.3.ebuild
Gentoo

Contents of /www-apps/webdavcgi/webdavcgi-0.8.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat Jun 13 17:22:20 2015 UTC (5 years ago) by dilfridge
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +3 -3 lines
The CGI module is no longer part of core Perl and has been moved to dev-perl

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0B08240A96F66571)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-apps/webdavcgi/webdavcgi-0.8.3.ebuild,v 1.4 2014/08/10 20:15:51 slyfox Exp $
4
5 EAPI=4
6
7 inherit eutils toolchain-funcs webapp
8
9 DESCRIPTION="A Perl CGI for accessing and sharing files, or calendar/addressbooks via WebDAV"
10 HOMEPAGE="http://webdavcgi.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
12
13 LICENSE="GPL-3"
14 SLOT="0"
15 WEBAPP_MANUAL_SLOT="yes"
16 KEYWORDS="~amd64"
17 IUSE="mysql postgres rcs samba +sqlite +suid"
18
19 DEPEND=""
20 RDEPEND="dev-perl/Archive-Zip
21 dev-perl/File-Copy-Link
22 dev-perl/PerlIO-gzip
23 dev-perl/Quota
24 dev-perl/TimeDate
25 dev-perl/URI
26 dev-perl/UUID-Tiny
27 dev-perl/XML-Simple
28 media-gfx/graphicsmagick[perl]
29 mysql? ( dev-perl/DBD-mysql )
30 virtual/perl-Module-Load
31 postgres? ( dev-perl/DBD-Pg )
32 rcs? ( dev-perl/Rcs )
33 samba? ( dev-perl/Filesys-SmbClient )
34 sqlite? ( dev-perl/DBD-SQLite )
35 dev-perl/CGI
36 virtual/perl-File-Spec"
37
38 need_httpd_cgi
39
40 REQUIRED_USE="|| ( mysql postgres sqlite )"
41
42 CGIBINDIR="cgi-bin"
43
44 src_prepare() {
45 epatch "${FILESDIR}/${PV}-logout-var-expansion.patch"
46 }
47
48 src_compile() {
49 if use suid; then
50 # There are several webdavwrappers, TODO: make it configureable
51 export WEBDAVWRAPPER="webdavwrapper"
52
53 $(tc-getCC) ${LDFLAGS} ${CFLAGS} \
54 -o "${CGIBINDIR}/${WEBDAVWRAPPER}" \
55 helper/webdavwrapper.c || die "compile ${WEBDAVWRAPPER} failed"
56 fi
57 }
58
59 src_install() {
60 webapp_src_preinst
61
62 local htdocsDir='htdocs'
63 local confDir='etc'
64
65 local installDirs="$confDir lib locale"
66
67 insinto "${MY_HTDOCSDIR}"
68 doins -r "${htdocsDir}"/*
69
70 exeinto "${MY_CGIBINDIR}"
71 newexe "${CGIBINDIR}/logout-dist" logout
72
73 doexe "${CGIBINDIR}/webdav.pl"
74 use suid && doexe "${CGIBINDIR}/${WEBDAVWRAPPER}"
75
76 local currentDir
77 for currentDir in ${installDirs}; do
78 dodir "${MY_HOSTROOTDIR}/${currentDir}"
79 insinto "${MY_HOSTROOTDIR}/${currentDir}"
80 doins -r "${currentDir}"/*
81 done
82
83 webapp_configfile "${MY_HOSTROOTDIR}/${confDir}"/{webdav.conf-dist,mime.types}
84
85 use mysql && webapp_sqlscript mysql sql/mysql.sql
86 use postgres && webapp_sqlscript postgres sql/postgresql.sql
87
88 dodoc CHANGELOG TODO
89 dohtml -r doc/*
90
91 webapp_hook_script "${FILESDIR}/reconfig"
92
93 webapp_src_install
94
95 # In order to change the user and group ID at runtime, the webdavwrapper
96 # needs to be run as root (set-user-ID and set-group-ID bit)
97 if use suid; then
98 einfo "Setting SUID and SGID bit for ${WEBDAVWRAPPER}"
99 fowners root:root "${MY_CGIBINDIR}/${WEBDAVWRAPPER}"
100 fperms 6755 "${MY_CGIBINDIR}/${WEBDAVWRAPPER}"
101 webapp_postinst_txt en "${FILESDIR}/postinstall-${WEBDAVWRAPPER}-en.txt"
102 webapp_hook_script "${FILESDIR}/reconfig-suid"
103 else
104 ewarn "You have the 'suid' USE flag disabled"
105 ewarn "WebDAV CGI won't be able to switch user ids"
106 webapp_postinst_txt en "${FILESDIR}/postinstall-en.txt"
107 fi
108 }

  ViewVC Help
Powered by ViewVC 1.1.20