mirror of
https://github.com/archlinux/aur.git
synced 2026-02-07 12:41:55 +01:00
pkgx v1.0.0
This commit is contained in:
commit
a5dfaca07b
5 changed files with 102 additions and 0 deletions
16
.SRCINFO
Normal file
16
.SRCINFO
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
pkgbase = pkgx
|
||||
pkgdesc = Run Anything
|
||||
pkgver = 1.0.0
|
||||
pkgrel = 1
|
||||
url = https://pkgx.sh
|
||||
install = pkgx.install
|
||||
arch = x86_64
|
||||
license = Apache
|
||||
makedepends = deno
|
||||
depends = gcc-libs
|
||||
depends = glibc
|
||||
options = !strip
|
||||
source = pkgx-1.0.0.tar.gz::https://github.com/pkgxdev/pkgx/archive/v1.0.0.tar.gz
|
||||
sha512sums = c5846e9f79c6e1e3e73dc0568f0f98f0d37c153c0c6469596ba715dedc70812cca400a3d64ccbb4cb7c0dde448bf57c764d49fcec8d764080fde15ed6f3dc2ee
|
||||
|
||||
pkgname = pkgx
|
||||
20
.editorconfig
Normal file
20
.editorconfig
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# https://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{diff,patch}]
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[PKGBUILD]
|
||||
indent_size = 2
|
||||
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/.vscode/
|
||||
/src
|
||||
/pkg
|
||||
*.log
|
||||
*.pkg.*
|
||||
*.tar.*
|
||||
*.zip
|
||||
52
PKGBUILD
Normal file
52
PKGBUILD
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# Maintainer: Claudia Pellegrino <aur ät cpellegrino.de>
|
||||
|
||||
pkgname=pkgx
|
||||
pkgver=1.0.0
|
||||
pkgrel=1
|
||||
pkgdesc='Run Anything'
|
||||
arch=('x86_64')
|
||||
url='https://pkgx.sh'
|
||||
license=('Apache')
|
||||
depends=('gcc-libs' 'glibc')
|
||||
makedepends=('deno')
|
||||
options=('!strip') # stripping breaks the binary
|
||||
install="${pkgname}.install"
|
||||
|
||||
source=(
|
||||
"${pkgname}-${pkgver}.tar.gz::https://github.com/pkgxdev/pkgx/archive/v${pkgver}.tar.gz"
|
||||
)
|
||||
|
||||
sha512sums=(
|
||||
'c5846e9f79c6e1e3e73dc0568f0f98f0d37c153c0c6469596ba715dedc70812cca400a3d64ccbb4cb7c0dde448bf57c764d49fcec8d764080fde15ed6f3dc2ee'
|
||||
)
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
/usr/bin/deno task compile
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$(mktemp -d)"
|
||||
cat > hello.js << 'EOF'
|
||||
const middle="llo, w"
|
||||
console.log(`he${middle}orld`);
|
||||
EOF
|
||||
stdout="$(
|
||||
PKGX_DIR="$(pwd)/.pkgx" "${srcdir}/${pkgname}-${pkgver}/pkgx" hello.js
|
||||
)"
|
||||
[[ "${stdout}" == 'hello, world' ]]
|
||||
}
|
||||
|
||||
package() {
|
||||
echo >&2 'Packaging the executable'
|
||||
install -D -m 755 -t "${pkgdir}/usr/bin" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/pkgx"
|
||||
|
||||
echo >&2 'Packaging the documentation'
|
||||
install -D -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/README.md"
|
||||
|
||||
echo >&2 'Packaging the license'
|
||||
install -D -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/LICENSE.txt"
|
||||
}
|
||||
7
pkgx.install
Normal file
7
pkgx.install
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
post_install() {
|
||||
cat << 'EOF'
|
||||
try it out:
|
||||
|
||||
pkgx node@18 --eval 'console.log("pkgx: run anything")'
|
||||
EOF
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue