summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD28
-rw-r--r--latex-sjtutex-git.install6
-rw-r--r--patch-0.patch31
4 files changed, 84 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..73ec5963bb0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = latex-sjtutex-git
+ pkgdesc = Macro Packages and Scripts for SJTU TeX users
+ pkgver = r343.2f1bda5
+ pkgrel = 1
+ url = https://github.com/sjtug/SJTUTeX
+ install = latex-sjtutex-git.install
+ arch = any
+ license = LPPL
+ makedepends = git
+ makedepends = unzip
+ makedepends = zip
+ depends = texlive-core
+ source = git+https://github.com/sjtug/SJTUTeX
+ source = patch-0.patch
+ md5sums = SKIP
+ md5sums = 8bf2684bec9e47f9df06df861aa3068b
+
+pkgname = latex-sjtutex-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..260e5780e3d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: LightQuantum <cy.n01 at outlook dot com>
+
+pkgname=latex-sjtutex-git
+pkgver=r343.2f1bda5
+pkgrel=1
+pkgdesc="Macro Packages and Scripts for SJTU TeX users"
+arch=(any)
+url="https://github.com/sjtug/SJTUTeX"
+license=('LPPL')
+depends=('texlive-core')
+makedepends=('git' 'unzip' 'zip')
+install="${pkgname}.install"
+source=('git+https://github.com/sjtug/SJTUTeX' 'patch-0.patch')
+md5sums=('SKIP'
+ '8bf2684bec9e47f9df06df861aa3068b')
+
+pkgver() {
+ cd "$srcdir"/SJTUTeX
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ patch -p0 < patch-0.patch
+ cd "$srcdir"/SJTUTeX
+ make
+ mkdir -p $pkgdir/usr/share/texmf-dist/
+ unzip -o -q release/sjtuthesis.tds.zip -d $pkgdir/usr/share/texmf-dist/
+}
diff --git a/latex-sjtutex-git.install b/latex-sjtutex-git.install
new file mode 100644
index 00000000000..84066228679
--- /dev/null
+++ b/latex-sjtutex-git.install
@@ -0,0 +1,6 @@
+post_install() {
+ mktexlsr
+}
+post_remove() {
+ mktexlsr
+} \ No newline at end of file
diff --git a/patch-0.patch b/patch-0.patch
new file mode 100644
index 00000000000..54bd42828be
--- /dev/null
+++ b/patch-0.patch
@@ -0,0 +1,31 @@
+diff -Naur --exclude .git SJTUTeX/Makefile SJTUTeX-2/Makefile
+--- SJTUTeX/Makefile 2019-12-19 17:35:49.818135779 +0800
++++ SJTUTeX-2/Makefile 2019-12-19 17:19:34.758115668 +0800
+@@ -12,7 +12,7 @@
+ SCRIPTS = $(SOURCE_DIR)/latexmkrc.pl $(SOURCE_DIR)/sample.bat $(SOURCE_DIR)/sample.mk
+ LOGOS = $(LOGO_DIR)/sjtu-badge.pdf $(LOGO_DIR)/sjtu-logo.pdf $(LOGO_DIR)/sjtu-name.pdf
+
+-VERSION = $(shell git describe --tags)
++VERSION = r$(shell git rev-list --count HEAD).$(shell git rev-parse --short HEAD)
+ TEXMF = $(shell kpsewhich --var-value TEXMFHOME)
+
+ TDS_ARCHIVE = $(RELEASE_DIR)/$(PACKAGE).tds.zip
+diff -Naur --exclude .git SJTUTeX/scripts/pack.sh SJTUTeX-2/scripts/pack.sh
+--- SJTUTeX/scripts/pack.sh 2019-12-19 17:35:49.822135780 +0800
++++ SJTUTeX-2/scripts/pack.sh 2019-12-19 18:14:40.960183862 +0800
+@@ -49,6 +49,7 @@
+ cp $LOGO_DIR/sjtu-badge.pdf $TEMP_DIR/
+ cp $LOGO_DIR/sjtu-logo.pdf $TEMP_DIR/
+ cp $LOGO_DIR/sjtu-name.pdf $TEMP_DIR/
++cp $SAMPLE_DIR/sjtuthesis.sty $TEMP_DIR/
+
+ cd $TEMP_DIR
+ xetex --interaction=batchmode $JOB_NAME.dtx >/dev/null
+@@ -65,6 +66,7 @@
+
+ cp $TEMP_DIR/$JOB_NAME.cls $TEX_DIR/
+ cp $TEMP_DIR/*.ltx $TEX_DIR/
++cp $TEMP_DIR/sjtuthesis.sty $TEX_DIR/
+
+ # These files should not be put in doc/
+ cp $TEMP_DIR/sjtu-badge.pdf $TEX_DIR/