summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDennis Herbrich2022-05-26 13:24:55 +0200
committerDennis Herbrich2022-05-26 13:39:45 +0200
commit6cc7bcebf825f633a04de7e2bb3264db7a88eca7 (patch)
tree24dbba6e55f6c01d7a508f5e979f6995371c1d0a /PKGBUILD
parented1db738b928970b2c5b9b27b066faca9aa0e86b (diff)
downloadaur-6cc7bcebf825f633a04de7e2bb3264db7a88eca7.tar.gz
fix(package): install missing supplementary files (curves, docs)
Install all files and directories from the distribution archive to `/opt/sunvox/`, particularly `docs` and `curves`, which have been missing until now for no good reason. Documentation and licenses are additionally copied to conventional, system-wide directories `/usr/share/doc/sunvox` and `/usr/share/licenses/sunvox`, respectively.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 25 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9bf1f247f7cd..1656a23fef5c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -53,8 +53,9 @@ build() {
package() {
install -dm755 "${pkgdir}/opt/${pkgname}"
- install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -dm755 "${pkgdir}/usr/share/doc/${pkgname}"
install -dm755 "${pkgdir}/usr/share/icons/hicolor"
+ install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -Dm644 "${pkgname}.xml" "${pkgdir}/usr/share/mime/packages/${pkgname}.xml"
cp -a "${srcdir}"/icons/hicolor/* "${pkgdir}/usr/share/icons/hicolor/"
@@ -67,10 +68,29 @@ package() {
install -Dm755 "${srcdir}/sunvox/sunvox/linux_x86/sunvox_lofi" "${pkgdir}/usr/bin/sunvox_lofi"
fi
- cp -a "${srcdir}"/sunvox/{examples,instruments,effects} "${pkgdir}/opt/${pkgname}/"
- # enforce correct and consistent permissions
- chmod -R 0644 "${pkgdir}/opt/${pkgname}"/* "${pkgdir}"/usr/share/icons/hicolor/*
- find "${pkgdir}/opt/${pkgname}" "${pkgdir}"/usr/share/icons/hicolor -type d -print0 | xargs -0 chmod 0755
+ # preserve distributed structure of source package to install all
+ # provided support files, except for the `sunvox` directory, which only
+ # contains binaries for all architectures. Bash exclusion with
+ # `!(sunvox)` needs `shopt -s extglob`, so I'll just delete the
+ # unwanted copy to keep light on the shell feature requirements.
+ cp -a "${srcdir}/sunvox/"* "${pkgdir}/opt/${pkgname}/"
+ rm -r "${pkgdir}/opt/${pkgname}/sunvox"
+
+ # supplied documentation is replicated in expected system-wide location
+ cp -a "${srcdir}"/sunvox/docs/* "${pkgdir}/usr/share/doc/${pkgname}/"
+
+ # enforce correct and consistent permissions. At least the examples/
+ # subdir is world-accessible by default, so rather err on the side of
+ # caution here, and set all permissions to a known good value.
+ chmod -R 0644 \
+ "${pkgdir}/opt/${pkgname}"/* \
+ "${pkgdir}/usr/share/doc/${pkgname}"/* \
+ "${pkgdir}/usr/share/icons/hicolor"/*
+ find "${pkgdir}/opt/${pkgname}" \
+ "${pkgdir}/usr/share/doc/${pkgname}" \
+ "${pkgdir}/usr/share/icons/hicolor" \
+ -type d -print0 | xargs -0 chmod 0755
install -Dm644 "${srcdir}/sunvox/docs/license/sunvox.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 "${srcdir}/sunvox/docs/license"/* "${pkgdir}/usr/share/licenses/${pkgname}/"
}