| 1 |
# Copyright 1999-2008 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-dns/noip-updater/noip-updater-2.1.9.ebuild,v 1.4 2008/12/17 20:11:28 maekke Exp $
|
| 4 |
|
| 5 |
inherit eutils toolchain-funcs
|
| 6 |
|
| 7 |
MY_P=${P/-updater/}
|
| 8 |
DESCRIPTION="no-ip.com dynamic DNS updater"
|
| 9 |
HOMEPAGE="http://www.no-ip.com"
|
| 10 |
SRC_URI="http://www.no-ip.com/client/linux/${MY_P}.tar.gz"
|
| 11 |
|
| 12 |
LICENSE="GPL-2"
|
| 13 |
SLOT="0"
|
| 14 |
KEYWORDS="alpha amd64 ~hppa ia64 ~mips ~ppc ppc64 sparc x86"
|
| 15 |
IUSE=""
|
| 16 |
|
| 17 |
RDEPEND=""
|
| 18 |
DEPEND="sys-devel/gcc"
|
| 19 |
|
| 20 |
S=${WORKDIR}/${MY_P}
|
| 21 |
|
| 22 |
src_unpack() {
|
| 23 |
unpack ${A}
|
| 24 |
cd "${S}"
|
| 25 |
epatch "${FILESDIR}"/noip-2.1.9-flags.patch
|
| 26 |
epatch "${FILESDIR}"/noip-2.1.9-daemon.patch
|
| 27 |
sed -i \
|
| 28 |
-e "s:\(#define CONFIG_FILEPATH\).*:\1 \"/etc\":" \
|
| 29 |
-e "s:\(#define CONFIG_FILENAME\).*:\1 \"/etc/no-ip2.conf\":" \
|
| 30 |
noip2.c || die "sed failed"
|
| 31 |
}
|
| 32 |
|
| 33 |
src_compile() {
|
| 34 |
emake \
|
| 35 |
CC=$(tc-getCC) \
|
| 36 |
PREFIX=/usr \
|
| 37 |
CONFDIR=/etc || die "emake failed"
|
| 38 |
}
|
| 39 |
|
| 40 |
src_install() {
|
| 41 |
dosbin noip2
|
| 42 |
dodoc README.FIRST
|
| 43 |
newinitd "${FILESDIR}"/noip2.start noip
|
| 44 |
}
|
| 45 |
|
| 46 |
pkg_postinst() {
|
| 47 |
elog "Configuration can be done manually via:"
|
| 48 |
elog "/usr/sbin/noip2 -C or "
|
| 49 |
elog "first time you use the /etc/init.d/noip script; or"
|
| 50 |
elog "by using this ebuild's config option."
|
| 51 |
}
|
| 52 |
|
| 53 |
pkg_config() {
|
| 54 |
cd /tmp
|
| 55 |
einfo "Answer the following questions."
|
| 56 |
noip2 -C || die
|
| 57 |
}
|