summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorzxp198210052023-10-18 15:15:32 +0800
committerzxp198210052023-10-18 15:15:32 +0800
commit01d47f5f2fe5abb35407f414f929711c29f265b0 (patch)
treee647bf7c903a255e0b2d1a106aaf2e71fea4a5ed /PKGBUILD
parent38af4eaae2c0c2898b0253b49eefbc78328c09dc (diff)
downloadaur-01d47f5f2fe5abb35407f414f929711c29f265b0.tar.gz
update to 4.0.0.canary.5.r155.g3da89a87
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD103
1 files changed, 36 insertions, 67 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a184f9e3289d..6748261c89a8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,83 +1,52 @@
-# Maintainer: Bet4 <0xbet4@gmail.com>
-
-# Special thanks to the following people that provided the
-# original PKGBUILD from hyper (https://aur.archlinux.org/packages/hyper/)
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+# Contributer: Bet4 <0xbet4@gmail.com>
# Contributer: Frederic Bezies <fredbezies at gmail dot com>
# Contributor: ahrs <Forward dot to at hotmail dot co dot uk>
# Contributor: Aaron Abbott <aabmass@gmail.com>
# Contributer: fleischie
# Contributer: auk
-
-_pkgname=hyper
-pkgname=${_pkgname}-git
-pkgver=3.1.2.r54.g7f01b064
+pkgname=hyper-git
+_pkgname=Hyper
+pkgver=4.0.0.canary.5.r155.g3da89a87
pkgrel=1
pkgdesc="A terminal built on web technologies"
arch=('any')
url="https://hyper.is/"
+_githuburl="https://github.com/vercel/hyper"
license=('MIT')
-makedepends=('git' 'npm' 'yarn' 'python')
-provides=(${_pkgname})
-conflicts=(${_pkgname})
-
-source=(
- "$pkgname::git+https://github.com/vercel/${_pkgname}.git"
- "disable-auto-update.diff"
- "https://raw.githubusercontent.com/vercel/art/master/hyper/mark/Hyper-Mark-120@3x.png"
- "Hyper.desktop"
-)
-sha256sums=('SKIP'
- '65c52023f95c3ab3acf3f54bfce217f3c87b3e21da1965afbb9bcab5888b932c'
- 'a928049af63f49dd270a26c7099dccbe038124e4195507919f2d062e5cd2ecaa'
- 'ae29bd930c822c3144817a0e2fe2e2a8253fde90d31b0e19ad7880cd35609ebf')
-
+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')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("${pkgname//-/.}::git+${_githuburl}.git")
+sha256sums=('SKIP')
pkgver() {
- cd "${pkgname}"
- git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+ cd "${srcdir}/${pkgname//-/.}"
+ printf "%s" "$(git describe --tags | sed 's/\w\+\///g;s/\([^-]*-g\)/r\1/;s/-/./g;s/v//g')"
}
-
-prepare() {
- cd "$pkgname"
- patch -p1 < ../disable-auto-update.diff
-
- # yarn is a build-dep according to the README
- yarn install
-}
-
build() {
- cd "$pkgname"
-
- # This build command is the same as the one defined in package.json via
- # npm run dist except that it doesn't build for debian, rpm, etc. and
- # doesn't require some other dependencies
-
- # add node_modules binaries to PATH
- oldpath=$PATH
- PATH=$(pwd)/node_modules/.bin:$PATH
-
- yarn run build &&
- cross-env BABEL_ENV=production babel target/renderer/bundle.js \
- --out-file target/renderer/bundle.js \
- --no-comments \
- --minified &&
- electron-builder --linux --dir
-
- PATH=$oldpath
+ gendesk -q -f -n --categories "System;Utility" --name "${_pkgname}" --exec "${pkgname%-git} --no-sandbox %U"
+ cd "${srcdir}/${pkgname//-/.}"
+ sed -e '/"deb",/d' -e '/"rpm",/d' -e '/"snap",/d' -e '/"pacman"/d' -e 's|"AppImage",|"AppImage"|g' -i electron-builder.json
+ yarn install
+ yarn run dist
+ cd "${srcdir}/${pkgname//-/.}/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
}
-
package() {
- cd "$pkgname"
-
- _appdir="/usr/lib/$_pkgname"
- _libinstall="$pkgdir$_appdir"
-
- mkdir -p "$pkgdir/usr/bin" "$_libinstall"
- cp -R dist/linux-unpacked/* "$_libinstall"
-
- # link the binary to /usr/bin
- cd $pkgdir/usr/bin
- ln -s "../lib/$_pkgname/resources/bin/hyper" hyper
-
- install -Dm644 "$srcdir/Hyper.desktop" "$pkgdir/usr/share/applications/Hyper.desktop"
- install -Dm644 "$srcdir/Hyper-Mark-120@3x.png" "$pkgdir/usr/share/pixmaps/hyper.png"
+ 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}"
+ for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do
+ install -Dm644 "${srcdir}/${pkgname//-/.}/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}"
}