diff options
author | Alexander Nicholi | 2020-10-15 03:50:04 -0400 |
---|---|---|
committer | Alexander Nicholi | 2020-10-15 03:50:04 -0400 |
commit | d367036241a299eac6cf42ff02765df19ef0f618 (patch) | |
tree | 3e19ece0d404ca37743dd752ee1ddff36879c9b5 | |
download | aur-d367036241a299eac6cf42ff02765df19ef0f618.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1802eeb2c360 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = mingw-w64-gbalzss + pkgdesc = Compresses data for the GBA LZSS algorithm. + pkgver = 1.2.0 + pkgrel = 1 + url = https://github.com/devkitPro/gba-tools + arch = any + license = GPL-2.0 + makedepends = mingw-w64-gcc + depends = mingw-w64-crt + provides = mingw-w64-gbalzss + conflicts = mingw-w64-gbalzss + options = !libtool + options = !buildflags + source = https://github.com/devkitPro/gba-tools/releases/download/v1.2.0/gba-tools-1.2.0.tar.bz2 + sha1sums = aad9a673b4578ad8617a5e8397266ee9028a0d42 + +pkgname = mingw-w64-gbalzss + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..43818ed41f6b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Alexander Nicholi <me@nicholatian.com> + +pkgname=mingw-w64-gbalzss +pkgver=1.2.0 +pkgrel=1 +pkgdesc='Compresses data for the GBA LZSS algorithm.' +arch=(any) +url='https://github.com/devkitPro/gba-tools' +license=('GPL-2.0') +makedepends=(mingw-w64-gcc) +depends=(mingw-w64-crt) +options=(!libtool !buildflags) +provides=("$pkgname") +conflicts=("$pkgname") +source=('https://github.com/devkitPro/gba-tools/releases/download/v1.2.0/gba-tools-1.2.0.tar.bz2') +sha1sums=('aad9a673b4578ad8617a5e8397266ee9028a0d42') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +build() { + for _arch in ${_architectures}; do + unset LDFLAGS + mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" + cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" + ${srcdir}/gba-tools-${pkgver}/configure \ + --prefix=/usr/${_arch} \ + --build=$CHOST \ + --host=${_arch} + make -j$(($(nproc) * 2)) + done +} + +package() { + for _arch in ${_architectures}; do + cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" + make DESTDIR="$pkgdir" install + find "$pkgdir/usr/${_arch}" -name '*.exe' -o -name '*.bat' -o -name '*.def' -o -name '*.exp' -o -name '*.py' | xargs -rtl1 rm + find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip --strip-unneeded + find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g + done +} |