diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c00df13 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.deb diff --git a/Tectonic/README.md b/Tectonic/README.md new file mode 100644 index 0000000..176d979 --- /dev/null +++ b/Tectonic/README.md @@ -0,0 +1,5 @@ +# Tectonic + +A modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive. + +This package builds Tectonic from source using the Git repository. diff --git a/Tectonic/lure.sh b/Tectonic/lure.sh new file mode 100644 index 0000000..f6a0c2b --- /dev/null +++ b/Tectonic/lure.sh @@ -0,0 +1,91 @@ +name="tectonic-git" +version="0.0.0" # Will be updated dynamically +release="1" +desc="Modernized, complete, self-contained TeX/LaTeX engine" +homepage="https://tectonic-typesetting.github.io/" +maintainer="éclairevoyant" +architectures=("amd64") +license=("MIT") +provides=("tectonic") +conflicts=("tectonic") + +# Build Dependencies (Debian/Ubuntu/Mint names) +# We need development headers for C libraries +build_deps=("git" "pkg-config" "build-essential" "libfontconfig1-dev" "libharfbuzz-dev" "libicu-dev" "libssl-dev" "curl" "ca-certificates") + +# Runtime Dependencies +deps=("libfontconfig1" "libharfbuzz-icu0" "libssl3") + +# Arch Linux Overrides (kept for reference/cross-compatibility) +build_deps_arch=("rust" "gcc" "pkg-config" "git" "fontconfig" "harfbuzz-icu" "openssl") +deps_arch=("fontconfig" "harfbuzz-icu" "openssl") + +sources=( + "git+https://github.com/tectonic-typesetting/tectonic.git" + "git+https://github.com/tectonic-typesetting/tectonic-staging.git" +) +checksums=("SKIP" "SKIP") + +# --- Rust Bootstrap Logic --- +setup_env() { + if [ -d "$srcdir/.cargo" ]; then + export RUSTUP_HOME="$srcdir/.rustup" + export CARGO_HOME="$srcdir/.cargo" + export PATH="$CARGO_HOME/bin:$PATH" + fi +} + +setup_rust() { + local MIN_VER="1.80.0" # Tectonic needs recent Rust + + if command -v rustc &> /dev/null; then + local CURRENT_VER=$(rustc --version | awk '{print $2}') + if [ "$(printf '%s\n' "$MIN_VER" "$CURRENT_VER" | sort -V | head -n1)" = "$MIN_VER" ]; then + echo "System Rust version $CURRENT_VER is sufficient." + return 0 + fi + echo "System Rust version $CURRENT_VER is too old (need $MIN_VER+)." + fi + + echo "Bootstrapping local Rust toolchain..." + mkdir -p "$srcdir/.rustup" "$srcdir/.cargo" + setup_env + + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + sh -s -- -y --no-modify-path --default-toolchain stable --profile minimal +} +# ---------------------------- + +version() { + cd "$srcdir/tectonic" + # Matches PKGBUILD logic to generate version string + git describe --tags | sed 's/^cfg_support-v//;s/\([^-]*-\)g/r\1/;s/-/./g' +} + +prepare() { + setup_rust + + cd "$srcdir/tectonic" + + # Link the staging repo from LURE's srcdir to the submodule path + git submodule init reference_sources + git submodule set-url reference_sources "$srcdir/tectonic-staging" + git submodule update reference_sources + + # Fetch Rust dependencies + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + setup_env + cd "$srcdir/tectonic" + # Build with external harfbuzz (system libs) as requested in PKGBUILD + cargo build --frozen --release --features external-harfbuzz +} + +package() { + setup_env + cd "$srcdir/tectonic" + install -Dm755 target/release/tectonic -t "$pkgdir/usr/bin/" + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$name/" +} diff --git a/rdrview/lure.sh b/rdrview/lure.sh new file mode 100644 index 0000000..047fe3c --- /dev/null +++ b/rdrview/lure.sh @@ -0,0 +1,33 @@ +name="rdrview" +version="0.1.5" +release="1" +desc="Firefox Reader View as a command line tool" +homepage="https://github.com/eafer/rdrview" +maintainer="Nebulosa " +architectures=("amd64") +license=("Apache-2.0") + +# Runtime dependencies (Ubuntu/Mint names) +deps=("curl" "libseccomp2" "libxml2") + +# Build dependencies (Headers needed for compilation) +build_deps=("git" "libseccomp-dev" "libxml2-dev" "libcurl4-openssl-dev" "build-essential") + +sources=("https://github.com/eafer/rdrview/archive/v${version}/${name}-${version}.tar.gz") +checksums=("sha512:061d0241e6b24a0ad86ae30f5ca0ffd697b6f10ba5d66eb7ca83135095cd0e5efb8501166f55622465d861cd027d64a9568d1f567ba727dd35f5dcec60eaadf1") + +prepare() { + cd "${name}-${version}" + # Replaces the git command in Makefile with the actual version to prevent errors + sed -i "s/GIT_COMMIT = \$(shell git rev-parse --short HEAD)/GIT_COMMIT = ${version}/" Makefile +} + +build() { + cd "${name}-${version}" + make +} + +package() { + cd "${name}-${version}" + make PREFIX="${pkgdir}/usr" install +}