Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 456316 - net-irc/iroffer-dinoex ebuild improvement
Summary: net-irc/iroffer-dinoex ebuild improvement
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Mikle Kolyada (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-02-09 14:37 UTC by Sébastien P.
Modified: 2013-02-25 18:40 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
iroffer-dinoex-3.28.ebuild (iroffer-dinoex-3.28.ebuild,2.90 KB, text/plain)
2013-02-09 14:58 UTC, Sébastien P.
Details
iroffer-dinoex-config.patch (iroffer-dinoex-config.patch,6.84 KB, text/plain)
2013-02-09 14:59 UTC, Sébastien P.
Details
iroffer-dinoex-config.patch (from 3.29) (iroffer-dinoex-config.patch,6.99 KB, text/plain)
2013-02-09 15:02 UTC, Sébastien P.
Details
*.config patch (iroffer-dinoex-config.patch,6.71 KB, text/plain)
2013-02-19 18:41 UTC, Mikle Kolyada (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien P. 2013-02-09 14:37:17 UTC
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
Comment 1 Sébastien P. 2013-02-09 14:58:35 UTC
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.
Comment 2 Sébastien P. 2013-02-09 14:59:53 UTC
Created attachment 338402 [details]
iroffer-dinoex-config.patch

This is my previous version.
It works for 3.28.
Comment 3 Sébastien P. 2013-02-09 15:02:51 UTC
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 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-12 14:35:04 UTC
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}
Comment 5 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2013-02-19 18:40:25 UTC
Ок, 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?
Comment 6 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2013-02-19 18:41:59 UTC
Created attachment 339382 [details]
*.config patch
Comment 7 Sergey Popov gentoo-dev 2013-02-25 18:40:27 UTC
+  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.