mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-03 18:32:18 +00:00
Add tectonic (I guess)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
project "pkg" {
|
||||
rpm {
|
||||
spec = "tectonic.spec"
|
||||
sources = "."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import os
|
||||
import requests
|
||||
import re
|
||||
|
||||
NAME = 'tectonic'
|
||||
REPO = "tectonic-typesetting/tectonic"
|
||||
REGEX_VER = r'Version:\s*([\.\d]+)\n'
|
||||
SPEC = f"{NAME}.spec"
|
||||
LINK = f'https://api.github.com/repos/{REPO}/releases/latest'
|
||||
|
||||
|
||||
ver = requests.get(LINK).json()['tag_name']
|
||||
with open(SPEC, 'r') as f:
|
||||
matches = re.findall(REGEX_VER, f.read())
|
||||
if not len(matches): exit(f"{NAME}: Failed to match regex!")
|
||||
cur = matches[0]
|
||||
if ver == cur: exit(f'{NAME}: Up to date!')
|
||||
print(f'{NAME}: {cur} -> {ver}')
|
||||
os.system(f'rpmdev-bumpspec -n {ver} {SPEC}')
|
||||
@@ -0,0 +1,24 @@
|
||||
Name: tectonic
|
||||
Version: 0.12.0
|
||||
Release: %autorelease
|
||||
Summary: A modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive
|
||||
URL: https://github.com/tectonic-typesetting/tectonic
|
||||
License: MIT
|
||||
Source0: %{url}/archive/refs/tags/tectonic@%{version}.tar.gz
|
||||
Requires: r-openssl harfbuzz-icu libpng freetype graphite2 zlib fontconfig
|
||||
BuildRequires: cargo gcc gcc-c++ mold
|
||||
|
||||
%description
|
||||
Tectonic is a modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive.
|
||||
|
||||
%build
|
||||
cargo build
|
||||
|
||||
|
||||
%install
|
||||
cargo install
|
||||
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
Reference in New Issue
Block a user