summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Schlisio2016-06-29 14:31:17 +0200
committerGeorg Schlisio2016-06-29 14:31:17 +0200
commit62d5b575087af617e2c1c59e7e8a5ec04e47e28e (patch)
tree94f4eeb0dae571f3fb0004ab10e8d0b8e46f60cb
parent14054df8b83fb637c6a7b3e33de97f19371a60c4 (diff)
downloadaur-62d5b575087af617e2c1c59e7e8a5ec04e47e28e.tar.gz
moved to hooks
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD21
-rw-r--r--java-jce_ustrength-install.hook11
-rw-r--r--java-jce_ustrength-uninstall.hook11
-rw-r--r--java-jce_ustrength.install22
5 files changed, 44 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index be5b70c265a..f4d7dfa3202 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = java-jce_ustrength
pkgdesc = Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8
pkgver = 8
- pkgrel = 2
+ pkgrel = 3
url = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
install = java-jce_ustrength.install
arch = any
@@ -9,8 +9,12 @@ pkgbase = java-jce_ustrength
depends = java-runtime>=8
source = http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip
source = install_java_jce_ustrength
+ source = java-jce_ustrength-install.hook
+ source = java-jce_ustrength-uninstall.hook
sha256sums = f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59
sha256sums = 3c7cc3b3aa0d748ce540ef4b679a1e01e3609144d3ca37ec9885d05d44d4c467
+ sha256sums = 0d9940a49b4c9933e7cdc2c237d6f275a898e40a7a9505df81aa474d90579ff9
+ sha256sums = d8a48f9980744ea00d5373984154137b0042276c94c4cd8465b95fb4b1fad72a
pkgname = java-jce_ustrength
diff --git a/PKGBUILD b/PKGBUILD
index 242a623ff46..cbf2e9c3990 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,25 @@
-# Maintainer: Tom Kuther <archlinux@kuther.net>
-# Maintainer: kevku <kevku@gmx.com>
+# former Maintainer: Tom Kuther <archlinux@kuther.net>
+# former Maintainer: kevku <kevku@gmx.com>
# Contributor: Cedric Sougne <cedric@sougne.name>
# Contributor: Tom < reztho at archlinux dot us >
pkgname=java-jce_ustrength
pkgver=8
-pkgrel=2
+pkgrel=3
pkgdesc="Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8"
arch=('any')
url="http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html"
license=('custom')
install=${pkgname}.install
depends=('java-runtime>=8')
-source=('http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip' 'install_java_jce_ustrength')
+source=('http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip'
+ 'install_java_jce_ustrength'
+ "${pkgname}-install.hook"
+ "${pkgname}-uninstall.hook")
DLAGENTS=('http::/usr/bin/curl -LC - -b oraclelicense=a -O')
sha256sums=('f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59'
- '3c7cc3b3aa0d748ce540ef4b679a1e01e3609144d3ca37ec9885d05d44d4c467')
+ '3c7cc3b3aa0d748ce540ef4b679a1e01e3609144d3ca37ec9885d05d44d4c467'
+ '0d9940a49b4c9933e7cdc2c237d6f275a898e40a7a9505df81aa474d90579ff9'
+ 'd8a48f9980744ea00d5373984154137b0042276c94c4cd8465b95fb4b1fad72a')
package() {
cd "$srcdir/UnlimitedJCEPolicyJDK8"
@@ -27,5 +32,9 @@ package() {
# The documentation
install -Dm644 README.txt "${pkgdir}/usr/share/doc/java-jce_ustrength/README.txt"
-}
+ # Install hooks
+ cd "$srcdir"
+ install -Dm644 ${pkgname}-install.hook "$pkgdir/usr/share/libalpm/hooks/${pkgname}-install.hook"
+ install -Dm644 ${pkgname}-uninstall.hook "$pkgdir/usr/share/libalpm/hooks/${pkgname}-uninstall.hook"
+}
diff --git a/java-jce_ustrength-install.hook b/java-jce_ustrength-install.hook
new file mode 100644
index 00000000000..2c9d1bc4bfb
--- /dev/null
+++ b/java-jce_ustrength-install.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = usr/share/java/java-jce_ustrength/*
+
+[Action]
+Description = Install java_jce-ustrength
+When = PostTransaction
+Exec = /usr/bin/install_java_jce_ustrength install
+NeedsTargets
diff --git a/java-jce_ustrength-uninstall.hook b/java-jce_ustrength-uninstall.hook
new file mode 100644
index 00000000000..5b0ccc541cc
--- /dev/null
+++ b/java-jce_ustrength-uninstall.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/java/java-jce_ustrength/*
+
+[Action]
+Description = Uninstall java_jce-ustrength
+When = PreTransaction
+Exec = /usr/bin/install_java_jce_ustrength uninstall
+NeedsTargets
diff --git a/java-jce_ustrength.install b/java-jce_ustrength.install
index bcb4727ee99..0e7cfd411fd 100644
--- a/java-jce_ustrength.install
+++ b/java-jce_ustrength.install
@@ -1,22 +1,4 @@
-post_install() {
- /usr/sbin/install_java_jce_ustrength install
- echo "===> Everytime jre is updated, you must run:"
- echo "===> /usr/bin/install_java_jce_ustrength install"
- echo "===> Otherwise, the programs which need this package will break."
-}
-
-pre_upgrade() {
- /usr/bin/install_java_jce_ustrength uninstall
-}
-
post_upgrade() {
- /usr/bin/install_java_jce_ustrength install
-}
-
-pre_remove() {
- /usr/bin/install_java_jce_ustrength uninstall
+ echo "Running the update command manually is not needed anymore,"
+ echo "since this was moved to hooks."
}
-
-op=$1
-shift
-$op $*