I'm writing a PKGBUILD for meetalva.io so I can submit it to AUR—so others can install it through yaourt
.
The binary Alva
has two library dependencies, libnode.so
and libffmpeg.so
, which I need to include otherwise I get alva: error while loading shared libraries: libnode.so: cannot open shared object file: No such file or directory
.
I can't simply copy these two .so
files into /usr/bin
, so what's the best practice here? I feel like I want to copy the binary and .so
files into /usr/lib
then create a symlink /usr/lib/alva-git/Alva
-> /usr/bin/Alva
but I'm not managing to get the symlinking working.
Thanks in advance.
PKGBUILD
:
_pkgname="alva"
pkgname="${_pkgname}-git"
pkgver=v0.8.0
pkgrel=1
pkgdesc="Create living prototypes with code components."
arch=("i686" "x86_64")
url="https://meetalva.io"
license=('MIT')
groups=()
depends=(gconf libxss nss gtk3)
makedepends=(git npm nodejs)
optdepends=()
provides=(alva)
conflicts=(alva)
replaces=()
backup=()
options=()
install=
changelog=
source=("${pkgname}::git+http://github.com/meetalva/${_pkgname}.git")
noextract=()
md5sums=(SKIP)
# https://wiki.archlinux.org/index.php/VCS_package_guidelines
pkgver() {
cd "$srcdir/$pkgname"
# Use latest tag
git tags|tail -n 1
}
build() {
cd "$pkgname"
last_tag=$( git tags|tail -n 1 )
git checkout $last_tag
npm install
npm run build
npm run build:electron || true
}
package() {
cd "$pkgname" # enter git repo
install -D -m 644 LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
mkdir -p "${pkgdir}/usr/bin/"
cp -f dist/linux-unpacked/Alva "${pkgdir}/usr/bin/alva"
}