summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Nicholi2020-11-06 03:53:22 -0500
committerAlexander Nicholi2020-11-06 03:53:22 -0500
commit455b0ac06628e39617b79f10f5d50ebd90733d36 (patch)
tree36314380995c5503225e4ae1553b00deebdc3402
parent6b3f7a1feeb2b4158b5cd8d297245eb16f0a985f (diff)
downloadaur-455b0ac06628e39617b79f10f5d50ebd90733d36.tar.gz
update PKGBUILD for macOS
-rw-r--r--PKGBUILD37
1 files changed, 24 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 32e39b676be..80c8b01e0d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,20 +18,31 @@ sha1sums=('2f95b63cd63161bcfb11bd5e238978ad4ff02c09')
_subprojects='arr chkmath decl endian err futils himem log str'
build() {
- cd "$srcdir/$pkgname-${_symver}-$pkgver"
- for _subproj in ${_subprojects}; do
- cd "${_subproj}"
- make -j$(($(nproc) * 2))
- cd ..
- done
+ cd "$srcdir/$pkgname-${_symver}-$pkgver"
+ if [ "$(uname -s)" = 'Darwin' ]; then
+ _make=gmake
+ else
+ _make=make
+ fi
+ for _subproj in ${_subprojects}; do
+ cd "${_subproj}"
+ ${_make} -j$(($(nproc) * 2))
+ cd ..
+ done
}
package() {
- cd "$srcdir/$pkgname-${_symver}-$pkgver"
-
- for _subproj in ${_subprojects}; do
- cd "${_subproj}"
- make install PREFIX="${pkgdir}/usr"
- cd ..
- done
+ cd "$srcdir/$pkgname-${_symver}-$pkgver"
+ if [ "$(uname -s)" = 'Darwin' ]; then
+ _make=gmake
+ _prefix="${pkgdir}/usr/local"
+ else
+ _make=make
+ _prefix="${pkgdir}/usr"
+ fi
+ for _subproj in ${_subprojects}; do
+ cd "${_subproj}"
+ ${_make} install PREFIX="${_prefix}"
+ cd ..
+ done
}