[aur-general] Request for assistance with a PKGBUILD

Calimero calimeroteknik at free.fr
Wed May 11 17:58:54 EDT 2011


Le 11/05/2011 23:30, Joel Heaton a écrit :
> Hello fellow AUR maintainers, I've come to ask for some of your wisdom
> on a particular subject because, quite frankly, I'm completely unsure
> of how to move forward. I'm attempting to put together a PKGBUILD for
> a library (tsdl) but running in to trouble with the installation part.
> I can run make no problem, everything proceeds as expected, however I
> receive a permission error when running make install. The output is
> shown below at the point which it fails.
>
> http://pastebin.com/0xVvf1kN
>
> Obviously this is going to fail unless makepkg -s is run as root,
> which is highlighted as not being a good idea, so I'm basically
> looking at how I could get around this, if at all. I'll admit that I'm
> still getting to grips with this, having only put together two
> PKGBUILDs from scratch before now, so I would appreciate any pointers
> that could guide me in the right direction. Below are links to the
> PKGBUILD I'm working on, as well as the Makefile for the library I
> want to build respectively. I can see that there are a bunch of
> operations going on in there which will result in more permission
> denied errors, but if I'm thinking along the right lines, then these
> could be installed using install -D -mXXX but again, I'm quite
> inexperienced so I don't know if that is entirely true.
>
> http://pastebin.com/xzVRt79d
> http://pastebin.com/sTN1j80f
>
> Please also feel free to criticise the PKGBUILD in general; I've been
> following what I've seen by other maintainers so far and trying to
> stick to the guidelines laid out in the Wiki pages, so hopefully it's
> all fine but if I have missed anything or done something stupid, I'd
> like to know.
>
> Thanks in advance for any help.
>
> Kind regards,
>
> Joel.

It looks like the Makefile wasn't intended for packaging.
But it's still possible to do things properly without changing it:

package() {
  cd "$srcdir/$pkgname"
  mkdir -p "$pkgdir/usr/lib"
  make PREFIX="$pkgdir/usr" BIN_DIR="$srcdir" install
}

Yet this is quite tricky, so I recommend to the author some changes to
his Makefile.

-- Calimero


More information about the aur-general mailing list