blob: 93f4c7c9552c34eea3aa92d243cc59917042d80e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/apt-proxy/apt-proxy-1.3.0.ebuild,v 1.1 2004/04/22 18:12:31 mholzer Exp $
DESCRIPTION="Caching proxy for the Debian package system"
HOMEPAGE="http://sourceforge.net/projects/apt-proxy/"
SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND=""
RDEPEND="sys-apps/xinetd
net-misc/rsync
net-misc/wget"
S=${WORKDIR}/${P}
pkg_setup () {
enewgroup apt-proxy
enewuser apt-proxy -1 /bin/false /dev/null apt-proxy
}
src_compile() {
einfo "Applying patch..."
#patch -u apt-proxy < ${FILESDIR}/${P}-sh.patch
epatch ${FILESDIR}/${P}-sh.patch
}
src_install() {
dosbin apt-proxy
insinto /etc/apt-proxy ; doins apt-proxy.conf
insinto /etc/xinetd.d ; doins ${FILESDIR}/apt-proxy
dodoc README INSTALL HISTORY
doman apt-proxy.{8,conf.5}
# Create the log file with the proper permissions
dodir /var/log
touch ${D}/var/log/apt-proxy.log
fowners apt-proxy:apt-proxy /var/log/apt-proxy.log
# Create the cache directories and set the proper permissions
dodir /var/cache/apt-proxy
keepdir /var/cache/apt-proxy
fowners apt-proxy:apt-proxy /var/cache/apt-proxy
}
pkg_postinst() {
einfo ""
einfo "Don't forget to modify the /etc/apt-proxy/apt-proxy.conf"
einfo "file to fit your needs..."
einfo ""
einfo "Also note that apt-proxy is called from running xinetd"
einfo "and you have to enable it first (/etc/xinetd.d/apt-proxy)..."
einfo ""
}
pkg_postrm() {
einfo ""
einfo "You have to remove the apt-proxy cache by hand. It's located"
einfo "in the \"/var/cache/apt-proxy\" dir..."
einfo ""
einfo "You can also remove the apt-proxy user and group..."
einfo ""
}
|