blob: 909963e9938d4803a81a37c3ea3b5ef9a3c21fe8 (
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
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dialup/pppconfig/pppconfig-2.3.11-r1.ebuild,v 1.1 2005/06/12 12:07:53 mrness Exp $
DESCRIPTION="A text menu based utility for configuring ppp."
SRC_URI="http://http.us.debian.org/debian/pool/main/p/pppconfig/${PN}_${PV}.tar.gz"
HOMEPAGE="http://http.us.debian.org/debian/pool/main/p/pppconfig/"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~ppc ~x86"
IUSE="nls"
DEPEND="net-dialup/ppp
dev-util/dialog
nls? ( sys-devel/gettext )"
S=${WORKDIR}/${PN}
src_unpack() {
unpack ${A}
if use nls; then
declare MY_LOCALE_LANGUAGES
cd ${S}/po
if [ -n "${LINGUAS}" ]; then #install messages only in user-selected languages
local lang
for lang in ${LINGUAS}; do
[ -f "${lang}.po" ] && \
MY_LOCALE_LANGUAGES="${MY_LOCALE_LANGUAGES} ${lang}"
done
fi
if [ -z "${MY_LOCALE_LANGUAGES}" ]; then #install messages in all available languages
local f
for f in *.po; do
MY_LOCALE_LANGUAGES="${MY_LOCALE_LANGUAGES} ${f%.po}"
done
fi
einfo "Locale messages will be installed in following languages:"
einfo " ${MY_LOCALE_LANGUAGES}"
fi
}
src_compile() {
if use nls; then
local lang
for lang in ${MY_LOCALE_LANGUAGES}; do
msgfmt -o po/${lang}.mo po/${lang}.po || \
die "failed to compile ${lang}.mo"
done
fi
}
src_install () {
dodir /etc/chatscripts /etc/ppp/resolv
dosbin 0dns-down 0dns-up dns-clean
newsbin pppconfig pppconfig.real
dosbin ${FILESDIR}/pppconfig
doman pppconfig.8
dodoc debian/{copyright,changelog}
if use nls; then
local lang
for lang in ${MY_LOCALE_LANGUAGES}; do
insinto /usr/share/locale/${lang}/LC_MESSAGES
newins po/${lang}.mo pppconfig.mo
done
fi
}
|