summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO35
-rw-r--r--PKGBUILD69
-rw-r--r--libdragon.install10
-rw-r--r--noconvtool.diff24
4 files changed, 138 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c991b991452
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,35 @@
+pkgbase = libdragon-git
+ pkgver = r105.c30a5d6
+ pkgrel = 1
+ url = http://www.dragonminded.com/n64dev/libdragon
+ arch = i686
+ arch = x86_64
+ license = custom:UNLICENSE
+ makedepends = git
+ makedepends = mips64-elf-gcc-stage1
+ depends = libpng
+ depends = mips64-elf-newlib
+ source = git://github.com/DragonMinded/libdragon.git
+ source = noconvtool.diff
+ sha256sums = SKIP
+ sha256sums = ec37b8d10ee3911979092916a6b9361e62b13a3a3cfb1736281d6baf304bfc95
+
+pkgname = libdragon-git
+ pkgdesc = Open source library for Nintendo 64 development
+ arch = any
+ depends = mips64-elf-newlib
+ provides = libdragon
+ conflicts = libdragon
+ options = !buildflags
+ options = !strip
+ options = !emptydirs
+
+pkgname = libdragon-tools-git
+ pkgdesc = Open source tools for Nintendo 64 development
+ arch = i686
+ arch = x86_64
+ depends = libpng
+ provides = libdragon-tools
+ conflicts = libdragon-tools
+ options =
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..46b322b87f9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,69 @@
+#Maintainer: Simon Eriksson <simon.eriksson.1187+aur AT gmail.com>
+
+pkgname=('libdragon-git' 'libdragon-tools-git')
+pkgver=r105.c30a5d6
+pkgrel=1
+url="http://www.dragonminded.com/n64dev/libdragon"
+arch=('i686' 'x86_64')
+license=('custom:UNLICENSE')
+makedepends=('git' 'mips64-elf-gcc-stage1')
+depends=('libpng' 'mips64-elf-newlib')
+source=("git://github.com/DragonMinded/libdragon.git" "noconvtool.diff")
+sha256sums=('SKIP' 'ec37b8d10ee3911979092916a6b9361e62b13a3a3cfb1736281d6baf304bfc95')
+
+pkgver() {
+ cd libdragon
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare(){
+ cd libdragon
+ patch -p1 < "${srcdir}/noconvtool.diff"
+}
+
+build(){
+ cd libdragon
+ N64_INST=/usr make
+ N64_INST=/usr make tools
+}
+
+package_libdragon-git(){
+ pkgdesc="Open source library for Nintendo 64 development"
+ options=('!buildflags' '!strip' '!emptydirs')
+ provides=('libdragon')
+ conflicts=('libdragon')
+ arch=('any')
+ depends=('mips64-elf-newlib')
+ install=('libdragon.install')
+
+ cd libdragon
+
+ mkdir -p "${pkgdir}/etc/profile.d/"
+ echo 'export N64_INST=/usr' > "${pkgdir}/etc/profile.d/libdragon.sh"
+ chmod 755 "${pkgdir}/etc/profile.d/libdragon.sh"
+
+ mkdir -p "${pkgdir}/usr/mips64-elf/"{include,lib}
+ make INSTALLDIR="${pkgdir}/usr" install
+
+ # strip it manually
+ find "${pkgdir}/usr/mips64-elf/lib" -type f -exec /usr/bin/mips64-elf-strip --strip-unneeded {} \; 2>/dev/null || true
+
+ #install license
+ install -D -m644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_libdragon-tools-git() {
+ pkgdesc="Open source tools for Nintendo 64 development"
+ options=()
+ provides=('libdragon-tools')
+ conflicts=('libdragon-tools')
+ arch=('i686' 'x86_64')
+ depends=('libpng')
+
+ cd libdragon
+ mkdir -p "${pkgdir}/usr/bin"
+ make -j1 INSTALLDIR="${pkgdir}/usr" tools-install
+
+ #install license
+ install -D -m644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/libdragon.install b/libdragon.install
new file mode 100644
index 00000000000..7ce9155bb28
--- /dev/null
+++ b/libdragon.install
@@ -0,0 +1,10 @@
+post_install() {
+ echo "------------------------------------------------------------------------------------"
+ echo "* Please issue the following command to setup the N64_INST environment variable:"
+ echo " source /etc/profile.d/libdragon.sh"
+ echo "------------------------------------------------------------------------------------"
+}
+
+post_upgrade() {
+ post_install $1
+}
diff --git a/noconvtool.diff b/noconvtool.diff
new file mode 100644
index 00000000000..e048eb912bb
--- /dev/null
+++ b/noconvtool.diff
@@ -0,0 +1,24 @@
+diff --git a/tools/mksprite/Makefile b/tools/mksprite/Makefile
+index ab3cb88..f8e80ec 100644
+--- a/tools/mksprite/Makefile
++++ b/tools/mksprite/Makefile
+@@ -1,17 +1,14 @@
+ INSTALLDIR = $(N64_INST)
+ CFLAGS = -std=gnu99 -O2 -Wall -Werror -I../../include -lpng
+
+-all: mksprite convtool
++all: mksprite
+
+ mksprite: mksprite.c
+-convtool: convtool.c
+
+-install: mksprite convtool
++install: mksprite
+ install -m 0755 mksprite $(INSTALLDIR)/bin
+- install -m 0755 convtool $(INSTALLDIR)/bin
+
+ .PHONY: clean install
+
+ clean:
+ rm -rf mksprite
+- rm -rf convtool