/[gentoo-x86]/www-servers/publicfile/publicfile-0.52-r3.ebuild
Gentoo

Contents of /www-servers/publicfile/publicfile-0.52-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Sat Mar 22 17:58:07 2014 UTC (4 months, 4 weeks ago) by kensington
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x06B1F38DCA45A1EC!)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-servers/publicfile/publicfile-0.52-r3.ebuild,v 1.11 2013/12/25 20:37:23 jer Exp $
4
5 EAPI=4
6
7 inherit eutils toolchain-funcs user
8
9 DESCRIPTION="publish files through FTP and HTTP"
10 HOMEPAGE="http://cr.yp.to/publicfile.html"
11 SRC_URI="http://cr.yp.to/publicfile/${P}.tar.gz
12 http://www.ohse.de/uwe/patches/${P}-filetype-diff
13 http://www.publicfile.org/ftp-ls-patch"
14
15 LICENSE="all-rights-reserved"
16 SLOT="0"
17 KEYWORDS=" amd64 ppc x86"
18 IUSE="selinux vanilla"
19 RESTRICT="mirror bindist test"
20
21 RDEPEND="virtual/daemontools
22 >=sys-apps/ucspi-tcp-0.83
23 selinux? ( sec-policy/selinux-publicfile )
24 !net-ftp/netkit-ftpd"
25
26 src_prepare() {
27 # verbose build log
28 epatch "${FILESDIR}"/${P}-build.patch
29
30 # filetypes in env using daemontools
31 use vanilla || epatch "${DISTDIR}"/${P}-filetype-diff
32
33 # "normal" ftp listing
34 use vanilla || epatch "${DISTDIR}"/ftp-ls-patch
35
36 # fix for glibc-2.3.2 errno issue
37 sed -i -e 's|extern int errno;|#include <errno.h>|' error.h
38
39 # fix file collision
40 sed -i configure.c \
41 -e 's|/bin/httpd|/bin/publicfile-httpd|' \
42 -e 's|/bin/ftpd|/bin/publicfile-ftpd|' \
43 || die "sed file collision failed"
44 }
45
46 src_configure() {
47 tc-export AR RANLIB
48 echo "$(tc-getCC) ${CFLAGS}" > conf-cc
49 echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
50 echo "/usr" > conf-home
51 }
52
53 src_install() {
54 exeinto /usr/bin
55 newexe ftpd publicfile-ftpd
56 newexe httpd publicfile-httpd
57 newexe configure publicfile-conf
58 dodoc CHANGES README TODO
59 }
60
61 pkg_preinst() {
62 enewgroup nofiles
63 enewuser ftp -1 -1 /home/public nofiles
64 enewuser ftplog -1 -1 /home/public nofiles
65 }
66
67 pkg_postinst() {
68 if [ ! -d /home/public/httpd ]; then
69 einfo "Setting up server root in /home/public"
70 if [ -d /home/public ]; then
71 backupdir=public.old-$(date +%s)
72 einfo "Serverroot exists... backing up to ${backupdir}"
73 mv /home/public /home/${backupdir}
74 fi
75 /usr/bin/publicfile-conf ftp ftplog /home/public `hostname`
76 fi
77 echo
78 einfo "publichtml-httpd and public-html ftpd are serving out"
79 einfo "of /home/public. Remember to start the servers with:"
80 einfo " ln -s /home/public/public-httpd /home/public/public-ftpd /service"
81 echo
82 }

  ViewVC Help
Powered by ViewVC 1.1.20