summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-09-02 08:18:59 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-09-02 08:18:59 +0200
commit44c5e267fd72b6737a6fbb9737c721aa4c8a4e16 (patch)
treefa3dc7369484175b856bc8e23ca9e8b2a488b94d
parent1f375518338db6dfec72493298e31a954271864d (diff)
downloadarch-packages-44c5e267fd72b6737a6fbb9737c721aa4c8a4e16.tar.gz
luatex-svn: first draft PKGBUILD
-rw-r--r--luatex-svn/PKGBUILD78
1 files changed, 78 insertions, 0 deletions
diff --git a/luatex-svn/PKGBUILD b/luatex-svn/PKGBUILD
new file mode 100644
index 0000000..226d86e
--- /dev/null
+++ b/luatex-svn/PKGBUILD
@@ -0,0 +1,78 @@
+# Luatex SVN Trunk
+# Maintainer: Philipp Gesang <phg@phi-gamma.net>
+#
+
+pkgname=luatex-svn
+pkgrel=1
+pkgdesc="The LuaTeX engine, current SVN trunk"
+pkgver=r0
+arch=(i686 x86_64)
+url="http://www.luatex.org"
+license=('GPLv2')
+depends=()
+makedepends=()
+conflicts=()
+source=()
+
+_svnlocal="${pkgname}-trunk"
+_svnurl="https://foundry.supelec.fr/svn/luatex/trunk"
+_svncred=anonsvn
+
+pkgver() {
+ cd "${_svnlocal}"
+ local version="$(svnversion)"
+ msg "Repo reports revision ${version}"
+ printf "r%d" "${ver//[[:alpha:]]}"
+}
+
+prepare() {
+ cd "${srcdir}"
+ if [[ -d "${_svnlocal}/.svn" ]]; then
+ msg "Reusing existing SVN repository at ${_svnlocal}"
+ cd "${_svnlocal}"
+ svn update --username "${_svncred}" --password "${_svncred}"
+ else
+ msg "No local Subversion repo found, creating new one at ${_svnlocal}"
+ svn checkout --username "${_svncred}" --password "${_svncred}" \
+ "${_svnurl}" "${_svnlocal}"
+ fi
+ msg "Repo up to date"
+}
+
+build() {
+ local reporoot="${srcdir}/${_svnlocal}"
+ msg "Initiating debug build at ${reporoot}"
+ cd "${reporoot}"
+ ./build.sh --debug --parallel
+ cp source/texk/web2c/man/luatex.man build/doc/luatex.1
+ gzip build/doc/luatex.1
+}
+
+check() {
+ local reporoot="${srcdir}/${_svnlocal}"
+ local bin="${reporoot}/build/texk/web2c/luatex"
+ msg "Verify executable ${bin}"
+ [ -x "${bin}" ] || exit -1
+}
+
+package() {
+ local reporoot="${srcdir}/${_svnlocal}"
+ local bin="build/texk/web2c/luatex"
+ cd "${reporoot}"
+ msg "Package executable ${bin}"
+ install -dm755 "${pkgdir}/usr/bin/"
+ install -Dm755 "${bin}" "${pkgdir}/usr/bin/"
+ ln -s luatex "${pkgdir}/usr/bin/texlua"
+ ln -s luatex "${pkgdir}/usr/bin/texluac"
+
+ msg "Package luatex man page"
+ install -dm755 "${pkgdir}/usr/share/man/man1"
+ install -Dm644 build/doc/luatex.1.gz "${pkgdir}/usr/share/man/man1/"
+ msg "Package miscellaneous files"
+ install -dm755 "${pkgdir}/usr/share/${pkgname}/"
+ install -Dm644 COPYING INSTALL README "${pkgdir}/usr/share/${pkgname}/"
+ install -Dm644 doc/luatex.pdf "${pkgdir}/usr/share/${pkgname}/"
+}
+
+# vim:ft=sh:et:sw=2
+