temp/discover: build with apk backend support (MR 1881)

This commit is contained in:
Alexey Min 2021-01-29 16:49:29 +03:00 committed by Bart Ribbers
parent 9aa3a65a83
commit 9d9c735a0a
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
3 changed files with 3382 additions and 3 deletions

File diff suppressed because it is too large Load diff

View file

@ -16,6 +16,7 @@ makedepends="
extra-cmake-modules
flatpak-dev
karchive-dev
kauth-dev
kcmutils-dev
kconfig-dev
kcoreaddons-dev
@ -28,6 +29,7 @@ makedepends="
kitemmodels-dev
knewstuff-dev
kxmlgui-dev
libapk-qt-dev
plasma-framework-dev
qt5-qtbase-dev
qt5-qtdeclarative-dev
@ -38,8 +40,15 @@ case "$pkgver" in
*.90*) _rel=unstable;;
*) _rel=stable;;
esac
source="https://download.kde.org/$_rel/plasma/$pkgver/discover-$pkgver.tar.xz"
subpackages="$pkgname-lang $pkgname-backend-flatpak:backend_flatpak"
source="https://download.kde.org/$_rel/plasma/$pkgver/discover-$pkgver.tar.xz
0001-Add-support-for-Alpine-Linux-apk-backend.patch
alpine-appstream-data.json
"
subpackages="
$pkgname-lang
$pkgname-backend-flatpak:backend_flatpak
$pkgname-backend-apk:backend_apk
"
case "$CARCH" in
x86|x86_64)
@ -95,6 +104,36 @@ backend_flatpak() {
"$subpkgdir"/usr/share/icons/hicolor/scalable/apps/
}
backend_apk() {
pkgdesc="Apk backend for $pkgname"
depends=""
install_if="$pkgname apk-tools"
mkdir -p \
"$subpkgdir"/usr/lib/qt5/plugins/discover \
"$subpkgdir"/usr/share/libdiscover/external-appstream-urls \
"$subpkgdir"/usr/lib/libexec/kauth/ \
"$subpkgdir"/usr/share/polkit-1/actions/ \
"$subpkgdir"/usr/share/dbus-1/system.d/ \
"$subpkgdir"/usr/share/dbus-1/system-services/
mv "$pkgdir"/usr/lib/qt5/plugins/discover/alpineapk-backend.so \
"$subpkgdir"/usr/lib/qt5/plugins/discover/
mv "$pkgdir"/usr/lib/libexec/kauth/alpineapk_kauth_helper \
"$subpkgdir"/usr/lib/libexec/kauth/
mv "$pkgdir"/usr/share/polkit-1/actions/org.kde.discover.alpineapkbackend.policy \
"$subpkgdir"/usr/share/polkit-1/actions/
mv "$pkgdir"/usr/share/dbus-1/system.d/org.kde.discover.alpineapkbackend.conf \
"$subpkgdir"/usr/share/dbus-1/system.d/
mv "$pkgdir"/usr/share/dbus-1/system-services/org.kde.discover.alpineapkbackend.service \
"$subpkgdir"/usr/share/dbus-1/system-services/
# JSON file contains placeholder for replacement - @CARCH@
sed -i "s/@CARCH@/$CARCH/g" "$srcdir"/alpine-appstream-data.json
install -Dm644 "$srcdir"/alpine-appstream-data.json \
"$subpkgdir"/usr/share/libdiscover/external-appstream-urls/alpine-appstream-data.json
}
backend_fwupd() {
pkgdesc="fwupd backend for $pkgname"
depends=""
@ -107,4 +146,6 @@ backend_fwupd() {
"$subpkgdir"/usr/lib/qt5/plugins/discover/
}
sha512sums="f5cde987e5026eece047a32285421bf1eada4ed9496c514378c16ccd99dcfe768fc5d64caf63bbcad53295d60e21c567fd6712a09006f0adbcb66f809413ac9e discover-5.20.90.tar.xz"
sha512sums="f5cde987e5026eece047a32285421bf1eada4ed9496c514378c16ccd99dcfe768fc5d64caf63bbcad53295d60e21c567fd6712a09006f0adbcb66f809413ac9e discover-5.20.90.tar.xz
11240b3a8b461acc73e76fee37790e2f7c48dcb034dca8b25dc3728f97259736f2475dbd141a9fa1d7dbe44453bfcafa93178156f21db5010a3d3cd9a7c6ec73 0001-Add-support-for-Alpine-Linux-apk-backend.patch
f9f73888f8e20b317987da55028bd578de854fb34293466d1bc5deb82e32dc164916f724411de64a42235ecda37205d3f1ba26621ed7ab710b94273acce34aa3 alpine-appstream-data.json"

View file

@ -0,0 +1,7 @@
{
"urls": [
"https://appstream.alpinelinux.org/data/edge/main/Components-main-@CARCH@.xml.gz",
"https://appstream.alpinelinux.org/data/edge/community/Components-community-@CARCH@.xml.gz",
"https://appstream.alpinelinux.org/data/edge/testing/Components-testing-@CARCH@.xml.gz"
]
}