diff options
author | Alexander Rubinov | 2016-10-08 00:11:59 +0200 |
---|---|---|
committer | Alexander Rubinov | 2016-10-08 00:11:59 +0200 |
commit | 9f16287f9663fef5b8db75ed82511e6d0eb59cfd (patch) | |
tree | d51261a6addd7d47d5ed7f1710a885939ad6ab1d | |
parent | b9ed282d08ac0d2558829f0635f869e472a282d3 (diff) | |
download | aur-9f16287f9663fef5b8db75ed82511e6d0eb59cfd.tar.gz |
default path for patches.txt, reworked PKGBUILD
-rw-r--r-- | PKGBUILD | 61 | ||||
-rw-r--r-- | uefipatch.cpp.patch | 18 |
2 files changed, 52 insertions, 27 deletions
@@ -1,47 +1,54 @@ -# Maintainer: xsmile <sascha_r a|t gmx d|o|t de> -_gitroot="https://github.com/LongSoft/UEFITool.git" -_gitname="UEFITool" -_gitbranch="master" -_elf="uefitool" +# Maintainer: xsmile <sascha_r at gmx dot de> +_gitbranch='master' +_tools=('UEFIExtract' 'UEFIFind' 'UEFIPatch') pkgname=uefitool-git -pkgver=r166.d54f215 +pkgver=r167.8cfd93c pkgrel=1 -pkgdesc="UEFI firmware image viewer and editor, UEFIExtract, UEFIFind and UEFIPatch" -arch=('i686' 'x86_64' 'armv6h' 'armv7h') -url="http://forums.mydigitallife.info/threads/48979-UEFITool-UEFI-firmware-image-viewer-and-editor" +pkgdesc='UEFI firmware image viewer and editor, UEFIExtract, UEFIFind and UEFIPatch' +arch=('any') +url='https://github.com/LongSoft/UEFITool' license=('BSD') depends=('qt5-base') makedepends=('git' 'qt5-base') -provides=('uefitool' 'uefiextract' 'uefifind' 'uefipatch') -conflicts=('uefitool' 'uefiextract' 'uefifind' 'uefipatch') -source=("${_gitname}::git+${_gitroot}#branch=${_gitbranch}") -md5sums=('SKIP') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +replaces=("${pkgname%-git}") +source=("${pkgname%-git}::git+${url}.git#branch=${_gitbranch}" + 'uefipatch.cpp.patch') +md5sums=('SKIP' + '5c2df7cd74307fa46c13cd10159951da') + pkgver() { - cd "${srcdir}/${_gitname}/" + cd "${srcdir}/${pkgname%-git}/" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } + +prepare() { + # pre-set the path to patches.txt in UEFIPatch + patch -p1 -i "${srcdir}/uefipatch.cpp.patch" +} + build() { - # UEFITool - cd "${srcdir}/${_gitname}" + # uefitool + cd "${srcdir}/${pkgname%-git}" qmake-qt5 make # other tools - for tool in UEFIExtract UEFIFind UEFIPatch; do - cd "${srcdir}/${_gitname}/${tool}" + for tool in "${_tools[@]}"; do + cd "${srcdir}/${pkgname%-git}/${tool}" qmake-qt5 make done } + package() { - # UEFITool - cd "${srcdir}/${_gitname}" - install -D -m755 "${_gitname}" "${pkgdir}/usr/bin/${_elf}" + # uefitool + cd "${srcdir}/${pkgname%-git}" + install -D -m755 "${url##*/}" "${pkgdir}/usr/bin/${pkgname%-git}" # other tools - for tool in UEFIExtract UEFIFind UEFIPatch; do - cd "${srcdir}/${_gitname}/${tool}" - install -D -m755 ${tool} "${pkgdir}/usr/bin/${tool,,}" - if [ $tool == "UEFIPatch" ]; then - install -D -m644 patches.txt "${pkgdir}/usr/share/${_gitname,,}/patches.txt" - fi + for tool in "${_tools[@]}"; do + install -D -m755 "${tool}/${tool}" "${pkgdir}/usr/bin/${tool,,}" done + # default patches.txt file + install -D -m644 "${_tools[2]}/patches.txt" "${pkgdir}/usr/share/${pkgname%-git}/patches.txt" } diff --git a/uefipatch.cpp.patch b/uefipatch.cpp.patch new file mode 100644 index 000000000000..7bd86073ea84 --- /dev/null +++ b/uefipatch.cpp.patch @@ -0,0 +1,18 @@ +--- a/uefitool/UEFIPatch/uefipatch.cpp 2016-10-07 23:39:16.579188249 +0200 ++++ b/uefitool/UEFIPatch/uefipatch.cpp 2016-10-07 23:40:00.707034736 +0200 +@@ -27,13 +27,13 @@ + + UINT8 UEFIPatch::patchFromFile(QString path) + { +- QFileInfo patchInfo = QFileInfo("patches.txt"); ++ QFileInfo patchInfo = QFileInfo("/usr/share/uefitool/patches.txt"); + + if (!patchInfo.exists()) + return ERR_INVALID_FILE; + + QFile file; +- file.setFileName("patches.txt"); ++ file.setFileName("/usr/share/uefitool/patches.txt"); + + if (!file.open(QFile::ReadOnly | QFile::Text)) + return ERR_INVALID_FILE; |