Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253188 - Littre-0.1.ebuild (New Package)
Summary: Littre-0.1.ebuild (New Package)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Default Assignee for New Packages
URL: http://dictionnaire-le-littre.googlec...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-30 20:54 UTC by Philippe Pepiot
Modified: 2009-01-10 17:28 UTC (History)
1 user (show)

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


Attachments
Littre-1.0.ebuild (Littre-1.0.ebuild,477 bytes, text/plain)
2008-12-30 20:56 UTC, Philippe Pepiot
Details
littre-1.0.ebuild (littre-1.0.ebuild,538 bytes, text/plain)
2009-01-04 17:48 UTC, Philippe Pepiot
Details
New ebuild for littre (littre-1.0.ebuild,670 bytes, text/plain)
2009-01-10 17:26 UTC, Philippe Pepiot
Details
Patch for littre (littre-data-path.patch,1.09 KB, patch)
2009-01-10 17:28 UTC, Philippe Pepiot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Pepiot 2008-12-30 20:54:35 UTC
Hi,

Please find attached Littre-0.1.ebuild.

Littre is the famous French dictionary called "Le littré". He comes with a qt based interface. (Sorry but I'm not a hacker so I'll try to find dependencies later).

I suggest app-dicts/Littre.

Have a good party ! (And I'm so sorry for my English of course)
Comment 1 Philippe Pepiot 2008-12-30 20:56:00 UTC
Created attachment 176909 [details]
Littre-1.0.ebuild
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2008-12-31 12:46:37 UTC
Philippe, I suggest you to put a bit improved ebuild in user's overlay sunrise:
http://overlays.gentoo.org/proj/sunrise/wiki

Thus you'll be able to maintain and use it without waiting for maintainer to appear. But this version of ebuild could be improved:

1. ebuild name should not contain uppercase letters:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=3&chap=1#doc_chap3
2. DESCRIPTION probably can be improved. From what language to what. Or is it explanatory dictionary or what? Sorry I've learned French too many years ago to find out that by myself :)
3. If you use variable take it in {}. This is our coding standard. So, please, do ${HOMEPAGE} inside SRC_URI
4. drop DEPEND and RDEPEND if they are empty. But I'm sure empty {R,}DEPENDs is an error, since this package use some widgets to draw GUI elements...
5. src_unpack is redudant, just drop it. There exist default src_unpack which will do all the work.
6. don't do 'cd ${WORKDIR}' in src_unpack. Just define S correctly (put S=${WORKDIR} after {R,}DEPEND.
7. Is it qt3 or qt4 application? You should just inhertit correct eclass (qt3 or qt4) and use eqmake3 or eqmake4 function from there. In other case you'll have to do a lot of hack to make ebuild respect CC, CFLAGS and other things....
8. don't use make. Use emake. And don't forgive || die at the end.
9. src_install probably could use 
emake DESTDIR="${D}" install || die
after you fix 7. In any case don't use mkdir, use dodir. Or better just dobin (man 5 ebuild).
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2008-12-31 12:47:57 UTC
Comment on attachment 176909 [details]
Littre-1.0.ebuild

With all that changes required, I deprecate currently attached ebuild. It's not ready for users consumption.
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2008-12-31 12:49:35 UTC
And forgot to note: Better use app-text category since app-dicts category:
is for dictionaries and word-list packages:

" The app-dicts category contains dictionary and word-list packages."
Comment 5 Philippe Pepiot 2009-01-04 17:48:27 UTC
Created attachment 177364 [details]
littre-1.0.ebuild

New ebuild for littre
Comment 6 Philippe Pepiot 2009-01-04 17:58:10 UTC
Hy Peter.

First, thanks a lot for all yours indications, they help me to improve my Gentoo knowledge ! \o/

I commit the new ebuild upper.

There is 2 problems now :
 - The Makefile don't have a install target, so I do it manually as you can see
 - The binary file (Littre), needs 2 other binary (Littre.qm and Littre.dat) files (which contains data), and they must be in the same directory. But these 2 files are not executable directly. So I thinks they should not be in /usr/bin but /usr/share :) . I'll make a patch to fix that problem. I'm right ?

Thanks.
Phil
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2009-01-05 19:44:10 UTC
(In reply to comment #6)
> First, thanks a lot for all yours indications

You are welcome.

> There is 2 problems now :
>  - The Makefile don't have a install target, so I do it manually as you can see

yup, sometime this happens and in such cases you need to install manually with dobin and similar functions.

>  - The binary file (Littre), needs 2 other binary (Littre.qm and Littre.dat)
> files (which contains data), and they must be in the same directory. But these
> 2 files are not executable directly. So I thinks they should not be in /usr/bin
> but /usr/share :) . I'll make a patch to fix that problem. I'm right ?

Yes, it's bad idea to install binary files into /usr/{s,}bin locations. Patch is good fix and don't forgive to send patch upstream, so with next release we could drop the patch.

BTW, two comments for your ebuild:
1. you don't need || die after eqmake4 since if you look at the source eqmake4 function will die itself if something goes wrong
2. Don't use UTF-8 in description and anywhere besides comments (and even in comment it's better to avoid UTF-8. Although PMS states that ebuild is UTF-8 we have policy which covers encodings in the tree:
http://www.gentoo.org/proj/en/glep/glep-0031.html
Comment 8 Philippe Pepiot 2009-01-10 17:26:30 UTC
Created attachment 177976 [details]
New ebuild for littre

Hy,

New ebuild, fix the problem with UTF-8 description and add patch to put data into /usr/share/littre.

Enjoy :)
Comment 9 Philippe Pepiot 2009-01-10 17:28:09 UTC
Created attachment 177977 [details, diff]
Patch for littre