From 44c5e267fd72b6737a6fbb9737c721aa4c8a4e16 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 2 Sep 2016 08:18:59 +0200 Subject: luatex-svn: first draft PKGBUILD --- luatex-svn/PKGBUILD | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 luatex-svn/PKGBUILD 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 +# + +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 + -- cgit v1.2.3