jobcore/libusb/PKGBUILD

64 lines
1.5 KiB
Bash
Raw Normal View History

2022-03-20 13:19:37 +01:00
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=libusb
2022-04-16 13:41:56 +02:00
pkgver=1.0.26
2022-07-28 16:57:46 +02:00
_pkgver=1.0.26.r18.gff8fe939
pkgrel=02
pkgdesc="A cross-platform library to access USB devices w/o systemd - git version"
2022-03-20 13:19:37 +01:00
arch=(x86_64)
url="https://libusb.info/"
2022-07-28 16:57:46 +02:00
depends=(glibc 'libudev.so')
makedepends=(git automake autoconf)
provides=("libusb=$_pkgver" 'libusb-1.0.so')
conflicts=(libusb-git)
#options=(staticlibs debug) ## uncomment this line to have the debug pkg produced
options=(staticlibs)
source=("git+https://github.com/$pkgname/$pkgname.git")
2022-03-20 13:19:37 +01:00
prepare() {
2022-07-28 16:57:46 +02:00
cd $pkgname
2022-03-20 13:19:37 +01:00
autoreconf -fiv
}
2022-07-28 16:57:46 +02:00
_pkgver() {
cd "$pkgname"
_tag=$(git tag -l --sort -v:refname | sed '/rc[0-9]*/d' | head -n1)
_rev=$(git rev-list --count $_tag..HEAD)
_hash=$(git rev-parse --short HEAD)
printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
}
2022-03-20 13:19:37 +01:00
build() {
2022-07-28 16:57:46 +02:00
cd "$pkgname"
./bootstrap.sh
./configure \
--prefix="/usr"
2022-03-20 13:19:37 +01:00
make
}
check() {
2022-07-28 16:57:46 +02:00
make -k check -C $pkgname
2022-03-20 13:19:37 +01:00
}
2022-07-28 16:57:46 +02:00
package() {
2022-03-20 13:19:37 +01:00
depends+=(libudev.so)
2022-07-28 16:57:46 +02:00
cd "$pkgname"
make DESTDIR="$pkgdir" install -C $pkgname
install -vDm 644 $srcdir/$pkgname/{AUTHORS,ChangeLog,README} -t "$pkgdir/usr/share/doc/$pkgname/"
2022-03-20 13:19:37 +01:00
}
#---- license gpg-key sha256sums ----
2022-07-28 16:57:46 +02:00
license=(LGPL2.1)
2022-03-20 13:19:37 +01:00
2022-07-28 16:57:46 +02:00
sha256sums=(SKIP)