fix: build architecture-specific memories packages
This commit is contained in:
parent
c4beaa2309
commit
0537b7ba36
2 changed files with 94 additions and 0 deletions
|
@ -2,9 +2,56 @@
|
|||
|
||||
. ../.skel/nextcloud-app/build-nextcloud-app
|
||||
|
||||
export ARCHS=(amd64 arm64)
|
||||
|
||||
function _ncarch() {
|
||||
case "$1" in
|
||||
amd64)
|
||||
echo x86_64
|
||||
;;
|
||||
arm64)
|
||||
echo aarch64
|
||||
;;
|
||||
*)
|
||||
echo no such architecture
|
||||
exit 1
|
||||
esac
|
||||
}
|
||||
|
||||
function _binarch() {
|
||||
case "$1" in
|
||||
amd64)
|
||||
echo amd64
|
||||
;;
|
||||
arm64)
|
||||
echo aarch64
|
||||
;;
|
||||
*)
|
||||
echo no such architecture
|
||||
exit 1
|
||||
esac
|
||||
}
|
||||
|
||||
function post_chown() {
|
||||
chmod 0755 "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/exiftool/build_tag_lookup"
|
||||
chmod 0755 "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/exiftool/exiftool"
|
||||
chmod 0755 "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/exiftool/validate"
|
||||
}
|
||||
|
||||
post_prepare() {
|
||||
NCARCH=$(_ncarch $ARCH)
|
||||
for oarch in ${ARCHS[@]}; do
|
||||
if [[ "$(_ncarch $oarch)" == "${NCARCH}" ]]; then
|
||||
continue
|
||||
fi
|
||||
binarch=$(_binarch $oarch)
|
||||
rm -f ${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/*-${binarch}*
|
||||
rm -f ${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/exiftool/*-${binarch}*
|
||||
done
|
||||
github_changelog pulsejet/memories
|
||||
}
|
||||
|
||||
export ADDITIONAL_DEPS=", sensible-utils"
|
||||
|
||||
build_nextcloud_app memories 28
|
||||
|
||||
|
|
|
@ -2,9 +2,56 @@
|
|||
|
||||
. ../.skel/nextcloud-app/build-nextcloud-app
|
||||
|
||||
export ARCHS=(amd64 arm64)
|
||||
|
||||
function _ncarch() {
|
||||
case "$1" in
|
||||
amd64)
|
||||
echo x86_64
|
||||
;;
|
||||
arm64)
|
||||
echo aarch64
|
||||
;;
|
||||
*)
|
||||
echo no such architecture
|
||||
exit 1
|
||||
esac
|
||||
}
|
||||
|
||||
function _binarch() {
|
||||
case "$1" in
|
||||
amd64)
|
||||
echo amd64
|
||||
;;
|
||||
arm64)
|
||||
echo aarch64
|
||||
;;
|
||||
*)
|
||||
echo no such architecture
|
||||
exit 1
|
||||
esac
|
||||
}
|
||||
|
||||
function post_chown() {
|
||||
chmod 0755 "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/exiftool/build_tag_lookup"
|
||||
chmod 0755 "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/exiftool/exiftool"
|
||||
chmod 0755 "${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/exiftool/validate"
|
||||
}
|
||||
|
||||
post_prepare() {
|
||||
NCARCH=$(_ncarch $ARCH)
|
||||
for oarch in ${ARCHS[@]}; do
|
||||
if [[ "$(_ncarch $oarch)" == "${NCARCH}" ]]; then
|
||||
continue
|
||||
fi
|
||||
binarch=$(_binarch $oarch)
|
||||
rm -f ${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/*-${binarch}*
|
||||
rm -f ${PKGDIR}/usr/lib/nextcloud/nextcloud-apps/memories/bin-ext/exiftool/*-${binarch}*
|
||||
done
|
||||
github_changelog pulsejet/memories
|
||||
}
|
||||
|
||||
export ADDITIONAL_DEPS=", sensible-utils"
|
||||
|
||||
build_nextcloud_app memories 29
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue