Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
digest an ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 840
Location: halmstad

PostPosted: Sun Jan 08, 2012 8:37 am    Post subject: digest an ebuild Reply with quote

hi


i can not get this ebuild to digest:

mybox hedmo # ebuild /var/lib/local/net-print/epson-inkjet-printer-201108w/epson-inkjet-printer-201108w-1.0.0-r1.ebuild digest
!!! net-print/epson-inkjet-printer-201108w-1.0.0-r1 does not follow correct package syntax.
mybox hedmo #


and the rpm is :

epson-inkjet-printer-201108w-1.0.0-1lsb3.2.src.rpm

what should i name the ebuild to make it work

thanks!!
Back to top
View user's profile Send private message
APolozov
Tux's lil' helper
Tux's lil' helper


Joined: 28 Sep 2006
Posts: 123
Location: Voronezh, Russia

PostPosted: Sun Jan 08, 2012 9:56 am    Post subject: Reply with quote

show your "cat /var/lib/local/net-print/epson-inkjet-printer-201108w/epson-inkjet-printer-201108w-1.0.0-r1.ebuild"
may be it's broken
_________________
Excuse my bad English, I only study it.

I also connected to: velo36.ru openstreetmap.org
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 840
Location: halmstad

PostPosted: Sun Jan 08, 2012 5:15 pm    Post subject: Reply with quote

cat /var/lib/local/net-print/epson-inkjet-printer-201108w/epson-inkjet-printer-201108w-1.0.0-r1.ebuild
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="4"

inherit autotools rpm

SRC_REV="1" # Revision used by upstream.
LSB_REV="3.2" # Revision of Linux Standard Base.

DESCRIPTION="Epson Inkjet Printer Driver (ESC/P-R); supports various printers."
HOMEPAGE="http://avasys.jp/eng/linux_driver/download/lsb/epson-inkjet/escp/"
SRC_URI="http://linux.avasys.jp/drivers/lsb/epson-inkjet/stable/SRPMS/${P}-${SRC_REV}lsb${LSB_REV}.src.rpm"

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

# XXX: These are the supported languages, but there is no way to enable/disable
# them in the package via configure or remove the unrequired languages
# from the PPD files.
LANGS="de en es fr it ja ko nl pt zh_CN zh_TW"
for X in ${LANGS} ; do
IUSE="${IUSE} linguas_${X}"
done

RDEPEND="net-print/cups"
DEPEND="${REPEND}
app-arch/gzip"

src_unpack() {
rpm_src_unpack
}

src_prepare() {
# Modify Linux Standard Base (LSB) paths:
sed -i -e 's:/opt/lsb/:/usr/:g' configure.ac || die
# Fix installation path for PPD files:
sed -i -e 's:\(CUPS_PPD_DIR=.*`\)$:\1/model:' configure.ac || die
# Modify installation path for PPD files:
sed -i -e 's:\(CUPS_PPD_DIR=.*/model\)$:\1/'${PN}':' configure.ac || die
eautoreconf
}

src_compile() {
emake -j1
}

src_install() {
emake DESTDIR="${D}" install

# Compress the PPD files:
for ppd in "${D}"/usr/share/cups/model/"${PN}"/*.ppd; do
gzip "${ppd}" || die
done

# Install documentation:
dodoc README AUTHORS NEWS
if use linguas_ja; then
nonfatal dodoc README.ja
fi
}

pkg_postinst() {
echo
ewarn 'You may need to manually update PPD files installed in /etc/cups/ppd'
ewarn "with a newer copy from /usr/share/cups/model/${PN}"
echo
elog 'Note that the only options that can currently be configured are ink,'
elog 'paper size, and print quality. You may find that another driver is'
elog 'more suitable if you need to be able to configure options such as'
elog 'duplexing or resolution.'
echo
}


Last edited by hedmo on Mon Jan 09, 2012 6:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
lazy_bum
l33t
l33t


Joined: 16 Feb 2005
Posts: 690

PostPosted: Sun Jan 08, 2012 10:14 pm    Post subject: Re: digest a ebuild Reply with quote

hedmo wrote:

mybox hedmo # ebuild /var/lib/local/net-print/epson-inkjet-printer-201108w/epson-inkjet-printer-201108w-1.0.0-r1.ebuild digest
!!! net-print/epson-inkjet-printer-201108w-1.0.0-r1 does not follow correct package syntax.

Seems you are hit by this:
Quote:
3.1.2 Package Names

A package name may contain any of the characters [A-Za-z0-9+_-]. It must not begin with a hyphen, and must not end in a hyphen followed by one or more digits.

The name ends with „w” (so it's not exacly „followed by one or more digits”), but i would try to remove the last part (-201108w) and adjust the name, then try again.
_________________
roslin uberlay | grubelek
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 840
Location: halmstad

PostPosted: Mon Jan 09, 2012 4:06 pm    Post subject: Reply with quote

lazy_bum wrote:

try to remove the last part (-201108w) and adjust the name, then try again.

i have been trying to fetch it with other names but i wont.that is my problem. i can not figure out how to
rename the ebuild and make it fetch the right rpm
Back to top
View user's profile Send private message
lazy_bum
l33t
l33t


Joined: 16 Feb 2005
Posts: 690

PostPosted: Mon Jan 09, 2012 6:19 pm    Post subject: Reply with quote

Can you guide me on this site? I can only see this files available for download there:
Code:
epson-inkjet-printer-escpr-1.1.1-1lsb3.2.i486.rpm
epson-inkjet-printer-escpr_1.1.1-1lsb3.2_i386.deb
epson-inkjet-printer-escpr-1.1.1-1lsb3.2.x86_64.rpm
epson-inkjet-printer-escpr_1.1.1-1lsb3.2_amd64.deb
epson-inkjet-printer-escpr-1.1.1-1lsb3.2.src.rpm
epson-inkjet-printer-escpr-1.1.1-1lsb3.2.tar.gz

_________________
roslin uberlay | grubelek
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 840
Location: halmstad

PostPosted: Tue Jan 10, 2012 6:10 pm    Post subject: Reply with quote

lazy_bum

sorry there was an r in the homepage (HOMEPAGE="http://avasys.jp/eng/linux_driver/download/lsb/epson-inkjet/escp/")

now you will see the rest of the rpm s
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 922
Location: Here and Away Again

PostPosted: Wed Jan 11, 2012 11:57 am    Post subject: Reply with quote

Where did you get this ebuild from, or did you make it yourself?

Are you actually still getting the message:

Code:
!!! net-print/epson-inkjet-printer-201108w-1.0.0-r1 does not follow correct package syntax.

It would look to me, too, that it is due to the 201108w part as pointed out by lazy_bum.
It breaks the syntax as far as I understand it (ebuilds are quite new to me still).
    http://devmanual.gentoo.org/ebuild-writing/file-format/index.html
Just changing the name of the .ebuild file wont be enough though. You will need to change the directory name as well, and more.

I tested a bit myself now, and I could fetch it, and start the build but there are more points where the old name is used and I did it all in a very dirty manner (I think) so I will not explain it step-by-step as I'm sure someone else will have a better way to do it. ^^;

I shall keep on experimenting as ebuilds is something I want to learn more of.
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3213

PostPosted: Wed Jan 11, 2012 3:04 pm    Post subject: Reply with quote

Chiitoo wrote:
Where did you get this ebuild from, or did you make it yourself?

Are you actually still getting the message:

Code:
!!! net-print/epson-inkjet-printer-201108w-1.0.0-r1 does not follow correct package syntax.

It would look to me, too, that it is due to the 201108w part as pointed out by lazy_bum.
It breaks the syntax as far as I understand it (ebuilds are quite new to me still).
I am surprised if that is the reason why the ebuild gives error on digest. There are packages in the tree which have numbers as part of their ebuild name. Example:
Code:
~> eix -c 100dpi
[N] media-fonts/font-adobe-100dpi (1.0.3): X.Org Adobe bitmap fonts
[N] media-fonts/font-adobe-utopia-100dpi (1.0.4): X.Org Adobe Utopia bitmap fonts
[N] media-fonts/font-bh-100dpi (1.0.3): X.Org Bigelow & Holmes bitmap fonts
[N] media-fonts/font-bh-lucidatypewriter-100dpi (1.0.3): X.Org Bigelow & Holmes Lucida bitmap fonts
[N] media-fonts/font-bitstream-100dpi (1.0.3): X.Org Bitstream bitmap fonts
Found 5 matches.
There might be something else inside the ebuild which is triggering this problem.

EDIT: I don't see any particular problems except that DEPEND="${REPEND} contains a typo in REPEND, which shouldn't make any difference since the typo implies it will be empty.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde4 :-/
Back to top
View user's profile Send private message
sera
Developer
Developer


Joined: 29 Feb 2008
Posts: 1012
Location: CET

PostPosted: Wed Jan 11, 2012 4:00 pm    Post subject: Reply with quote

The difference between 201108w and 100dpi is the former is a valid version spec whereas the latter is not.

See timezone-data for an example of such a version and ntfs3g as an example of how to workaround this issue.
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 840
Location: halmstad

PostPosted: Wed Jan 11, 2012 7:44 pm    Post subject: Reply with quote

Chiitoo wrote:

Where did you get this ebuild from, or did you make it yourself?


i have renamed the epson-inkjet-printer-escpr-1.0.1.ebuild from bgo-overlay.first i had to rename it to -1.1.1-r1
but it fails with :

epson-inkjet-printer-escpr/*.ppd: No such file or directory


so i made some digging and found out that this "epson-inkjet-printer-201108w-1.0.0-1lsb3.2.src.rpm" is for my sx235w printer.
i was just hoping that this ebuild could work for that to.i have not manage to get my printer to work as it chould (no text when printing).

Chiitoo wrote:

Are you actually still getting the message:


no.i can make the ebuild start when i rename it to something els (to make it fetch) but fails when it can not find the .rpm


ppurka wrote:

I am surprised if that is the reason why the ebuild gives error on digest.


that is the reason.it fails because of the name.if i rename it,it fails to fetch.i think i just need to name it right.


Example:

if i want to make a ebuild for the "gcc-4.7-20120107.tar.bz2",i have to name the ebuild "gcc-4.7.0_alpha20120107"

correct me if i am wrong.
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 922
Location: Here and Away Again

PostPosted: Thu Jan 12, 2012 1:18 pm    Post subject: Reply with quote

Yeah, as I mentioned there are more that would need to be changed because it will use the file name it fetches.
This can be changed likely, but I'm not sure how exactly.

Furthermore, after it's fetched, it will unpack the source into the 'work' folder named something else than what it's looking for (should show up when you try to emerge/test the ebuild).

In all simplicity, you could download the source manually, then enter the path to it into SRC_URI and you can name the source package to whatever you like, preferably the same as your .ebuild.
Then it will find it, and the source (RPM), but then you still have the wrong directory name inside that.

I went as far as unpacking the RPM and re-naming the folder and then re-packing it but then more issues arise. ^^;


I'm still rather certain there is a correct way of approaching this, instead of what I'm doing, though heheh...
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
sera
Developer
Developer


Joined: 29 Feb 2008
Posts: 1012
Location: CET

PostPosted: Thu Jan 12, 2012 2:14 pm    Post subject: Reply with quote

Chiitoo wrote:
I'm still rather certain there is a correct way of approaching this, instead of what I'm doing, though heheh...


You don't have to use any variables in SRC_URI, the link as-is is fine. Variables are only used for simpler maintenance.

Use S="${WORKDIR}/whatever-it-is" to define the location of the unpacked archive (top source directory).
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 922
Location: Here and Away Again

PostPosted: Thu Jan 12, 2012 3:32 pm    Post subject: Reply with quote

sera wrote:
Chiitoo wrote:
I'm still rather certain there is a correct way of approaching this, instead of what I'm doing, though heheh...


You don't have to use any variables in SRC_URI, the link as-is is fine. Variables are only used for simpler maintenance.

Use S="${WORKDIR}/whatever-it-is" to define the location of the unpacked archive (top source directory).

Knew there was a variable for that. ^^
Thanks!

I see it's at the Optional Variables section of Variables in the Gentoo Development Guide that I linked to earlier.
Shows how little I have read of it still!

Maybe I'll finally get around to reading it later today.
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Wed Feb 01, 2012 10:16 am    Post subject: Reply with quote

Any luck getting your custom ebuild to digest? I also have an SX235W and would love it if you could share whatever solution you're using.
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 840
Location: halmstad

PostPosted: Thu Feb 02, 2012 6:05 am    Post subject: Reply with quote

Fleed

No.i have been working on compiz-9999 with emerald and finaly done :D .how long have you come with yours?
I can print à half page without the driver but thats all. I am going to dig some more to day.

hedmo
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 922
Location: Here and Away Again

PostPosted: Fri Feb 03, 2012 2:57 pm    Post subject: Reply with quote

I guess I forgot about this for a bit.

Did some more testing just now and I actually got it to configure after a while, then fail, then compile, then fail again on install phase, and right now a little bit out of ideas.

It's probably something simple I just haven't 'got' yet.

Code:
gzip: /portage/net-print/epson-inkjet-printer-1.0.0/image//usr/share/cups/model/epson-inkjet-printer/*.ppd: No such file or directory
 * ERROR: net-print/epson-inkjet-printer-1.0.0 failed (install phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  85:  Called src_install
 *   environment, line 2824:  Called die
 * The specific snippet of code:
 *           gzip "${ppd}" || die;

That double // on the path looks a bit weird.
Hmmm.
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 840
Location: halmstad

PostPosted: Fri Feb 03, 2012 11:07 pm    Post subject: Reply with quote

Chiitoo wrote:

/*.ppd: No such file or directory

that is realy good :? .it is the same as the epson-inkjet-printer-escpr-1.0.1.ebuild gave me.
how did you get there? i am at:

ERROR: net-print/epson-inkjet-printer_201108w-1.0.0-r1 failed (prepare phase):

but its taking shape :D
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 922
Location: Here and Away Again

PostPosted: Fri Feb 03, 2012 11:29 pm    Post subject: Reply with quote

Basically by just rpmunpacking the source, and using what sera brought up:

Code:
S="where/ever/your/distfiles/are/distfiles/epson-inkjet-printer-1.0.0-1/epson-inkjet-printer-filter-1.0.0/"

in the ebuild but I have a bad habit of doing very messy testing so I wont type out the steps just yet as I'm not even so sure of them myself for the time being. :)

I will start from the very beginning and make notes as I can't even remember exactly what I did for everything to 'click' in place as I tried many things and it gets messy sometimes.

I didn't test anything yet after I posted the previous reply, but looking at the ebuild right now, I would guess this part is where I start to look into next time:

Code:
 # Compress the PPD files:
 for ppd in "${D}"/usr/share/cups/model/"${PN}"/*.ppd; do
 gzip "${ppd}" || die
 done

Might be completely unrelated as I know only so little of this all still, but there's my idea for now, if you want to play with it as well. ^^


Now I need to find some Zzz's!
'Til next time~
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 922
Location: Here and Away Again

PostPosted: Thu Feb 16, 2012 12:24 am    Post subject: ><)))°€ Reply with quote

Okay, did some testing again (sorry for the delay), and staring at various eclasses such as versionator and its functions and whatnots, but getting tired and a little overwhelmed by info (which often happens as I tend to try and learn too much at once I guess), so I decided to look into what sera said about ntfs3g and timezone-data there.

And I mean really look into them as I thought I did before, but seems I didn't as they provided a more simple solution, or so I think.
Before that, however, I was aiming to start from something very basic, like this:
    epson-inkjet-printer-1.0.0.ebuild
Code:
EAPI="3"

inherit autotools

SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="net-print/cups"
RDEPEND="${DEPEND}"

S=/path/to/unpacked/source/epson-inkjet-printer-1.0.0-1/epson-inkjet-printer-filter-1.0.0/

src_prepare() {
        sed -i -e 's:/opt/lsb/:/usr/:g' configure.ac || die
        eautoreconf
}

src_compile() {
        emake -j1 || die
}

So yeah, this is without the pdd part as I haven't yet figured what is wrong with those.
Does it not find them simply because of the path or what?
You need to edit the S= line with the path for where you rpmunpack it (note that it is the filter-directory).

I have no means of testing if this (or the one below) works at all, but at least the do install for me.

So I just had to delve in deeper and try to make it more like a 'proper' approach:
    epson-inkjet-printer-1.0.0_alpha_pre.ebuild
Code:
EAPI="3"

inherit autotools rpm

MY_PN="${PN}"
MY_P="${MY_PN}-201108w-1.0.0-1lsb3.2"

DESCRIPTION="Testing ebuild for epson-inkjet-printer."
HOMEPAGE="https://forums.gentoo.org/viewtopic-t-908358-highlight-.html"
SRC_URI="http://linux.avasys.jp/drivers/lsb/epson-inkjet/stable/SRPMS/${MY_P}.src.rpm"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RESTRICT="mirror"

DEPEND="net-print/cups"
RDEPEND="${DEPEND}"

S=${WORKDIR}/epson-inkjet-printer-filter-1.0.0/

src_unpack() {
        rpm_src_unpack
}

src_prepare() {
#        ewarn "–––––––––––––––––––––––––––––––––––––––––––––––––"
#        ewarn "The configure file is not set to be an executable"
#        ewarn "or not set with the rights for executing it which"
#        ewarn "causes emake to fail so as a dirty 'fix', setting"
#        ewarn "rights to 700 here."
#        ewarn "–––––––––––––––––––––––––––––––––––––––––––––––––"
#        chmod 700 ${WORKDIR}/epson-inkjet-printer-filter-1.0.0/configure
        sed -i -e 's:/opt/lsb/:/usr/:g' configure.ac || die
        eautoreconf
}

src_compile() {
        emake -j1 || die
}

As you can see, I decided to comment out the chmod command there, with its explanation, when posting this here as it really feels like a dirty way of tackling the issue which I am rather puzzled by.
Mainly because, well, it is chmod and someone might run as root, so that someone will at least consciously uncomment it before doing it!

The ewarn (yeah, I was playing with all kinds of ebuild goodies and wanted to make sure that part stands out) is rather self-explanatory I guess. I ran into the problem already before these tests (took a while to remember how I got past it before), where the build would fail with:

Code:
make -j7 -j1
make: *** No targets specified and no makefile found.  Stop.
emake failed
 * ERROR: net-print/epson-inkjet-printer-1.0.0_alpha_pre failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  85:  Called src_compile
 *   environment, line 2820:  Called die
 * The specific snippet of code:
 *       emake -j1 || die

From quite different problems I found from various forums, I gathered something that incited me to try to set the configure script file into executable and that would seemingly fix it.

What might be the cause of this and what would be the proper way of handling it as I doubt mine is. ^^;

I don't know if this is of any help to anyone but at least I learned lots myself.
Thank you, sera, for the pointers that got me towards the correct(?) direction quickly!

And I think that is it, fer now.
I hope I didn't forget too much, and I tried making sure it's easy to read this post but I'm sleepy so there may be some mistakes!


I do hope this helps~
Blubb!
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum