You are not logged in.

#1 2020-10-18 20:06:52

nicbot
Member
Registered: 2020-08-24
Posts: 10

Copying library files in PKGBUILD [SOLVED]

Hello!

While trying to copy files from a standard library to

/usr/lib

I'm running into permission problems.

# in package()

install -d "/usr/lib/${pkgname}
install -D src/Prelude/*.bru "/usr/lib/${pkgname}"

Produces:

install: cannot change permissions of ‘/usr/lib/bruski-git’: No such file or directory

My guess is this is not the standard way of installing library files. Have I misunderstood the the guidelines?

Last edited by nicbot (2020-10-18 20:46:08)

Offline

#2 2020-10-18 20:20:18

ayekat
Member
Registered: 2011-01-17
Posts: 1,409
Website

Re: Copying library files in PKGBUILD [SOLVED]

Those guidelines explain policies about where files should preferrably be installed. But makepkg doesn't care about that; it just creates packages as you tell it.

The problem you're facing is something else: See the information on $pkgdir in https://wiki.archlinux.org/index.php/Cr … #package()

Besides that, I wouldn't use $pkgname for determining the path in a filesystem like that (except maybe in /usr/share/licenses).
You're ultimately packaging some software, and things like "foobar-git" (when packaging a development version off a Git branch of a software "foobar") shouldn't result in /usr/lib/foobar-git, but (probably) just /usr/lib/foobar
(except if the upstream project is actually called this way)


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#3 2020-10-18 20:44:50

nicbot
Member
Registered: 2020-08-24
Posts: 10

Re: Copying library files in PKGBUILD [SOLVED]

Thank you for pointing me in the right direction!

And yes, using $pkgname is unnecessary.

Offline

Board footer

Powered by FluxBB