summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Teibes2018-02-23 00:50:22 +0100
committerCarsten Teibes2018-02-23 00:50:22 +0100
commit21bab4132cf1fa13041d67c849bf7399067ae7c8 (patch)
tree4a9eb06a9a7b2e649adf6846d48eeda0ba790443
downloadaur-21bab4132cf1fa13041d67c849bf7399067ae7c8.tar.gz
[new] libnx-git
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD45
2 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9a52c6aaa2b0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = libnx-git
+ pkgdesc = Library for Nintendo Switch (NX) homebrew development (development version)
+ pkgver = 1.0.0.r15.gff8a95b
+ pkgrel = 1
+ url = http://devkitpro.org
+ arch = any
+ license = custom: ISC
+ depends = devkita64
+ provides = libnx
+ conflicts = libnx
+ options = !strip
+ options = staticlibs
+ source = git+https://github.com/switchbrew/libnx.git
+ source = git+https://github.com/switchbrew/switch-examples.git
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = libnx-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..65c6e0fb99f1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
+
+pkgname=libnx-git
+pkgver=1.0.0.r15.gff8a95b
+pkgrel=1
+pkgdesc="Library for Nintendo Switch (NX) homebrew development (development version)"
+arch=('any')
+url="http://devkitpro.org"
+license=('custom: ISC')
+depends=('devkita64')
+conflicts=('libnx')
+provides=('libnx')
+source=("git+https://github.com/switchbrew/libnx.git"
+ "git+https://github.com/switchbrew/switch-examples.git")
+md5sums=('SKIP'
+ 'SKIP')
+options=(!strip staticlibs)
+
+pkgver() {
+ cd libnx
+ git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./g'
+}
+
+build() {
+ # set environment
+ source /etc/profile.d/devkita64.sh
+
+ make -C libnx
+}
+
+package() {
+ make -C libnx/nx dist-bin
+ DEVKITPRO="$pkgdir/opt/devkitpro"
+ install -d "$DEVKITPRO"/libnx
+ bsdtar xf libnx/nx/libnx-*.tar.bz2 -C "$DEVKITPRO"/libnx
+ # examples
+ install -d "$DEVKITPRO"/examples
+ cp -rup switch-examples "$DEVKITPRO"/examples/switch
+ rm -rf "$DEVKITPRO"/examples/switch/.git
+ # fix permissions
+ chown -R root:root "$DEVKITPRO"/examples
+ find "$DEVKITPRO"/examples -type d -exec chmod +rx "{}" \+
+ # license
+ install -Dm644 libnx/LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}