Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help getting ebuild to work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Daiajo
n00b
n00b


Joined: 28 Feb 2025
Posts: 3
Location: Sydney Australia

PostPosted: Fri Feb 28, 2025 5:33 am    Post subject: Help getting ebuild to work Reply with quote

I've created a tiny library package to test out Github and writting the ebuild.
I've got to the point where it will download, unpack, then crash in prepare:
Code:

 * ERROR: dev-libs/libSLL-0.0.3::daiajo failed (prepare phase):
 *   The source directory '/var/tmp/portage/dev-libs/libSLL-0.0.3/work/libSLL-0.0.3' doesn't exist

I copied the ebuild from another library which uses libtool & called libtoolize. I've taken that out.
Code:

EAPI=8

#inherit libtool

DESCRIPTION="Single Linked List for C"
HOMEPAGE="https://github.com/Daiajo/SLL"
SRC_URI="https://github.com/Daiajo/SLL/releases/download/v${PV}/${P}.tar.gz"
# https://github.com/Daiajo/SLL/releases/download/v0.0.3/libSLL-0.0.3.tar.gz
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 ~x32"

#src_prepare() {
#   elibtoolize
#}

src_install() {
    default
}

The package has a single C source, a single H include, and a Makefile.
The makefile makes libSLL*.la libSLL*.so which I assume portage will know what to do with.

Do I need a "make install" function to move the header to /usr/include and the .so, .la to /usr/lib?
Surely the ebuild would be very simple for such a tiny simple package, I just can't figure out what I'm doing wrong.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31507
Location: here

PostPosted: Fri Feb 28, 2025 6:14 am    Post subject: Reply with quote

By default ebuild set S (source path) variable to ${WORKDIR}/${P}, in your case the ${P} folder does not exist so you should overwrite S to only ${WORKDIR}.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Daiajo
n00b
n00b


Joined: 28 Feb 2025
Posts: 3
Location: Sydney Australia

PostPosted: Fri Feb 28, 2025 7:58 am    Post subject: Reply with quote

fedeliallalinea wrote:
By default ebuild set S (source path) variable to ${WORKDIR}/${P}, in your case the ${P} folder does not exist so you should overwrite S to only ${WORKDIR}.


Thanks, that got past the build phase.
Now it's failing on install, so it looks like I need an install target in the makefile.
I'm not clear, do I just "mv {my file}.h /usr/include" to get it into the local image folder?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31507
Location: here

PostPosted: Fri Feb 28, 2025 8:59 am    Post subject: Reply with quote

If you don't want to create a target install in the Makefile you can use the install functions that portage provides.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Daiajo
n00b
n00b


Joined: 28 Feb 2025
Posts: 3
Location: Sydney Australia

PostPosted: Sat Mar 01, 2025 3:50 am    Post subject: Reply with quote

fedeliallalinea wrote:
If you don't want to create a target install in the Makefile you can use the install functions that portage provides.

Thanks, that information is exactly what I needed.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 2036

PostPosted: Sat Mar 01, 2025 1:58 pm    Post subject: Reply with quote

Daiajo wrote:
Do I need a "make install" function to move the header to /usr/include and the .so, .la to /usr/lib?

Do not install a .la file when only installing .so files. The .la is meant to pair with a .a file.

Some build tools will be confused by this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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