1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 # Original Author: Zhang Le
7 # Purpose: compile and install chinese fortune, regenerate fortune-zh.conf
13 EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm
15 HOMEPAGE
="http://code.google.com/p/chinese-fortune/"
16 SRC_URI
="http://chinese-fortune.googlecode.com/files/${P}.tar.bz2"
21 KEYWORDS
="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
24 DEPEND
="games-misc/fortune-mod-zh
25 app-i18n/zh-autoconvert"
27 CONF
="/etc/fortune-zh.conf"
28 NAME
="${PN/fortune-mod-/}"
30 fortune-zh_src_compile
() {
34 fortune-zh_src_install
() {
35 insinto
/usr
/share
/fortune
37 dosym
$NAME /usr
/share
/fortune
/$NAME.u8
41 fortune-zh_pkg_postinst
() {
42 einfo
"Adding ${NAME} to $CONF"
47 fortune-zh_pkg_postrm
() {
48 einfo
"Removing ${NAME} from $CONF"
49 sed -i -e "/${NAME}/d" $CONF