void-packages/srcpkgs/openbazaar/template

39 lines
1.2 KiB
Bash

# Template file for 'openbazaar'
pkgname=openbazaar
version=1.1.13
revision=1
build_style=fetch
short_desc="P2P Distributed marketplace"
maintainer="ananteris <ananteris@protonmail.ch>"
archs="i686 x86_64"
depends="nodejs"
license="MIT"
nostrip=yes
homepage="http://openbazaar.org"
repository="nonfree"
if [ "${XBPS_TARGET_MACHINE}" = "x86_64" ];then
_debarch=amd64
checksum=34118eecedd15d89052b8cc6d08fb789adba5788d43019ea5c89e52f1f07064a
else
_debarch=i386
checksum=87c73589aebdb78455e69fe1ccc058440d0ae662404e9ef7d4988e6c574e2add
fi
distfiles="https://github.com/OpenBazaar/OpenBazaar-Installer/releases/download/v${version}/${pkgname}_${version}_${_debarch}.deb"
do_install() {
ar p ${pkgname}_${version}_${_debarch}.deb data.tar.xz | bsdtar xvf - -C ${DESTDIR}
vlicense ${DESTDIR}/usr/share/openbazaar/LICENSE
vbin ${DESTDIR}/usr/share/openbazaar/resources/OpenBazaar-Server/openbazaard
vconf ${DESTDIR}/usr/share/openbazaar/resources/OpenBazaar-Server/ob.cfg
vdoc ${FILESDIR}/void_service.EXAMPLE
find ${DESTDIR}/usr/share/openbazaar -iname "*.so" -print0 | while read -d "" lib; do
dir="${lib%/*}"
dir="${dir/\/share\//\/lib\/}"
mkdir -p "${dir}"
mv -v "${lib}" "${dir}"
done
}