You are not logged in.
So, I'm trying to make my first PKGBUILD for sinit.
Here's what I have so far:
# Maintainer: Cem Aydin (rebootl) <cem.aydin gmx.ch>
_gitname=sinit
pkgname=${_gitname}-git
pkgver=0.7.r1.g3a953ea
pkgrel=1
pkgdesc="sinit - suckless init (patched for a custom minirc)"
arch=('i686' 'x86_64')
url="http://git.2f30.org/sinit/"
license=('MIT')
depends=('')
makedepends=('git')
conflicts=('')
provides=('sinit')
source=('git://git.2f30.org/sinit'
'call-minirc-sinit.patch')
md5sums=('SKIP'
'ad798476614abd1e78f372e60fcc779e')
pkgver() {
cd "${_gitname}"
# Using most recent unannotated tag, removing prefix v
git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
prepare() {
cd "${_gitname}"
patch -uN config.def.h ../call-minirc-sinit.patch || return 1
}
build() {
cd "${_gitname}"
make
}
package() {
cd "${_gitname}"
make PREFIX=/usr DESTDIR="${pkgdir}" install
}
It works up to package() where it fails:
makepkg
==> Making package: sinit-git 0.7.r1.g3a953ea-1 (Mon Feb 24 14:53:12 CET 2014)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating sinit git repo...
Fetching origin
-> Found call-minirc-sinit.patch
==> Validating source files with md5sums...
sinit ... Skipped
call-minirc-sinit.patch ... Passed
==> Extracting sources...
-> Creating working copy of sinit git repo...
Cloning into 'sinit'...
done.
==> Starting pkgver()...
==> Starting prepare()...
patching file config.def.h
==> Removing existing pkg/ directory...
==> Starting build()...
sinit build options:
CFLAGS = -Wextra -Werror -Wall -Os
LDFLAGS = -static
CC = cc
creating config.h from config.def.h
CC util/eprintf.c
AR util.a
make bin
make[1]: Entering directory '/home/cem/Setups_hplaptop/sinit-git/src/sinit'
CC sinit.c
LD sinit
make[1]: Leaving directory '/home/cem/Setups_hplaptop/sinit-git/src/sinit'
==> Entering fakeroot environment...
==> Starting package()...
sinit build options:
CFLAGS = -Wextra -Werror -Wall -Os
LDFLAGS = -static
CC = cc
make bin
make[1]: Entering directory '/home/cem/Setups_hplaptop/sinit-git/src/sinit'
make[1]: Nothing to be done for 'bin'.
make[1]: Leaving directory '/home/cem/Setups_hplaptop/sinit-git/src/sinit'
installing executable to /home/cem/Setups_hplaptop/sinit-git/pkg/sinit-git/usr/bin
cp: cannot create regular file ‘/home/cem/Setups_hplaptop/sinit-git/pkg/sinit-git/usr/bin’: No such file or directory
Makefile:47: recipe for target 'install' failed
make: *** [install] Error 1
==> ERROR: A failure occurred in package().
Aborting...
I can see that it's missing the directory usr/bin under pkg/sinit-git/.. but I don't understand why.
I also tried to replace all the cd "${_gitname}" by cd "$srcdir/$_gitname" but I get the same error...
I can't see the difference to e.g. following reference:
https://aur.archlinux.org/packages/al/a … t/PKGBUILD
Last edited by rebootl (2014-02-24 19:01:39)
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
It's a problem with their makefiles, not with your PKGBUILD. To get around it, try adding `install -dm755 "$pkgdir/usr/bin"` to the package function before the make install.
Online
Also, report it upstream so they can fix it. They shouldn't assume that $DESTDIR/usr/bin exists, they should try to create it anyway.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Hey, thanks a lot for your replies. Ah, that explains it, didn't look at the Makefile, don't know how this works honestly...
@Scimmia: Your workaround works!
@WorMzy: I'll do so.
Regards
Personal website: reboot.li
GitHub: github.com/rebootl
Offline