diff options
author | bemxio | 2023-09-29 17:55:12 +0200 |
---|---|---|
committer | bemxio | 2023-09-29 17:55:12 +0200 |
commit | 993ef910edd68a95c07ef5bdeda2c32a537c259f (patch) | |
tree | 7e078a96b6b8dbd9308560d65b01770d8ad07b89 | |
parent | 8746fb9e0b6e87915721b6f9ce281a6ce5008c59 (diff) | |
download | aur-993ef910edd68a95c07ef5bdeda2c32a537c259f.tar.gz |
refactor the PKGBUILD to use `install` instead of `mv`
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 59 |
2 files changed, 32 insertions, 29 deletions
@@ -1,7 +1,7 @@ pkgbase = anituner pkgdesc = Create, edit and convert Windows animated cursors pkgver = 2.0.0 - pkgrel = 3 + pkgrel = 4 url = https://www.gdgsoft.com/anituner arch = i686 arch = x86_64 @@ -1,33 +1,30 @@ # Maintainer: bemxio <bemxiov@protonmail.com> -pkgname='anituner' -pkgdesc='Create, edit and convert Windows animated cursors' +pkgname="anituner" +pkgdesc="Create, edit and convert Windows animated cursors" pkgver=2.0.0 -pkgrel=3 +pkgrel=4 arch=(i686 x86_64) -url='https://www.gdgsoft.com/anituner' -license=('freeware') +url="https://www.gdgsoft.com/anituner" +license=("freeware") depends=(wine) makedepends=(unzip gendesk icoutils) provides=(anituner) -source=('https://download.gdgsoft.com/anitun2p.zip') -md5sums=('f0cff36790da5e3f9b02a65aa4d64101') +source=("https://download.gdgsoft.com/anitun2p.zip") +md5sums=("f0cff36790da5e3f9b02a65aa4d64101") prepare() { - # make a temporary directory for generated files - mkdir -p ${startdir}/tmp - - # move into the temporary directory - cd ${startdir}/tmp + # make a temporary directory and move into it + mkdir -p "${startdir}/tmp" && cd "${startdir}/tmp" # extract the icon out of the executable - wrestool -x -n MAINICON ${srcdir}/AniTuner.exe -o AniTuner.ico + wrestool -x -n MAINICON "${srcdir}/AniTuner.exe" -o AniTuner.ico # get the highest quality PNG from the icon file icotool -x AniTuner.ico -i 6 --output AniTuner.png @@ -38,35 +35,41 @@ prepare() { --pkgdesc "${pkgdesc}" \ --exec anituner \ --icon AniTuner.png \ - --categories 'Graphics;Utility' \ - --mimetypes 'image/bmp;image/jpeg;image/png;image/gif;image/vnd.adobe.photoshop;image/x-icon;image/x-win-bitmap;application/x-navi-animation;application/anituner-atd' + --categories "Graphics;Utility" \ + --mimetypes "image/bmp;image/jpeg;image/png;image/gif;image/vnd.adobe.photoshop;image/x-icon;image/x-win-bitmap;application/x-navi-animation;application/anituner-atd" } package() { # rename the default configuration file - mv ${srcdir}/AniTunerPref.xml ${srcdir}/AniTunerPrefDefault.xml + mv "${srcdir}/AniTunerPref.xml" "${srcdir}/AniTunerPrefDefault.xml" # make the required directories - mkdir -p ${pkgdir}/usr/share/anituner - mkdir -p ${pkgdir}/usr/bin + mkdir -p "${pkgdir}/usr/share/anituner" + mkdir -p "${pkgdir}/usr/share/anituner/Samples" + + mkdir -p "${pkgdir}/usr/bin" - mkdir -p ${pkgdir}/usr/share/applications - mkdir -p ${pkgdir}/usr/share/pixmaps - mkdir -p ${pkgdir}/usr/share/mime/packages + mkdir -p "${pkgdir}/usr/share/applications" + mkdir -p "${pkgdir}/usr/share/pixmaps" + mkdir -p "${pkgdir}/usr/share/mime/packages" # copy all of AniTuner's files - cp -r ${srcdir}/* ${pkgdir}/usr/share/anituner + install -Dm755 "${srcdir}/AniTuner.exe" "${pkgdir}/usr/share/anituner" + install -Dm644 "${srcdir}/AniTuner.chm" "${pkgdir}/usr/share/anituner" + install -Dm644 "${srcdir}/AniTunerPrefDefault.xml" "${pkgdir}/usr/share/anituner" + install -Dm644 "${srcdir}/Readme.txt" "${pkgdir}/usr/share/anituner" + install -Dm644 "${srcdir}/Samples/"* "${pkgdir}/usr/share/anituner/Samples" # remove the symlink to the ZIP from the package files - rm -f ${pkgdir}/usr/share/anituner/anitun2p.zip + rm -f "${pkgdir}/usr/share/anituner/anitun2p.zip" - # copy the script - cp -r ${startdir}/anituner ${pkgdir}/usr/bin + # copy the executable script + install -v -Dm755 "${startdir}/anituner" "${pkgdir}/usr/bin" # copy the extracted icon and the generated .desktop file - cp -r ${startdir}/tmp/AniTuner.png ${pkgdir}/usr/share/pixmaps - cp -r ${startdir}/tmp/AniTuner.desktop ${pkgdir}/usr/share/applications + install -Dm644 "${startdir}/tmp/AniTuner.png" "${pkgdir}/usr/share/pixmaps" + install -Dm644 "${startdir}/tmp/AniTuner.desktop" "${pkgdir}/usr/share/applications" # copy the custom MIME type - cp -r ${startdir}/anituner-atd.xml ${pkgdir}/usr/share/mime/packages + install -Dm644 "${startdir}/anituner-atd.xml" "${pkgdir}/usr/share/mime/packages" } |