1 |
# Copyright 1999-2003 Gentoo Technologies, Inc. |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /home/cvsroot/gentoo-x86/net-misc/rsync/rsync-2.5.6-r3.ebuild,v 1.4 2003/09/17 23:53:09 avenj Exp $ |
4 |
|
5 |
inherit eutils |
6 |
|
7 |
DESCRIPTION="File transfer program to keep remote files into sync" |
8 |
HOMEPAGE="http://rsync.samba.org/" |
9 |
SRC_URI="http://rsync.samba.org/ftp/rsync/${P}.tar.gz |
10 |
http://www.imada.sdu.dk/~bardur/personal/patches/${PN}-proxy-auth/${P}-proxy-auth-1.patch" |
11 |
|
12 |
LICENSE="GPL-2" |
13 |
SLOT="0" |
14 |
KEYWORDS="amd64 x86 ppc hppa arm sparc mips alpha ia64" |
15 |
|
16 |
DEPEND="virtual/glibc |
17 |
>=sys-apps/sed-4 |
18 |
!build? ( >=dev-libs/popt-1.5 )" |
19 |
|
20 |
src_unpack() { |
21 |
unpack ${P}.tar.gz |
22 |
epatch ${DISTDIR}/${P}-proxy-auth-1.patch |
23 |
cd ${S} |
24 |
|
25 |
# change confdir to /etc/rsync rather than just /etc (the --sysconfdir |
26 |
# configure option doesn't work |
27 |
sed -i 's|/etc/rsyncd.conf|/etc/rsync/rsyncd.conf|g' rsync.h |
28 |
# yes, updating the man page is very important. |
29 |
sed -i 's|/etc/rsyncd|/etc/rsync/rsyncd|g' rsyncd.conf.5 |
30 |
} |
31 |
|
32 |
src_compile() { |
33 |
[ -n "$(use build)" ] \ |
34 |
&& POPTSETTING="--with-included-popt" \ |
35 |
|| POPTSETTING="" |
36 |
[ -z "${CC}" ] && CC=gcc |
37 |
if [ "`${CC} -dumpversion | cut -d. -f1,2`" = "2.95" ] ; then |
38 |
export LDFLAGS="${LDFLAGS} -lpthread" |
39 |
fi |
40 |
econf ${POPTSETTING} || die |
41 |
use static && export LDFLAGS="${LDFLAGS} -static" |
42 |
emake || die |
43 |
} |
44 |
|
45 |
src_install() { |
46 |
einstall || die |
47 |
insinto /etc/conf.d && newins ${FILESDIR}/rsyncd.conf.d rsyncd |
48 |
exeinto /etc/init.d && newexe ${FILESDIR}/rsyncd.init.d rsyncd |
49 |
if [ -z "`use build`" ] ; then |
50 |
dodir /etc/rsync |
51 |
dodoc COPYING NEWS OLDNEWS README TODO tech_report.tex |
52 |
if [ ! -e /etc/rsync/rsyncd.conf ] ; then |
53 |
insinto /etc/rsync |
54 |
doins ${FILESDIR}/rsyncd.conf |
55 |
fi |
56 |
else |
57 |
rm -rf ${D}/usr/share |
58 |
fi |
59 |
} |
60 |
|
61 |
pkg_postinst() { |
62 |
einfo 'This patch enables usage of user:pass@proxy.foo:port' |
63 |
einfo 'in the RSYNC_PROXY environment variable to support' |
64 |
einfo 'the "Basic" proxy authentication scheme if you are' |
65 |
einfo 'behind a password protected HTTP proxy.' |
66 |
} |