# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Daylight saving time autoconfiguration for Brazil" HOMEPAGE="http://packages.debian.org/stable/admin/tz-brasil" # Grabs the "binary" package because is had destination directory information, # while in the "source" package this is generated by an installation script. SRC_URI="ftp://ftp.br.debian.org/debian/pool/main/t/${PN}/${PN}_${PV}_all.deb" LICENSE="GPL-2" SLOT="0" # Supposed to run nicely on every architecture. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips \ ~ppc ~ppc64 ~ppc-macos ~s390 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="" DEPEND="app-arch/tar sys-devel/binutils " RDEPEND="net-analyzer/fping net-dialup/ppp net-misc/wget sys-process/vixie-cron " src_unpack() { echo ">>> Unpacking ${A} to ${PWD}" cp "${DISTDIR}"/${A} . ar x ${A} || die "failure unpacking ${A}" } src_install () { cd ${D} tar zxf "${WORKDIR}"/data.tar.gz || die "failur installing data" } pkg_postinst () { # This is natively a Debian package; on Debian systems, /etc/ppp/ip-up has # the following line: # # run-parts /etc/ppp/ip-up.d \ # --arg="$1" --arg="$2" --arg="$3" --arg="$4" --arg="$5" --arg="$6" # # It runs every script in /etc/ppp/ip-up.d/, where packages are supposed to add # them, instead of editing /etc/ppp/ip-up or /etc/ppp/ip-up.d. However, this # directory does not exist in other GNU/Linux distributions, including Gentoo. # # This ebuild creates the directory and the script within, and asks the user to # call the script directly from /etc/ppp/ip-up. An alternative would be doing it # the Debian way (run-parts(8) belongs to sys-apps/debianutils), but, while this # approach would be very elegant, it doesn't really matters, since no other # Gentoo package will benefit from it. echo einfo "tz-brasil periodically looks on the internet for information on" einfo "daylight saving time offsets. If you spend little time on-line," einfo "you may add the following to /etc/ppp/ip-up, thus launching it" einfo "every time the connection is brought up." einfo einfo "O tz-brasil obtem periodicamente informacoes on-line a respeito do" einfo "horario de verao. Se voce passa pouco tempo on-line, pode adicionar" einfo "a seguinte linha ao /etc/ppp/ip-up, de forma a te-lo rodando a cada conexao." einfo einfo "/etc/ppp/ip-up.d/99tz-brasil" echo } # /usr/share/doc/vixie-cron-4.1-r8/FEATURES.gz, patched by # vixie-cron-4.1-gentoo-r4.patch.bz2: # # If it exists, the /etc/cron.d/ directory is parsed like the cron # spool directory, except that the files in it are not user-specific # and are therefore read with /etc/crontab syntax (the user is # specified explicitly in the 6th column). # # This is not an original vixie-cron feature, but Debian (and Gentoo, and # everyone else) patched it for this behaviour.