blend/PKGBUILD

108 lines
3.4 KiB
Text
Raw Permalink Normal View History

2023-01-19 06:37:07 -06:00
# Maintainer: Rudra Saraswat <rs2009@ubuntu.com>
pkgbase=blend-git
pkgname=('blend-git' 'blend-settings-git')
2023-05-14 09:04:02 -05:00
pkgver=r50.2e0016f
2023-04-20 05:33:48 -05:00
pkgrel=1
pkgdesc="A package manager for blendOS"
arch=('x86_64' 'i686')
2024-10-01 22:37:25 -05:00
url="https://git.askiiart.net/askiiart-blendos/blend"
license=('GPL3')
makedepends=("electron" 'git' 'npm' 'base-devel')
2024-10-01 22:37:25 -05:00
source=('git+https://git.askiiart.net/askiiart-blendos/blend'
'blend-settings.desktop'
'blend-package-installer.desktop'
2023-04-20 05:33:48 -05:00
'blend-settings'
'blend.sh')
2023-02-11 09:06:47 -06:00
sha256sums=('SKIP'
2024-02-09 10:17:55 -06:00
'ba11ef22fe92a78239855c1bbc07d8c5be7cd94728bb3baf6184d2f42a80a4c2'
'994bebb5e993130e5cfaac8f9e1e8e676662a0cc76abcf90c8e128576506b818'
2024-02-09 10:17:55 -06:00
'73cb7c39190d36f233b8dfbc3e3e6737d56e61e90881ad95f09e5ae1f9b405a8'
'7dab67fb5c0239b6645659a7838de85b1420683a5bf52d8a8a3d324b69210a40')
2023-01-19 06:37:07 -06:00
pkgver() {
cd "${srcdir}/${pkgbase%-git}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/${pkgbase%-git}/${pkgbase%-git}-settings"
npm config set cache "${srcdir}/npm-cache"
2023-02-11 09:06:47 -06:00
npm install
}
build() {
cd "${srcdir}/${pkgbase%-git}/${pkgbase%-git}-settings"
npm config set cache "${srcdir}/npm-cache"
2023-02-11 09:06:47 -06:00
export NODE_ENV=production
electronDist="/usr/lib/electron"
electronVer="$(sed s/^v// /usr/lib/electron/version)"
2023-02-11 09:06:47 -06:00
npm run icons
npm run pack -- -c.electronDist=${electronDist} \
-c.electronVersion=${electronVer} --publish never
2023-04-25 10:41:01 -05:00
cd ../overlayfs-tools; make
2023-02-11 09:06:47 -06:00
}
package_blend-git() {
2024-06-03 15:16:59 -05:00
depends=('bash' 'blend-settings-git' 'podman' 'python' 'python-click' 'python-pexpect')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
cd "${srcdir}/${pkgbase%-git}"
install -Dm755 \
"${pkgname%-git}" \
2024-06-03 12:28:15 -05:00
"user" \
"init-${pkgname%-git}" \
"host-${pkgname%-git}" \
"${pkgname%-git}-files" \
-t "${pkgdir}"/usr/bin/
2023-04-25 10:41:01 -05:00
install -Dm755 "overlayfs-tools/overlayfs-tools" -t \
"${pkgdir}/usr/bin/"
2023-04-20 05:33:48 -05:00
install -Dm644 ../"${pkgname%-git}.sh" -t \
"${pkgdir}"/etc/profile.d/
install -Dm644 "${pkgname%-git}-files.service" -t \
"${pkgdir}"/usr/lib/systemd/user/
install -Dm644 "${pkgname%-git}.hook" \
"${pkgdir}/usr/lib/initcpio/hooks/${pkgname%-git}"
install -Dm644 "${pkgname%-git}.install" \
"${pkgdir}/usr/lib/initcpio/install/${pkgname%-git}"
2023-02-11 09:06:47 -06:00
}
package_blend-settings-git() {
pkgdesc="blendOS Settings"
depends=("electron${_electronversion}")
2023-04-20 01:04:27 -05:00
provides=(blend-settings)
conflicts=(blend-settings)
cd "${srcdir}/${pkgbase%-git}/${pkgbase%-git}-settings"
2023-01-19 06:37:07 -06:00
2023-02-11 09:06:47 -06:00
local _arch
case ${CARCH} in
2023-02-11 09:06:47 -06:00
i686)
_arch=linux-ia32-unpacked
;;
x86_64)
_arch=linux-unpacked
;;
*)
_arch=linux-${CARCH}-unpacked
2023-02-11 09:06:47 -06:00
;;
esac
install -Dm644 "dist/${_arch}/resources/app.asar" \
"$pkgdir/usr/lib/${pkgname%-git}/${pkgname%-git}.asar"
2023-02-11 09:06:47 -06:00
for icon_size in 16 24 32 48 64 128 256 512; do
install -Dm644 "build/icons/png/${icon_size}x${icon_size}.png" \
"${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps/${pkgname%-git}.png"
2023-02-11 09:06:47 -06:00
done
install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t \
"${pkgdir}"/usr/share/applications/
2023-04-20 05:33:48 -05:00
install -Dm644 "${srcdir}/blend-package-installer.desktop" -t \
"${pkgdir}"/usr/share/applications/
install -Dm755 "${srcdir}/${pkgname%-git}" -t "${pkgdir}"/usr/bin/
2023-01-19 06:37:07 -06:00
}