diff options
author | Shackra Sislock <jorgean@lavabit.com> | 2013-07-04 21:52:02 -0600 |
---|---|---|
committer | Shackra Sislock <jorgean@lavabit.com> | 2013-07-04 21:52:02 -0600 |
commit | cd298e9e8d80d387472058ff4b089f0ee509d644 (patch) | |
tree | d00e711db4fa42f10698791204a1e64ba5611f3c /java/java-json-android | |
parent | 64e1664807a6e37d4fdfc35d271028104b54c4a1 (diff) | |
parent | 91bd98130ae07e48bd945b0b87e51a117c29ad6f (diff) | |
download | abslibre-cd298e9e8d80d387472058ff4b089f0ee509d644.tar.gz abslibre-cd298e9e8d80d387472058ff4b089f0ee509d644.tar.bz2 abslibre-cd298e9e8d80d387472058ff4b089f0ee509d644.zip |
updating my branches
Diffstat (limited to 'java/java-json-android')
-rw-r--r-- | java/java-json-android/PKGBUILD | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/java/java-json-android/PKGBUILD b/java/java-json-android/PKGBUILD new file mode 100644 index 000000000..3b0a08195 --- /dev/null +++ b/java/java-json-android/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> + +pkgname=java-json-android +_pkgver=4.2.2_r1 +pkgdesc="Java org.json implementation developed as part of Android's libcore" +url="https://android.googlesource.com/platform/libcore/" +license=(Apache2) + +pkgver=${_pkgver//_/.} +provides=(java-json) +conflicts=(java-json) + +pkgrel=1 +arch=(any) + +depends=(java-runtime) +makedepends=(java-environment junit) + +source=("libre://android-libcore-$_pkgver.tar.gz") +md5sums=('367769bb9d7fe571ff4e1e82b99e99ed') + +mkdepends=(git) +mksource=("android-libcore-$_pkgver::git+https://android.googlesource.com/platform/libcore/#tag=android-${_pkgver}") +mkmd5sums=('SKIP') + +build() { + cd "$srcdir"/android-libcore-$_pkgver + sed 11q < NOTICE > json/NOTICE + cd json/src/main/java + javac org/json/*.java + jar cf json.jar org/json/*.class +} + +check() { + cd "$srcdir"/android-libcore-$_pkgver/json/src/test/java + + # disable test for known bug: + sed -i 's/test64BitHexValues()/x&/' org/json/ParsingTest.java + + local cp="/usr/share/java/junit.jar:../../main/java/json.jar" + javac -cp "$cp" org/json/*.java + printf '%s\n' org/json/*.java | sed 's|/|.|g;s|\.java$||' > tests.txt + java -cp "$cp:." org.junit.runner.JUnitCore $(cat tests.txt) +} + +package() { + cd "$srcdir"/android-libcore-$_pkgver/json + install -Dm644 NOTICE "pkgdir"/usr/share/licenses/$pkgname + install -Dm644 src/main/java/json.jar "pkgdir"/usr/share/java/json.jar +} |