summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaliy2017-07-16 19:17:41 +0300
committerVitaliy2017-07-16 19:17:41 +0300
commit99a2b8551fc4edafdb4c7ff15a9c2c81c2d37b58 (patch)
treeb79aca8cb8e69c9772106944cf41b5259384d424
parent3e1f7bb99fd584878da0ef68c455dcd68fce50d7 (diff)
downloadaur-99a2b8551fc4edafdb4c7ff15a9c2c81c2d37b58.tar.gz
Refactoring of PKGBUILD
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore8
-rw-r--r--PKGBUILD29
3 files changed, 27 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bfd857b6479..317bfcc2537 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = h2
pkgdesc = Java SQL database engine.
pkgver = 1.4.196
- pkgrel = 1
+ pkgrel = 2
url = http://www.h2database.com
arch = any
license = MPL
@@ -9,7 +9,7 @@ pkgbase = h2
depends = java-runtime>=6
depends = bash
source = http://www.h2database.com/h2-2017-06-10.zip
- md5sums = af9c1b47ddd7f3c58aaf189e25f3b714
+ sha256sums = 1224638c19b975ba4d8f82435c3ff89526740b1123409e29ceb87c0b6f1734c2
pkgname = h2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..9c248ef3b9b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+*.bz2
+*.gz
+*.xz
+*.zip
+*~
+
+pkg
+src
diff --git a/PKGBUILD b/PKGBUILD
index d6dc874bf8e..2807718e406 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,31 +3,36 @@
pkgname=h2
pkgver=1.4.196
_releasever=2017-06-10
-pkgrel=1
+pkgrel=2
pkgdesc="Java SQL database engine."
arch=(any)
url="http://www.h2database.com"
license=(MPL EPL)
depends=('java-runtime>=6' 'bash')
source=("http://www.h2database.com/h2-${_releasever}.zip")
-md5sums=('af9c1b47ddd7f3c58aaf189e25f3b714')
+sha256sums=('1224638c19b975ba4d8f82435c3ff89526740b1123409e29ceb87c0b6f1734c2')
build() {
- msg2 "Generate executable script..."
- cat > "${srcdir}/${pkgname}-console.sh" << EOF
+ cd "$srcdir"
+
+ msg2 "Generate executable script..."
+ cat > ${pkgname}-console.sh << EOF
#!/bin/sh
-"\$JAVA_HOME/bin/java" -cp "/usr/share/java/${pkgname}/${pkgname}.jar:\$H2DRIVERS:\$CLASSPATH" org.h2.tools.Console "\$@"
+/usr/bin/java -cp "/usr/share/java/$pkgname/$pkgname.jar:\$H2DRIVERS:\$CLASSPATH" org.h2.tools.Console "\$@"
EOF
}
package() {
- msg2 "Install Java livraries in /usr/share/java/${pkgname}..."
- install -Dm755 "${srcdir}/${pkgname}/bin/${pkgname}-${pkgver}.jar" "${pkgdir}/usr/share/java/${pkgname}/${pkgname}.jar"
+ cd "$srcdir"
+
+ msg2 "Install Java livraries in /usr/share/java/${pkgname}..."
+ install -d "$pkgdir"/usr/share/java/${pkgname}
+ install -m 644 ${pkgname}/bin/${pkgname}-${pkgver}.jar "$pkgdir"/usr/share/java/${pkgname}/${pkgname}.jar
- msg2 "Install an executable at /usr/bin/${pkgname}..."
- install -Dm755 "${srcdir}/${pkgname}-console.sh" "${pkgdir}/usr/bin/${pkgname}-console"
+ msg2 "Install an executable at /usr/bin/${pkgname}..."
+ install -Dm755 ${pkgname}-console.sh "$pkgdir"/usr/bin/${pkgname}-console
- msg2 "Install documentation resources in /usr/share/doc/${pkgname}..."
- install -dm755 "${pkgdir}/usr/share/doc/${pkgname}"
- cp -a "${srcdir}"/${pkgname}/docs/* "${pkgdir}/usr/share/doc/${pkgname}"
+ msg2 "Install documentation resources in /usr/share/doc/${pkgname}..."
+ install -dm755 "$pkgdir"/usr/share/doc/${pkgname}
+ cp -a ${pkgname}/docs/* "$pkgdir"/usr/share/doc/${pkgname}
}