summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorzxp198210052023-12-07 17:25:06 +0800
committerzxp198210052023-12-07 17:25:06 +0800
commit02a6b3f76bcdddaf60d21c00854f913a8cbdee0a (patch)
tree08eb27c9dd985f2f2bb4332be2fcce1fc72f4ae7 /PKGBUILD
parent01d47f5f2fe5abb35407f414f929711c29f265b0 (diff)
downloadaur-02a6b3f76bcdddaf60d21c00854f913a8cbdee0a.tar.gz
update to 4.0.0.canary.5.r250.ga1da6e79
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD56
1 files changed, 43 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6748261c89a8..3feb4860324f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,31 +7,61 @@
# Contributer: auk
pkgname=hyper-git
_pkgname=Hyper
-pkgver=4.0.0.canary.5.r155.g3da89a87
+pkgver=4.0.0.canary.5.r250.ga1da6e79
+_electronversion=24
pkgrel=1
pkgdesc="A terminal built on web technologies"
arch=('any')
url="https://hyper.is/"
-_githuburl="https://github.com/vercel/hyper"
+_ghurl="https://github.com/vercel/hyper"
license=('MIT')
depends=('bash' 'python' 'alsa-lib' 'libxfixes' 'cairo' 'libxcb' 'glibc' 'nspr' 'at-spi2-core' 'pango' 'nss' 'libx11' 'libcups' 'expat' \
'libxcomposite' 'gtk3' 'libxkbcommon' 'gcc-libs' 'libxext' 'mesa' 'libxdamage' 'libxrandr' 'libdrm' 'glib2' 'dbus' 'hicolor-icon-theme')
-makedepends=('git' 'npm>=9.8.1' 'yarn' 'nodejs>=18.18.0' 'python>=3.8' 'libarchive')
+makedepends=(
+ 'git'
+ 'npm>=9.8.1'
+ 'yarn'
+ 'nvm'
+ 'python>=3.8'
+ 'libarchive'
+ 'libicns'
+)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
-source=("${pkgname//-/.}::git+${_githuburl}.git")
-sha256sums=('SKIP')
+source=(
+ "${pkgname%-git}::git+${_ghurl}.git"
+ "${pkgname%-git}.sh"
+)
+sha256sums=('SKIP'
+ '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
pkgver() {
- cd "${srcdir}/${pkgname//-/.}"
+ cd "${srcdir}/${pkgname%-git}"
printf "%s" "$(git describe --tags | sed 's/\w\+\///g;s/\([^-]*-g\)/r\1/;s/-/./g;s/v//g')"
}
+_ensure_local_nvm() {
+ export NVM_DIR="${srcdir}/.nvm"
+ source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
+ nvm install 18
+ nvm use 18
+}
build() {
+ sed -e "s|@electronversion@|${_electronversion}|" \
+ -e "s|@appname@|${pkgname%-git}|g" \
+ -e "s|@appasar@|app|g" \
+ -i "${srcdir}/${pkgname%-git}.sh"
+ _ensure_local_nvm
gendesk -q -f -n --categories "System;Utility" --name "${_pkgname}" --exec "${pkgname%-git} --no-sandbox %U"
- cd "${srcdir}/${pkgname//-/.}"
+ cd "${srcdir}/${pkgname%-git}"
+ rm -rf .yarnrc
sed -e '/"deb",/d' -e '/"rpm",/d' -e '/"snap",/d' -e '/"pacman"/d' -e 's|"AppImage",|"AppImage"|g' -i electron-builder.json
- yarn install
+ export npm_config_build_from_source=true
+ export npm_config_cache="${srcdir}/.npm_cache"
+ export ELECTRON_SKIP_BINARY_DOWNLOAD=1
+ export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
+ export ELECTRONVERSION="${_electronversion}"
+ yarn install --cache-folder "${srcdir}/.yarn_cache"
yarn run dist
- cd "${srcdir}/${pkgname//-/.}/dist/.icon-set"
+ cd "${srcdir}/${pkgname%-git}/dist/.icon-set"
cp icon_32.png icon_32x32.png
cp icon_64.png icon_64x64.png
cp icon_128.png icon_128x128.png
@@ -42,11 +72,11 @@ build() {
package() {
install -Dm755 -d "${pkgdir}/"{opt/"${pkgname%-git}",usr/bin}
ln -sf "/opt/${pkgname%-git}/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}"
- cp -r "${srcdir}/${pkgname//-/.}/dist/linux-unpacked/"* "${pkgdir}/opt/${pkgname%-git}"
+ cp -r "${srcdir}/${pkgname%-git}/dist/linux-unpacked/"* "${pkgdir}/opt/${pkgname%-git}"
for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do
- install -Dm644 "${srcdir}/${pkgname//-/.}/dist/.icon-set/icon_${_icons}.png" \
+ install -Dm644 "${srcdir}/${pkgname%-git}/dist/.icon-set/icon_${_icons}.png" \
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-git}.png"
done
install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
- install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
-}
+ install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+} \ No newline at end of file