summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYen Chi Hsuan2014-03-07 12:00:15 +0800
committerYen Chi Hsuan2014-03-07 12:00:15 +0800
commit91ac5a0ccc9938e9018f0f8ffc2c4f12f334da41 (patch)
tree5fc047f449f3e63d2d2135c1fc1542aa970f3cd2
downloadaur-91ac5a0ccc9938e9018f0f8ffc2c4f12f334da41.tar.gz
First commit. Put 3 packages here.
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD41
-rw-r--r--spim-svn.php14
3 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2240004b5975
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = spim-svn
+ pkgdesc = A MIPS32 simulator (SVN version)
+ pkgver = 658
+ pkgrel = 1
+ url = http://sourceforge.net/projects/spimsimulator/
+ arch = i686
+ arch = x86_64
+ groups = emulators
+ license = custom:BSD
+ makedepends = subversion
+ depends = glibc
+ provides = spim
+ conflicts = spim
+ source = svn+http://svn.code.sf.net/p/spimsimulator/code/spim
+ source = svn+http://svn.code.sf.net/p/spimsimulator/code/CPU
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = spim-svn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..60f432c94d93
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+pkgname=spim-svn
+pkgver=641
+pkgrel=1
+pkgdesc="A MIPS32 simulator (SVN version)"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/spimsimulator/"
+license=('custom:BSD')
+groups=('emulators')
+depends=()
+makedepends=('bison' 'flex' 'subversion')
+conflicts=('spim')
+provides=('spim')
+
+_svntrunk='http://svn.code.sf.net/p/spimsimulator/code/'
+
+_svn_update() {
+ if [ -d $1/.svn ]; then
+ cd $1
+ svn up -r ${pkgver}
+ else
+ svn co ${_svntrunk}/$1 --config-dir ./ -r ${pkgver} $1
+ fi
+}
+
+build() {
+ cd $srcdir
+ _svn_update spim
+ _svn_update CPU
+
+ cd ${srcdir}/spim
+
+ make
+}
+
+package() {
+ install -Dm644 ${srcdir}/spim/README ${pkgdir}/usr/share/licenses/${pkgname}/README
+
+ cd ${srcdir}/spim
+ install -dDm755 ${pkgdir}/usr/bin
+ make DESTDIR=${pkgdir} install
+}
diff --git a/spim-svn.php b/spim-svn.php
new file mode 100644
index 000000000000..5b891c137371
--- /dev/null
+++ b/spim-svn.php
@@ -0,0 +1,14 @@
+<?php
+$url = 'http://sourceforge.net/p/spimsimulator/code/feed';
+$dom = new SimpleXMLElement($url, 0, true);
+$pattern = '/^http:\/\/sourceforge\.net\/p\/spimsimulator\/code\/(\d+)\/$/';
+$newestLink = $dom->channel->item[0]->link;
+if(preg_match($pattern, $newestLink, $result) === 1)
+{
+ echo 'Revision: '.$result[1]."\n";
+}
+else
+{
+ echo "Error occurred\n";
+}
+?>