diff options
author | caltlgin | 2020-10-17 13:24:08 +1300 |
---|---|---|
committer | caltlgin | 2020-10-17 13:24:08 +1300 |
commit | 58a9ced34da4713ad4b115aae6745c519746ff9f (patch) | |
tree | 0a24017afae0377d0165cdd36e92a82b9414f051 | |
parent | d83f4e540faf9a8be7eb8dd1d3914a35fdf741a9 (diff) | |
download | aur-58a9ced34da4713ad4b115aae6745c519746ff9f.tar.gz |
Adopt and Refactored PKGBUILD
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 81 | ||||
-rw-r--r-- | org.archlinux.pkexec.unetbootin.policy | 5 | ||||
-rw-r--r-- | unetbootin.sh | 17 |
4 files changed, 62 insertions, 56 deletions
@@ -4,21 +4,20 @@ pkgbase = unetbootin pkgrel = 1 url = https://unetbootin.github.io arch = x86_64 - license = GPL + license = GPL3 makedepends = setconf - depends = syslinux + depends = mtools depends = p7zip depends = qt4 - depends = mtools + depends = syslinux depends = zenity optdepends = polkit: run unetbootin directly from menu - optdepends = zenity: display an error if no authentication agent is found - source = https://github.com/unetbootin/unetbootin/archive/681.tar.gz - source = org.archlinux.pkexec.unetbootin.policy + source = unetbootin-681::https://github.com/unetbootin/unetbootin/archive/681.tar.gz source = unetbootin.sh + source = org.archlinux.pkexec.unetbootin.policy sha256sums = ec62a6321c39203a096d6a778b2f1518da815ece135e5eb95ba1e42e28ec240a - sha256sums = fa9bb53d90cb10a0ab8dd317ed6a3506b228b0e26ed2ed8b108b5990f641641a - sha256sums = 6399c6a44b270a4ec67a36e3914c7c2f47a9008efb0133a33f92d9ad4284cc57 + sha256sums = c3bfa4723c1834d608be97ecf7b0c6975f6d0f9af2358427e4c9aa2f6c58c2e3 + sha256sums = 118f154e2772ff0d50d22735418fb37c9a03ecd0a1bbf2c8a4a8ed48da64160c pkgname = unetbootin @@ -1,60 +1,63 @@ -# Maintainer: Felix Golatofski <contact@xdfr.de> +# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz> +# Contributor: Felix Golatofski <contact@xdfr.de> # Contributor: Manuel Hüsers <manuel.huesers@uni-ol.de> # Contributor: Alexander F Rødseth <xyproto@archlinux.org> # Contributor: Det <nimetonmaili@gmail.com> # Contributor: Godane aka Christopher Rogers <slaxemulator@gmail.com> # Contributor: Michai Coman <mihai@m1x.ro> -pkgname=unetbootin +pkgname='unetbootin' pkgver=681 pkgrel=1 -arch=('x86_64') -license=('GPL') pkgdesc='Create bootable Live USB drives' +arch=('x86_64') url='https://unetbootin.github.io' -depends=('syslinux' 'p7zip' 'qt4' 'mtools' 'zenity') +_url_source='https://github.com/unetbootin/unetbootin' +license=('GPL3') +depends=('mtools' 'p7zip' 'qt4' 'syslinux' 'zenity') +#depends=('mtools' 'p7zip' 'qt5-base' 'syslinux' 'zenity') # qt5 makedepends=('setconf') -optdepends=('polkit: run unetbootin directly from menu' - 'zenity: display an error if no authentication agent is found') -source=("https://github.com/unetbootin/unetbootin/archive/${pkgver}.tar.gz" - 'org.archlinux.pkexec.unetbootin.policy' - 'unetbootin.sh') +optdepends=('polkit: run unetbootin directly from menu') +source=("${pkgname}-${pkgver}::${_url_source}/archive/${pkgver}.tar.gz" + "${pkgname}.sh" + "org.archlinux.pkexec.${pkgname}.policy") sha256sums=('ec62a6321c39203a096d6a778b2f1518da815ece135e5eb95ba1e42e28ec240a' - 'fa9bb53d90cb10a0ab8dd317ed6a3506b228b0e26ed2ed8b108b5990f641641a' - '6399c6a44b270a4ec67a36e3914c7c2f47a9008efb0133a33f92d9ad4284cc57') + 'c3bfa4723c1834d608be97ecf7b0c6975f6d0f9af2358427e4c9aa2f6c58c2e3' + '118f154e2772ff0d50d22735418fb37c9a03ecd0a1bbf2c8a4a8ed48da64160c') prepare() { - cd "${pkgname}-${pkgver}/src/${pkgname}" - - setconf unetbootin.desktop Exec /usr/bin/unetbootin + cd "${pkgname}-${pkgver}/src/${pkgname}" + setconf "${pkgname}.desktop" 'Exec' "/usr/bin/${pkgname}" + sed -i '/^RESOURCES/d' "${pkgname}.pro" } +# Update on qt5 release build() { - cd "${pkgname}-${pkgver}/src/${pkgname}" - - ./build-nostatic + cd "${pkgname}-${pkgver}/src/${pkgname}" + lupdate "${pkgname}.pro" + lrelease "${pkgname}.pro" + qmake-qt4 + PREFIX='/usr' \ + QMAKE_CFLAGS="$CFLAGS" \ + QMAKE_CXXFLAGS="$CXXFLAGS" \ + QMAKE_LFLAGS="$LDFLAGS" \ + qmake-qt4 "${pkgname}.pro" -config release "DEFINES += NOSTATIC" "RESOURCES -= ${pkgname}.qrc" + make } package() { - cd "${pkgname}-${pkgver}/src/${pkgname}" - - install -d "${pkgdir}/usr/share/${pkgname}" - install -m644 "${pkgname}"_*.qm "${pkgdir}/usr/share/${pkgname}/" - install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}.elf" - - # Application shortcut - install -Dm644 "${pkgname}.desktop" \ - "${pkgdir}/usr/share/applications/${pkgname}.desktop" - for i in 16 22 24 32 48 256; do - install -Dm644 "${pkgname}_${i}.png" \ - "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png" - done - - cd "$srcdir" - - install -m755 "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" - - # Polkit policy - install -Dm644 'org.archlinux.pkexec.unetbootin.policy' \ - "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.unetbootin.policy" + install -Dvm755 "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" + install -Dvm644 "org.archlinux.pkexec.${pkgname}.policy" -t "${pkgdir}/usr/share/polkit-1/actions" + + cd "${pkgname}-${pkgver}/src/${pkgname}" + install -Dvm644 "${pkgname}"_*.qm -t "${pkgdir}/usr/share/${pkgname}" + install -Dvm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}.elf" + install -Dvm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications" + install -Dvm644 'readme.md' -t "${pkgdir}/usr/share/doc/${pkgname}" + + for i in 16 24 32 48 64 128 256 512; do + install -Dvm644 "${pkgname}_${i}.png" "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png" + done } + +# vim: ts=2 sw=2 et: diff --git a/org.archlinux.pkexec.unetbootin.policy b/org.archlinux.pkexec.unetbootin.policy index c17df4ad6e5b..39c4d0c2b170 100644 --- a/org.archlinux.pkexec.unetbootin.policy +++ b/org.archlinux.pkexec.unetbootin.policy @@ -1,7 +1,7 @@ <?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"> + "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" + "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <policyconfig> <action id="org.archlinux.pkexec.unetbootin"> <message>Authentication is required to run Unetbootin</message> @@ -15,4 +15,3 @@ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> </action> </policyconfig> - diff --git a/unetbootin.sh b/unetbootin.sh index 89f840428928..8296ed5aa8c9 100644 --- a/unetbootin.sh +++ b/unetbootin.sh @@ -1,11 +1,16 @@ #!/bin/bash + export QT_X11_NO_MITSHM=1 -if [ $(which pkexec) ]; then - pkexec --disable-internal-agent "/usr/bin/unetbootin.elf" "$@" 2>/tmp/_polkit_error - if [ -s /tmp/_polkit_error ]; then - zenity --error --text="`cat /tmp/_polkit_error`" - rm /tmp/_polkit_error + +ELF_FILE='/usr/bin/unetbootin.elf' +TMP_FILE='/tmp/_polkit_error' + +if [ $(command -v pkexec) ]; then + pkexec --disable-internal-agent "${ELF_FILE}" "$@" 2>"${TMP_FILE}" + if [ -s "${TMP_FILE}" ]; then + zenity --error --text="$(cat ${TMP_FILE})" + rm -f "${TMP_FILE}" fi else - /usr/bin/unetbootin.elf "$@" + "${ELF_FILE}" "$@" fi |