Diff webdavcgi-0.8.4 with a webdavcgi-1.1.1

/usr/portage/www-apps/webdavcgi/webdavcgi-1.1.1.ebuild 2017-02-28 22:50:00.000000000 +0300
1
# Copyright 1999-2015 Gentoo Foundation
1
# Copyright 1999-2016 Gentoo Foundation
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=5
4
EAPI=6
5 5

  
6 6
inherit eutils toolchain-funcs versionator
7 7

  
8
DESCRIPTION="A Perl CGI for accessing and sharing files, or calendar/addressbooks via WebDAV"
8
DESCRIPTION="A Perl CGI for accessing and sharing files, or calendar/addressbooks via WebDAV."
9 9
HOMEPAGE="http://webdavcgi.sourceforge.net/"
10 10
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
11 11

  
12
LICENSE="GPL-3"
12
LICENSE="GPL-3+"
13 13

  
14 14
# Provide slotting on minor versions. WebDAV CGI is a web application which
15 15
# can be shared by multiple instances and thus major updates shouldn't be
......
17 17
SLOT="$(get_version_component_range 1-2)"
18 18

  
19 19
KEYWORDS="~amd64"
20
IUSE="afs kerberos mysql postgres rcs samba +sqlite +suid"
20
IUSE="afs git kerberos ldap mysql pdf postgres rcs samba +sqlite +suid"
21 21

  
22 22
DEPEND=""
23
RDEPEND="!www-apps/webdavcgi:0
24
	afs? ( net-fs/openafs )
23
RDEPEND="afs? ( net-fs/openafs )
25 24
	dev-lang/perl
26 25
	dev-perl/Archive-Zip
26
	dev-perl/CGI
27
	dev-perl/DateTime
28
	dev-perl/DateTime-Format-Human-Duration
27 29
	dev-perl/File-Copy-Link
30
	dev-perl/JSON
31
	dev-perl/List-MoreUtils
32
	dev-perl/MIME-tools
28 33
	dev-perl/PerlIO-gzip
29 34
	dev-perl/Quota
30 35
	dev-perl/TimeDate
31 36
	dev-perl/URI
32 37
	dev-perl/UUID-Tiny
33 38
	dev-perl/XML-Simple
39
	git? ( dev-vcs/git )
34 40
	kerberos? ( virtual/krb5 )
41
	ldap? ( dev-perl/perl-ldap )
35 42
	media-gfx/graphicsmagick[perl]
43
	media-libs/exiftool
36 44
	mysql? ( dev-perl/DBD-mysql )
37
	virtual/perl-Module-Load
45
	pdf? ( app-text/ghostscript-gpl )
38 46
	postgres? ( dev-perl/DBD-Pg )
39 47
	rcs? ( dev-perl/Rcs )
40
	samba? ( dev-perl/Filesys-SmbClient )
48
	samba? ( net-fs/cifs-utils dev-perl/Filesys-SmbClient )
41 49
	sqlite? ( dev-perl/DBD-SQLite )
42
	dev-perl/CGI
43 50
	virtual/perl-File-Spec
51
	virtual/perl-Module-Load
44 52
	|| ( virtual/httpd-cgi virtual/httpd-fastcgi )"
45 53

  
46 54
REQUIRED_USE="|| ( mysql postgres sqlite )"
......
74 82
	use samba && doexe "${CGIBINDIR}/smbwrapper"
75 83

  
76 84
	if use suid; then
77
	    # In order to change the user and group ID at runtime, the webdavwrapper
78
	    # needs to be run as root (set-user-ID and set-group-ID bit)
85
		# In order to change the user and group ID at runtime, the webdavwrapper
86
		# needs to be run as root (set-user-ID and set-group-ID bit)
79 87
		exeopts -o root -g root -m 6755
80 88

  
81
	    local wrapper
89
		local wrapper
82 90
		for wrapper in ${WEBDAVWRAPPERS}; do
83 91
			einfo "Installing UID/GID wrapper ${wrapper}"
84 92
			doexe "${CGIBINDIR}/${wrapper}"
......
102 110

  
103 111
	local installBaseDir="/usr/share/${PN}-${SLOT}"
104 112
	local currentDir
105
	for currentDir in htdocs lib locale; do
113
	for currentDir in htdocs lib locale templates; do
106 114
		insinto "${installBaseDir}/${currentDir}"
107 115
		doins -r "${currentDir}"/*
108 116
	done
......
110 118
	if use mysql || use postgres; then
111 119
		local sqlDir='sql'
112 120
		insinto "${installBaseDir}/${sqlDir}"
113
		use mysql    && "${sqlDir}/mysql.sql"
114
		use postgres && "${sqlDir}/postgresql.sql"
121
		use mysql    && doins "${sqlDir}/mysql.sql"
122
		use postgres && doins "${sqlDir}/postgresql.sql"
115 123
	fi
116 124

  
117 125
	if use sqlite; then
......
127 135
		fperms 1777 "${SQLITEDIR}"
128 136
	fi
129 137

  
130
	# Default thumbnail directory, writable by all users
131
	export THUMBNAILDIR="/var/cache/${PN}/${SLOT}/default/thumbnails"
132
	keepdir "${THUMBNAILDIR}"
133
	fperms 1777 "${THUMBNAILDIR}"
138
	# Create default temporary directories, writable by all users
139
	export TMPDIRS="trash thumbnails optimized"
140
	for tmpDir in ${TMPDIRS}; do
141
		keepdir "/var/tmp/${PN}/${SLOT}/default/${tmpDir}"
142
		fperms 1777 "/var/tmp/${PN}/${SLOT}/default/${tmpDir}"
143
	done
134 144

  
135 145
	export APACHEEXAMPLECONFIG="apache-webdavcgi-${SLOT}-example.conf"
136
	dodoc CHANGELOG TODO
146
	dodoc CHANGELOG
147
	dodoc etc/webdav.conf.complete
137 148
	dodoc "${FILESDIR}/${APACHEEXAMPLECONFIG}"
138
	dohtml -r doc/*
149
	dodoc -r "doc/"
139 150
}
140 151

  
141 152
pkg_postinst() {
......
144 155
	ewarn "To set restrictive permissions, add all WebDAV CGI users to a"
145 156
	ewarn "common group, and allow access to the following directories by this"
146 157
	ewarn "group only."
147
	ewarn "Thumbnail directory: ${THUMBNAILDIR}"
158
	ewarn "Temp directories:    /var/tmp/${PN}/${SLOT}/default/*"
148 159
	use sqlite && ewarn "SQLite directory:    ${SQLITEDIR}"
149 160

  
150
	ewarn
151
	ewarn "Until bug #456180 is fixed, you probably have to re-emerge"
152
	ewarn "media-gfx/graphicsmagick"
153

  
154 161
	elog
155 162
	elog "The WebDAV CGI config is located at ${WEBDAVCONFIG}."
156 163
	elog
157 164
	elog "An example Apache HTTP server configuration snippet is available in"
158
	elog "/usr/share/doc/${PF} in the file ${APACHEEXAMPLECONFIG}"
165
	elog "${ROOT%/}/usr/share/doc/${PF} in the file ${APACHEEXAMPLECONFIG}"
166
	elog
167
	elog "An important note to systemd user's running the Apache HTTP server:"
168
	elog "The default apache2.service will be started with private file system"
169
	elog "namespaces for /var/tmp and /tmp enabled (PrivateTmp=true)."
170
	elog "This means that you either need to disable PrivateTmp, relocate the"
171
	elog "directories starting with /var/tmp within ${WEBDAVCONFIG}"
172
	elog "or pre-create the directory structure with a user defined systemd"
173
	elog "companion unit using the JoinsNamespaceOf directive."
174
	elog
175
	elog "To disable the private file system namespace, override the existing"
176
	elog "service:"
177
	elog "systemctl edit apache2.service"
178
	elog "[Service]"
179
	elog "PrivateTmp=false"
159 180

  
160 181
	einfo
161 182
	einfo "Detailed installation and configuration instructions can be found at"
Thank you!