This bug should be assign to: Mikle "Zlogene" Kolyada This new ebuild improve i18n support and correct a minor bug (read next comment with attached file). Reproducible: Always
Created attachment 338400 [details] iroffer-dinoex-3.28.ebuild Diff from portage: +PLOCALE_BACKUP="en" => Mandatory with “l10n” and some used functions (otherwise some files are missing). -SRC_URI="http://iroffer.dinoex.net/${P}.tar.gz" +SRC_URI="http://iroffer.dinoex.net/${P}.tar.gz + http://iroffer.dinoex.net/HISTORY/${P}.tar.gz" => Only current version is in “http://iroffer.dinoex.net/${P}.tar.gz”. Older are in “[…]/HISTORY/[…]” # Dependency on NSS should be optional, but it causes automagic, so it is hard for now. => Comment: I work with upstream to remove this automagic. I will be on iroffer-dinoex-3.29 (I hope!). - emake CC="$(tc-getCC)" + emake CC="$(tc-getCC)" $(l10n_get_locales) => Mantory to compile other languages. Otherwise iroffer will be always in english. +myinstall() { + emake DESTDIR="${D}" install-${1} +} => New function (see below). myloc() { - use admin && dodoc help-admin-${1}.txt + dodoc help-admin-${1}.txt => This file can be used from everywhere (local access, from IRC…). Not only by HTTP admin. - emake DESTDIR="${D}" install + l10n_for_each_locale_do myinstall => Mantory to install other languages. Otherwise iroffer will be always in english. insinto /etc/${PN} - doins sample.config + for lang in $(l10n_get_locales) + do + case $lang in + "de") + doins beispiel.config;; + "fr") + doins exemple.config;; + *) + doins sample.config;; + esac + done => Iroffer provides translated conf files. We should use them instead of english. iroffer-dinoex.conf: BIN="/usr/bin/iroffer" => With this version, it can be “iroffer”, “iroffer-fr”, “iroffer-de” or “iroffer-it”. Comment have to be updated. iroffer-dinoex-config.patch: => This version install different conf files. So the patch should be for every conf files (I will add it after this comment). I have a minor question: Why did you choose to remove multi-daemon support? I used it before (not anymore… so it's alright to me too). Maybe someone can need it.
Created attachment 338402 [details] iroffer-dinoex-config.patch This is my previous version. It works for 3.28.
Created attachment 338404 [details] iroffer-dinoex-config.patch (from 3.29) There will be french translation updates in iroffer-dinoex-3.29. The previous patch will not work anymore.
Comment on attachment 338400 [details] iroffer-dinoex-3.28.ebuild --- iroffer-dinoex-3.28.ebuild 2013-02-08 12:44:38.000000000 +0100 +++ - 2013-02-12 15:34:53.593469353 +0100 @@ -5,12 +5,14 @@ EAPI=5 PLOCALES="de en fr it" +PLOCALE_BACKUP="en" inherit eutils l10n toolchain-funcs user DESCRIPTION="IRC fileserver using DCC" HOMEPAGE="http://iroffer.dinoex.net/" -SRC_URI="http://iroffer.dinoex.net/${P}.tar.gz" +SRC_URI="http://iroffer.dinoex.net/${P}.tar.gz + http://iroffer.dinoex.net/HISTORY/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" @@ -75,16 +77,20 @@ src_compile() { # TODO: default compile targets always include chrooted target, which is not good - emake CC="$(tc-getCC)" + emake CC="$(tc-getCC)" $(l10n_get_locales) +} + +myinstall() { + emake DESTDIR="${D}" install-${1} } myloc() { - use admin && dodoc help-admin-${1}.txt + dodoc help-admin-${1}.txt use http && dohtml doc/INSTALL-linux-${1}.html } src_install() { - emake DESTDIR="${D}" install + l10n_for_each_locale_do myinstall dodoc README* THANKS TODO doman iroffer.1 @@ -96,7 +102,17 @@ newconfd "${FILESDIR}/${PN}.conf" ${PN} insinto /etc/${PN} - doins sample.config + for lang in $(l10n_get_locales) + do + case $lang in + "de") + doins beispiel.config;; + "fr") + doins exemple.config;; + *) + doins sample.config;; + esac + done insinto /etc/logrotate.d newins "${FILESDIR}/${PN}.logrotate" ${PN}
Ок, your patch looks ok. I tested it, i have install iroffer-{de,fr,it} together, with various LINGUAS value. Also i have attached a patch, that fix all *.config files. @Pinkbyte, what about it?
Created attachment 339382 [details] *.config patch
+ 25 Feb 2013; Sergey Popov <pinkbyte@gentoo.org> + +iroffer-dinoex-3.28-r1.ebuild, files/iroffer-dinoex-config.patch: + Revision bump: improved config patch by Mikle Kolyada, various + locale-specific improvements by Sébastien P. wrt bug #45631 Thanks (In reply to comment #1) > I have a minor question: Why did you choose to remove multi-daemon support? > I used it before (not anymore… so it's alright to me too). Maybe someone can > need it. Current ebuild and initscript were reimplemented from scratch in some parts. Feel free to attach patch for this functionality and, if maintainer would not mind, i will add this functionality back again.