summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorzxp198210052024-01-26 13:01:51 +0800
committerzxp198210052024-01-26 13:01:51 +0800
commit4e2d49af6599ac01472c7bcfe4f13e29c289322c (patch)
treeb8aef58ed7e9eee2885e70f5e64756d75828754a /PKGBUILD
parentf05953e278ac4ff79f009316a81e3bed2b2fd153 (diff)
downloadaur-4e2d49af6599ac01472c7bcfe4f13e29c289322c.tar.gz
fix errors
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD76
1 files changed, 35 insertions, 41 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4815a94563dd..99e3f3f6abf6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
# Contributer: auk
pkgname=hyper-git
_pkgname=Hyper
-pkgver=4.0.0.canary.5.r258.g7e6cbe05
+pkgver=4.0.0.canary.5.r298.g2207fa95
_electronversion=24
pkgrel=1
pkgdesc="A terminal built on web technologies"
@@ -15,27 +15,15 @@ arch=('any')
url="https://hyper.is/"
_ghurl="https://github.com/vercel/hyper"
license=('MIT')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
depends=(
+ 'hicolor-icon-theme'
+ 'nodejs'
+ 'gtk3'
'alsa-lib'
- 'libxfixes'
- 'cairo'
- 'libxcb'
'nspr'
- 'at-spi2-core'
- 'pango'
'nss'
- 'libx11'
- 'libcups'
- 'expat'
- 'libxcomposite'
- 'gtk3'
- 'libxkbcommon'
- 'libxext'
- 'mesa'
- 'libxdamage'
- 'libxrandr'
- 'libdrm'
- 'hicolor-icon-theme'
)
makedepends=(
'git'
@@ -46,14 +34,19 @@ makedepends=(
'libarchive'
'libicns'
)
-provides=("${pkgname%-git}")
-conflicts=("${pkgname%-git}")
+_electron_file_list=(
+ chrome-sandbox
+ chrome_{1,2}00_percent.pak
+ chrome_crashpad_handler
+ libvk_swiftshader.so
+ libvulkan.so.1
+)
source=(
- "${pkgname%-git}::git+${_ghurl}.git"
+ "${pkgname//-/.}::git+${_ghurl}.git"
)
sha256sums=('SKIP')
pkgver() {
- cd "${srcdir}/${pkgname%-git}"
+ cd "${srcdir}/${pkgname//-/.}"
printf "%s" "$(git describe --tags | sed 's/\w\+\///g;s/\([^-]*-g\)/r\1/;s/-/./g;s/v//g')"
}
_ensure_local_nvm() {
@@ -64,34 +57,35 @@ _ensure_local_nvm() {
}
build() {
_ensure_local_nvm
- gendesk -q -f -n --categories "System;Utility" --name "${_pkgname}" --exec "${pkgname%-git} --no-sandbox %U"
- 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
+ gendesk -q -f -n --categories "System" --name "${_pkgname}" --exec "${pkgname%-git} --no-sandbox %U"
+ cd "${srcdir}/${pkgname//-/.}"
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}"
- install -Dm755 -d "${srcdir}/${pkgname%-git}/node_modules/electron/dist"
+ export npm_config_target="${SYSTEM_ELECTRON_VERSION}"
+ export npm_config_disturl=https://electronjs.org/headers
+ export HOME="${srcdir}/.electron-gyp"
+ sed 's/\ \&\& husky install//g' -i package.json
+ sed -e '/"deb",/d' -e '/"rpm",/d' -e '/"snap",/d' -e '/"pacman"/d' -e 's|"AppImage",|"AppImage"|g' -i electron-builder.json
+ install -Dm755 -d "${srcdir}/${pkgname//-/.}/node_modules/electron/dist"
yarn install --cache-folder "${srcdir}/.yarn_cache"
+ yarn run build
yarn run dist
- 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
- cp icon_256.png icon_256x256.png
- cp icon_512.png icon_512x512.png
- cp icon_1024.png icon_1024x1024.png
+ cd "${srcdir}/${pkgname//-/.}/dist/.icon-set"
+ cp icon_16x16.png icon_16.png
+ cp icon_48x48.png icon_48.png
+ for _files in "${_electron_file_list[@]}"; do
+ rm -rf "${srcdir}/${pkgname//-/.}/dist/linux-"*/"${_files}"
+ done
}
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%-git}/dist/linux-unpacked/"* "${pkgdir}/opt/${pkgname%-git}"
- for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do
- install -Dm644 "${srcdir}/${pkgname%-git}/dist/.icon-set/icon_${_icons}.png" \
- "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-git}.png"
+ cp -r "${srcdir}/${pkgname//-/.}/dist/linux-"*/* "${pkgdir}/opt/${pkgname%-git}"
+ for _icons in 16 32 48 64 128 256 512 1024;do
+ install -Dm644 "${srcdir}/${pkgname//-/.}/dist/.icon-set/icon_${_icons}.png" \
+ "${pkgdir}/usr/share/icons/hicolor/${_icons}x${_icons}/apps/${pkgname%-git}.png"
done
install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
- install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
} \ No newline at end of file