Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AOx0 committed Apr 2, 2024
1 parent 38c0a03 commit 209a0a6
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 40 deletions.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rm ./gpg_key
gpg --list-keys --keyid-format=long
gpg --list-secret-keys --keyid-format=long

for i in helix-git gitkraken-wayland; do
for i in typst-git helix-git gitkraken-wayland; do
status=13
git submodule update --init $i
cd $i
Expand Down
24 changes: 11 additions & 13 deletions helix-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Contributor: Wojciech Kępka (wojciech@wkepka.dev)
pkgname=helix-git
_pkgname=helix
pkgver=23.10.r237.g0d09fb4f5
pkgver=24.03.r20.gb24c465a0
pkgrel=1
pkgdesc="A text editor written in rust"
url="https://helix-editor.com"
Expand Down Expand Up @@ -35,8 +35,8 @@ EOF
chmod +x "$_bin"

cd "${_pkgname}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
_srcenv

cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"

# Add custom transparent fleet_dark
Expand Down Expand Up @@ -74,21 +74,19 @@ EOF
rm rust-toolchain.toml
}


_srcenv() {
export RUSTUP_TOOLCHAIN=nightly
export CARGO_TARGET_DIR=target
export RUSTFLAGS="-Z threads=2"
}

build() {
cd "${_pkgname}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
_srcenv
cargo build --frozen --offline --release
}

# check() {
# cd "${_pkgname}"
# export RUSTUP_TOOLCHAIN=stable
# export CARGO_TARGET_DIR=target
# cargo test --frozen --offline --workspace
# cargo integration-test --frozen --offline
# }

package() {
cd "${_pkgname}"
mkdir -p "${pkgdir}${_lib_path}"
Expand Down
59 changes: 33 additions & 26 deletions typst-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,51 +1,58 @@
# Maintainer: Nicholas Novak <34256932+NickyBoy89@users.noreply.github.com>

pkgname=typst-git
_pkgname=${pkgname%-git}
name=typst
pkgver=r2346.d7928a8e
pkgver=0.11.0.r25.g1e645b396
pkgrel=1
pkgdesc="A new markup-based typesetting system that is powerful and easy to learn. "
pkgdesc='A markup-based typesetting system for the sciences'
license=('Apache-2.0')
arch=('any')
makedepends=('git' 'cargo')
provides=('typst')
depends=('gcc-libs' 'glibc')
_url="https://github.com/$_pkgname/$_pkgname"
makedepends=(cargo
git)
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
depends=(gcc-libs
glibc)
url="https://github.com/typst/typst"
source=(
"typst::git+https://github.com/typst/typst"
)
source=("$_pkgname::git+$_url.git")
md5sums=('SKIP')

prepare() {
cd "$srcdir/typst"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
cd "$_pkgname"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}


pkgver() {
cd "$srcdir/typst"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
cd "$_pkgname"
git describe --long --tags |
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g;s/rc.\.//'
}

_srcenv() {
export RUSTUP_TOOLCHAIN=nightly
export CARGO_TARGET_DIR=target
export RUSTFLAGS="-Z threads=2"
}

build() {
cd "$srcdir/typst"
cd "$_pkgname"
_srcenv
CFLAGS+=" -ffat-lto-objects"
export TYPST_VERSION="${pkgver}"
export GEN_ARTIFACTS=artifacts/
cargo build -p typst-cli --release --all-features
cargo build -p typst-cli --frozen --release --all-features
}

package() {
# Install the binary
install -vDm 755 "$srcdir/typst/target/release/typst" "$pkgdir/usr/bin/typst"

# Install the licenses
install -vDm 644 "$srcdir/typst/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

# Install man pages and completions
local _artifacts="$srcdir/typst/crates/typst-cli/artifacts"
install -Dm0644 -t "$pkgdir/usr/share/man/man1/" "$_artifacts/$name"*.1
install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" "$_artifacts/_$name"
install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" "$_artifacts/$name.fish"
install -Dm0644 "$_artifacts/$name.bash" "$pkgdir/usr/share/bash-completion/completions/$name"
cd "$_pkgname"
local _artifacts='crates/typst-cli/artifacts'
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$_pkgname"
install -Dm0644 -t "$pkgdir/usr/share/man/man1/" "$_artifacts/$_pkgname"*.1
install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" "$_artifacts/_$_pkgname"
install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" "$_artifacts/$_pkgname.fish"
install -Dm0644 "$_artifacts/$_pkgname.bash" "$pkgdir/usr/share/bash-completion/completions/$_pkgname"
}

0 comments on commit 209a0a6

Please sign in to comment.