diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-07-02 14:04:55 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-07-02 14:04:55 +0000 |
commit | ffcf9768df45b587423ef5af5e730770535bd5d6 (patch) | |
tree | 7e697fbea56c3929fba46dd2d69290ffa0d38f01 /net-irc/rbot | |
parent | stable ppc, bug 230121 (diff) | |
download | gentoo-2-ffcf9768df45b587423ef5af5e730770535bd5d6.tar.gz gentoo-2-ffcf9768df45b587423ef5af5e730770535bd5d6.tar.bz2 gentoo-2-ffcf9768df45b587423ef5af5e730770535bd5d6.zip |
Add an ebuild for the first release candidate of the new 0.9.11 rbot. As the new version is long overdue, I'm not masking it for now, but I am dropping all the keywords beside the one where I tested it. Note that this RC does not contain nls support for a problem with packaging. Fixed up the live ebuild so that it can be re-used for the next RC too.
(Portage version: 2.2_rc1/cvs/Linux 2.6.25-gentoo-r4 x86_64)
Diffstat (limited to 'net-irc/rbot')
-rw-r--r-- | net-irc/rbot/ChangeLog | 12 | ||||
-rw-r--r-- | net-irc/rbot/rbot-0.9.11_rc1.ebuild | 141 | ||||
-rw-r--r-- | net-irc/rbot/rbot-9999-r10.ebuild | 33 |
3 files changed, 170 insertions, 16 deletions
diff --git a/net-irc/rbot/ChangeLog b/net-irc/rbot/ChangeLog index f08c80d91af2..bf3dd369be0e 100644 --- a/net-irc/rbot/ChangeLog +++ b/net-irc/rbot/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-irc/rbot # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.32 2008/06/30 16:53:24 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.33 2008/07/02 14:04:55 flameeyes Exp $ + +*rbot-0.9.11_rc1 (02 Jul 2008) + + 02 Jul 2008; Diego Pettenò <flameeyes@gentoo.org> + +rbot-0.9.11_rc1.ebuild, rbot-9999-r10.ebuild: + Add an ebuild for the first release candidate of the new 0.9.11 rbot. As + the new version is long overdue, I'm not masking it for now, but I am + dropping all the keywords beside the one where I tested it. Note that this + RC does not contain nls support for a problem with packaging. Fixed up the + live ebuild so that it can be re-used for the next RC too. *rbot-9999-r10 (30 Jun 2008) diff --git a/net-irc/rbot/rbot-0.9.11_rc1.ebuild b/net-irc/rbot/rbot-0.9.11_rc1.ebuild new file mode 100644 index 000000000000..7d1b6b391e1c --- /dev/null +++ b/net-irc/rbot/rbot-0.9.11_rc1.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/rbot-0.9.11_rc1.ebuild,v 1.1 2008/07/02 14:04:55 flameeyes Exp $ + +inherit ruby eutils + +[[ ${PV} == *"9999" ]] && inherit git + +DESCRIPTION="rbot is a ruby IRC bot" +HOMEPAGE="http://ruby-rbot.org/" + +LICENSE="GPL-2 as-is" +SLOT="0" +KEYWORDS="~amd64" +IUSE="spell aspell timezone translator shorturl dict figlet + fortune cal host toilet hunspell" +ILINGUAS="zh_CN zh_TW ru nl de fr it ja" + +for lang in $ILINGUAS; do + IUSE="${IUSE} linguas_${lang}" +done + +RDEPEND=">=virtual/ruby-1.8 + dev-ruby/ruby-bdb + timezone? ( dev-ruby/tzinfo ) + spell? ( + aspell? ( app-text/aspell ) + !aspell? ( + hunspell? ( app-text/hunspell ) + !hunspell? ( app-text/ispell ) + ) + ) + translator? ( dev-ruby/mechanize ) + shorturl? ( dev-ruby/shorturl ) + dict? ( dev-ruby/ruby-dict ) + figlet? ( app-misc/figlet ) + toilet? ( app-misc/toilet ) + fortune? ( games-misc/fortune-mod ) + cal? ( || ( sys-apps/util-linux sys-freebsd/freebsd-ubin ) ) + host? ( net-dns/bind-tools )" + +if [[ ${PV} == *"9999" ]]; then + SRC_URI="" + EGIT_REPO_URI="git://ruby-rbot.org/rbot.git" +else + MY_P="${P/_/-}" + S="${WORKDIR}/${P%_*}" + SRC_URI="http://ruby-rbot.org/download/${MY_P}-no-mo.tgz" +fi + +pkg_setup() { + enewuser rbot -1 -1 /var/lib/rbot nobody +} + +src_unpack() { + if [[ ${PV} == *"9999" ]]; then + git_src_unpack + + cd "${S}" + sed -i -e '/\$version=/s:".\+":"'${PV}'":' bin/rbot \ + || die "Unable to fix rbot script version." + else + unpack ${A} + fi +} + +src_compile() { + disable_rbot_plugin() { + mv "${S}"/data/rbot/plugins/$1.rb{,.disabled} + } + use_rbot_plugin() { + use $1 && return + disable_rbot_plugin "$2" + } + rbot_conf() { + echo "$1: $2" >> "${T}"/rbot.conf + } + use_rbot_conf_path() { + use "$1" \ + && rbot_conf "$2" "$3" \ + || rbot_conf "$2" /bin/false + } + + local spell_program="/usr/bin/ispell" + if use !spell; then + disable_rbot_plugin spell + spell_program="/bin/false" + elif use aspell; then + spell_program="/usr/bin/ispell-aspell" + elif use hunspell; then + spell_program="/usr/bin/hunspell -i" + fi + + rbot_conf spell.program "${spell_program}" + + if use !figlet && use !toilet; then + disable_rbot_plugin figlet + fi + + use_rbot_conf_path figlet figlet.path /usr/bin/figlet + use_rbot_conf_path toilet toilet.path /usr/bin/toilet + + use_rbot_plugin timezone time + use_rbot_plugin translator translator + use_rbot_plugin shorturl shortenurls + use_rbot_plugin dict dictclient + + use_rbot_plugin fortune fortune + use_rbot_conf_path fortune fortune.path /usr/bin/fortune + + use_rbot_plugin cal cal + use_rbot_conf_path cal cal.path /usr/bin/cal + + use_rbot_plugin host host + use_rbot_conf_path host host.path /usr/bin/host + + local rbot_datadir="${D}"/usr/share/rbot + + ruby_econf || die "ruby_econf failed" +} + +src_install() { + ${RUBY} setup.rb install --prefix="${D}" \ + || die "setup.rb install failed" + + diropts -o rbot -g nobody -m 0700 + keepdir /var/lib/rbot + + insinto /etc + doins "${T}"/rbot.conf + + newinitd "${FILESDIR}/rbot.init" rbot + newconfd "${FILESDIR}/rbot.conf" rbot +} + +pkg_postinst() { + einfo + elog "rbot now can be started as a normal service." + elog "Check /etc/conf.d/rbot file for more information about this feature." + einfo +} diff --git a/net-irc/rbot/rbot-9999-r10.ebuild b/net-irc/rbot/rbot-9999-r10.ebuild index ac423ca34837..413b823027f4 100644 --- a/net-irc/rbot/rbot-9999-r10.ebuild +++ b/net-irc/rbot/rbot-9999-r10.ebuild @@ -1,19 +1,19 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/rbot-9999-r10.ebuild,v 1.1 2008/06/30 16:53:24 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/rbot-9999-r10.ebuild,v 1.2 2008/07/02 14:04:55 flameeyes Exp $ inherit ruby eutils -[[ ${PV} == "9999" ]] && inherit git +[[ ${PV} == *"9999" ]] && inherit git DESCRIPTION="rbot is a ruby IRC bot" HOMEPAGE="http://ruby-rbot.org/" -LICENSE="as-is" +LICENSE="GPL-2 as-is" SLOT="0" KEYWORDS="" IUSE="spell aspell timezone translator shorturl nls dict figlet - fortune cal host nls toilet hunspell" + fortune cal host toilet hunspell" ILINGUAS="zh_CN zh_TW ru nl de fr it ja" for lang in $ILINGUAS; do @@ -38,16 +38,16 @@ RDEPEND=">=virtual/ruby-1.8 toilet? ( app-misc/toilet ) fortune? ( games-misc/fortune-mod ) cal? ( || ( sys-apps/util-linux sys-freebsd/freebsd-ubin ) ) - host? ( net-dns/bind-tools ) - nls? ( dev-ruby/ruby-gettext )" + host? ( net-dns/bind-tools )" DEPEND="nls? ( dev-ruby/ruby-gettext )" -if [[ ${PV} == "9999" ]]; then +if [[ ${PV} == *"9999" ]]; then SRC_URI="" EGIT_REPO_URI="git://ruby-rbot.org/rbot.git" else - # wait for the new releases... - SRC_URI="" + MY_P="${P/_/-}" + S="${WORKDIR}/${P%_*}" + SRC_URI="http://ruby-rbot.org/download/${MY_P}-no-mo.tgz" fi pkg_setup() { @@ -55,12 +55,15 @@ pkg_setup() { } src_unpack() { - [[ ${PV} == "9999" ]] || return 0 - git_src_unpack - - cd "${S}" - sed -i -e '/\$version=/s:".\+":"'9999'":' bin/rbot \ - || die "Unable to fix rbot script version." + if [[ ${PV} == *"9999" ]]; then + git_src_unpack + + cd "${S}" + sed -i -e '/\$version=/s:".\+":"'${PV}'":' bin/rbot \ + || die "Unable to fix rbot script version." + else + unpack ${A} + fi } src_compile() { |