summaryrefslogtreecommitdiff
blob: d4da46d4eb6c5a8b5652ce30cee6eb4ac62759c5 (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
72
73
74
75
76
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/rskkserv/rskkserv-2.94.13.ebuild,v 1.1 2004/02/17 19:59:18 usata Exp $

IUSE=""

inherit ruby

DESCRIPTION="rskkserv is an alternative version of skkserv implemented by Ruby"
HOMEPAGE="http://raa.ruby-lang.org/list.rhtml?name=rskkserv"
SRC_URI="http://www.unixuser.org/~ysjj/rskkserv/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"

DEPEND="dev-lang/ruby
	dev-ruby/ruby-tcpwrap"
RDEPEND="${DEPEND}
	app-i18n/skk-jisyo"
PROVIDE="virtual/skkserv"
USE_RUBY="ruby16 ruby18 ruby19"

S=${WORKDIR}/${PN}-cvs

src_unpack() {

	unpack ${P}.tar.gz

	cd ${S}
	epatch ${FILESDIR}/${P}-gentoo.diff
	epatch ${FILESDIR}/${P}-conf-gentoo.diff

	sed -i -e "s%with_RUBY%with_ruby%g" configure
	sed -i -e "s%@VERSION@%${PV}%g" doc/*.in
}

src_compile() {

	EXTRA_ECONF="--with-dicfile=/usr/share/skk/SKK-JISYO.L
		--with-cachedir=/var/lib/rskkserv
		--with-piddir=/var/run
		--with-logdir=/var/log"

	econf || die
	emake || die
}

src_install() {

	keepdir /var/lib/rskkserv
	einstall || die

	exeinto /etc/init.d
	newexe ${FILESDIR}/rskkserv.initd rskkserv || die

	dodoc ChangeLog
	cd doc
	dodoc rskkserv.conf.sample
	newdoc README.old README
	newman rskkserv.1.in rskkserv.1
	insinto /usr/share/man/ja/man1
	newins rskkserv.1.ja_JP.eucJP.in rskkserv.1
}

pkg_postinst() {

	einfo
	einfo "If you want to add auxiliary dictionaries (e.g. SKK-JISYO.JIS2,"
	einfo "SKK-JISYO.jinmei, SKK-JISYO.2ch and so on) you need to emerge"
	einfo "app-i18n/skk-jisyo-extra and uncomment dictionary entries in"
	einfo "/etc/rskkserv.conf manually."
	#einfo "See /usr/share/doc/${PF}/rskkserv.conf.sample.gz"
	#einfo "for an example of multiple dictionaries."
	einfo
}