diff options
author | Lev Lybin | 2015-06-17 10:00:29 +0700 |
---|---|---|
committer | Lev Lybin | 2015-06-17 10:00:29 +0700 |
commit | a0cc27d9889b4787b008b46ae515ad4067ca3a9b (patch) | |
tree | 80200adc06fa78d548b72f7925cada477173bb42 | |
parent | 420797cd872befdd15c9af8dad88c66ac7d68e0c (diff) | |
download | aur-a0cc27d9889b4787b008b46ae515ad4067ca3a9b.tar.gz |
Muflone's patch:
- some fixes for i686 and some enhancements
- ask for user permissions from the application menu using PolKit
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | ocztoolbox.desktop | 4 | ||||
-rwxr-xr-x | ocztoolbox_polkit | 6 | ||||
-rw-r--r-- | org.archlinux.pkexec.ocztoolbox.policy | 20 |
5 files changed, 66 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = ocztoolbox pkgdesc = The OCZ Toolbox is designed to update firmware and BIOS, secure erase, view SMART attributes, and view drive details of your OCZ SSD with the click of a button. pkgver = 4.9.0.634 - pkgrel = 1 + pkgrel = 2 url = http://ocz.com/consumer/download/firmware arch = i686 arch = x86_64 @@ -9,14 +9,22 @@ pkgbase = ocztoolbox depends = libxrender depends = fontconfig depends = libxext + optdepends = polkit: to run OCZToolbox directly from menu source = http://ocz.com/consumer/download/firmware/OCZToolbox_v4.9.0.634_linux.tar.gz source = ocztoolbox.desktop source = ocztoolbox.png source = LICENSE + source = ocztoolbox_polkit + source = org.archlinux.pkexec.ocztoolbox.policy + source = http://ocz.com/consumer/download/firmware/OCZ_Toolbox_User_Guide_v4.9.0.pdf sha256sums = 7ef447dd08706d3065c522787f287e702b29ff9f9de4e07baf5ac0f456b9a140 - sha256sums = ee33736dd89666e79be14c04fd6ed16c3dd1c4c8550b032a5e737eef7c45cfe4 + sha256sums = ce08e0c547b7fea09276d204a64ff83a3dee61ce1efded1384167c15d6a53ff0 sha256sums = a5bab72e67578ceabf29e081063b00b1e1c3c2b9419fcbf888f3c24e65cf1035 sha256sums = 499875ee918c6163fefcb1056e2c179945f923a59c8093530bd12f7088a6c8a8 + sha256sums = 1b12abcd995037834b2777e6acc6b598ca571379e4d2f443b59f4d4f8a9ba45b + sha256sums = 28ee6a363cfdb1128673cc954a7e84d4a96223f869efb8608fd45e964d61f36f + sha256sums = 2552c53b3b21ad2e44be532a5d19e03c0b6c3c43a9353c33e76d13e6398fbb9a + depends_i686 = libsm pkgname = ocztoolbox @@ -1,22 +1,31 @@ # Maintainer: Lev Lybin <lev.lybin@gmail.com> +# Contributor: Muflone http://www.muflone.com/contacts/english/ # Contributor: ajs124 < ajs ÄT online DÖT de > pkgname=ocztoolbox pkgver=4.9.0.634 -pkgrel=1 +pkgrel=2 pkgdesc="The OCZ Toolbox is designed to update firmware and BIOS, secure erase, view SMART attributes, and view drive details of your OCZ SSD with the click of a button." arch=('i686' 'x86_64') url="http://ocz.com/consumer/download/firmware" license=('custom:OCZ EULA') depends=('libxrender' 'fontconfig' 'libxext') -source=(http://ocz.com/consumer/download/firmware/OCZToolbox_v${pkgver}_linux.tar.gz - ocztoolbox.desktop - ocztoolbox.png - LICENSE) +depends_i686=('libsm') +optdepends=('polkit: to run OCZToolbox directly from menu') +source=("http://ocz.com/consumer/download/firmware/OCZToolbox_v${pkgver}_linux.tar.gz" + "${pkgname}.desktop" + "${pkgname}.png" + "LICENSE" + "${pkgname}_polkit" + "org.archlinux.pkexec.${pkgname}.policy" + "http://ocz.com/consumer/download/firmware/OCZ_Toolbox_User_Guide_v${pkgver%.*}.pdf") sha256sums=('7ef447dd08706d3065c522787f287e702b29ff9f9de4e07baf5ac0f456b9a140' - 'ee33736dd89666e79be14c04fd6ed16c3dd1c4c8550b032a5e737eef7c45cfe4' - 'a5bab72e67578ceabf29e081063b00b1e1c3c2b9419fcbf888f3c24e65cf1035' - '499875ee918c6163fefcb1056e2c179945f923a59c8093530bd12f7088a6c8a8') + 'ce08e0c547b7fea09276d204a64ff83a3dee61ce1efded1384167c15d6a53ff0' + 'a5bab72e67578ceabf29e081063b00b1e1c3c2b9419fcbf888f3c24e65cf1035' + '499875ee918c6163fefcb1056e2c179945f923a59c8093530bd12f7088a6c8a8' + '1b12abcd995037834b2777e6acc6b598ca571379e4d2f443b59f4d4f8a9ba45b' + '28ee6a363cfdb1128673cc954a7e84d4a96223f869efb8608fd45e964d61f36f' + '2552c53b3b21ad2e44be532a5d19e03c0b6c3c43a9353c33e76d13e6398fbb9a') package() { if [ "$CARCH" = "x86_64" ]; then @@ -25,8 +34,16 @@ package() { _source_arch="32" fi - install -Dm755 "OCZToolbox_v${pkgver}_linux/linux${_source_arch}/OCZToolbox" "${pkgdir}/usr/bin/ocztoolbox" - install -Dm644 ocztoolbox.desktop "${pkgdir}/usr/share/applications/ocztoolbox.desktop" - install -Dm644 ocztoolbox.png "${pkgdir}/usr/share/pixmaps/ocztoolbox.png" + install -Dm755 "OCZToolbox_v${pkgver}_linux/linux${_source_arch}/OCZToolbox" "${pkgdir}/usr/bin/${pkgname}" + install -Dm644 ${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop" + install -Dm644 ${pkgname}.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + # Install policy file + install -m 755 -d "${pkgdir}/usr/share/polkit-1/actions" + install -m 644 -t "${pkgdir}/usr/share/polkit-1/actions" "org.archlinux.pkexec.${pkgname}.policy" + # Install launcher script + install -m 755 -t "${pkgdir}/usr/bin" "${pkgname}_polkit" + # Install user guide + install -m 755 -d "${pkgdir}/usr/share/doc/${pkgname}" + install -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" "OCZ_Toolbox_User_Guide_v${pkgver%.*}.pdf" } diff --git a/ocztoolbox.desktop b/ocztoolbox.desktop index c06592c39361..0b8fdafcf045 100644 --- a/ocztoolbox.desktop +++ b/ocztoolbox.desktop @@ -1,8 +1,8 @@ [Desktop Entry] Name=OCZ ToolBox -GenericName=OCZ ToolBox +GenericName=OCZ Toolbox Comment=The OCZ Toolbox is designed to update firmware and BIOS, secure erase, view SMART attributes, and view drive details of your OCZ SSD with the click of a button. -Exec=ocztoolbox +Exec=ocztoolbox_polkit Icon=ocztoolbox Terminal=false Type=Application diff --git a/ocztoolbox_polkit b/ocztoolbox_polkit new file mode 100755 index 000000000000..ecbb628032ae --- /dev/null +++ b/ocztoolbox_polkit @@ -0,0 +1,6 @@ +#!/bin/bash +if [ $(which pkexec) ]; then + pkexec --disable-internal-agent "/usr/bin/ocztoolbox" "$@" +else + /usr/bin/ocztoolbox "$@" +fi diff --git a/org.archlinux.pkexec.ocztoolbox.policy b/org.archlinux.pkexec.ocztoolbox.policy new file mode 100644 index 000000000000..adfec4865b00 --- /dev/null +++ b/org.archlinux.pkexec.ocztoolbox.policy @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE policyconfig PUBLIC + "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" + "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> +<policyconfig> + + <action id="org.archlinux.pkexec.ocztoolbox"> + <message>Authentication is required to run the OCZToolbox</message> + <icon_name>ocztoolbox</icon_name> + <defaults> + <allow_any>auth_admin</allow_any> + <allow_inactive>auth_admin</allow_inactive> + <allow_active>auth_admin</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/ocztoolbox</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> + +</policyconfig> + |