summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authoryjun2021-02-28 12:47:55 +0800
committeryjun2021-02-28 12:47:55 +0800
commit96c49d59584aa8852c47f2e7fb74e39d31af4577 (patch)
treea453ba0a72f98f3c5ac759e259034a0516ee62c5 /PKGBUILD
parente0cd77e5a2d15186113cb6108c706dcbf198ffcf (diff)
downloadaur-96c49d59584aa8852c47f2e7fb74e39d31af4577.tar.gz
pkgbuild: fixed compile error with -static
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD10
1 files changed, 9 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c822623525b9..abf37b61657e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=micronucleus-git
_gitname=micronucleus
pkgver=2.04.r6.g4d2481d
-pkgrel=1
+pkgrel=2
pkgdesc="ATTiny usb bootloader with a strong emphasis on bootloader compactness"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/micronucleus/micronucleus"
@@ -22,6 +22,14 @@ pkgver() {
git describe --tags | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
+prepare() {
+ # Upstream set static compilation in Makefile, libusb.a is required for it.
+ # [Static binaries for MacOS and linux @stonehippo](https://github.com/micronucleus/micronucleus/commit/44a7664bd4c86b86596fe13bcdae7428fe1c4907)
+ # but Arch Linux libusb-compat package doesn't provide static library, so revert to origion
+ # https://github.com/archlinux/svntogit-packages/blob/ddec4746eea5ff836dddc80b8564e3e2677f3520/libusb-compat/trunk/PKGBUILD
+ sed -i 's# -static##g' ${srcdir}/${_gitname}/commandline/Makefile
+}
+
build() {
cd "$_gitname/commandline"