summaryrefslogtreecommitdiff
path: root/luatex-svn
diff options
context:
space:
mode:
Diffstat (limited to 'luatex-svn')
-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
+