/[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.4 - (hide annotations) (download)
Sat Aug 4 11:58:16 2012 UTC (2 years ago) by jer
Branch: MAIN
Changes since 1.3: +2 -2 lines
Stable for HPPA (bug #428824).

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20