diff options
author | Jake Merdich | 2018-05-27 20:25:21 -0400 |
---|---|---|
committer | Jake Merdich | 2018-05-27 20:29:57 -0400 |
commit | b19028df2606fbdfb057533b11335e926570c3f9 (patch) | |
tree | 66d8298313760fcbf343898b5eb653e72d56699e | |
download | aur-fmpp.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | fix_opt.patch | 67 |
4 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ecf837bfb104 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = fmpp + pkgdesc = FreeMarker PreProcessor + pkgver = 0.9.15 + pkgrel = 1 + url = http://fmpp.sourceforge.net/ + arch = any + license = Apache + depends = java-runtime + depends = bash + source = http://downloads.sourceforge.net/fmpp/fmpp_0.9.15.tar.gz + source = fix_opt.patch + sha256sums = b893451b5450a7f35fe680e934f6903ec8143d88959dcfca5d17467fbe4142f9 + sha256sums = 8bc9ddb2984d4c75847dea66872b5f322f6f5aabcc3cbb881e796ec3d071936d + +pkgname = fmpp + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0b66fb10a3e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!.SRCINFO +!PKGBUILD +!*.patch +!.gitignore diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a56a3afef413 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Jake Merdich <jake@merdich.com> +pkgname=fmpp +pkgver=0.9.15 +pkgrel=1 +pkgdesc="FreeMarker PreProcessor" +arch=('any') +url="http://fmpp.sourceforge.net/" +license=("Apache") +depends=("java-runtime" "bash") +source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}_${pkgver}.tar.gz" + "fix_opt.patch") +sha256sums=("b893451b5450a7f35fe680e934f6903ec8143d88959dcfca5d17467fbe4142f9" + "8bc9ddb2984d4c75847dea66872b5f322f6f5aabcc3cbb881e796ec3d071936d") + +prepare() { + patch "${srcdir}"/"${pkgname}/bin/fmpp" "${srcdir}/fix_opt.patch" + +} + +package() { + cd "${srcdir}"/"${pkgname}" + install -D bin/fmpp "$pkgdir"/usr/bin/fmpp + + for lib_file in lib/*.jar; do + install -D -m644 "${lib_file}" "${pkgdir}/opt/${pkgname}/${lib_file}" + done + + for lic_file in LICENSE*; do + install -D -m644 "${lic_file}" "${pkgdir}/usr/share/licenses/${pkgname}/${lic_file}" + done +} diff --git a/fix_opt.patch b/fix_opt.patch new file mode 100644 index 000000000000..76bc14bb531a --- /dev/null +++ b/fix_opt.patch @@ -0,0 +1,67 @@ +diff --git a/bin/fmpp b/bin/fmpp +index 35cdd33..50a49d1 100644 +--- a/bin/fmpp ++++ b/bin/fmpp +@@ -39,36 +39,34 @@ if [ -z "$FMPP_HOME" ] ; then + # try to find FMPP + if [ -d /opt/fmpp ] ; then + FMPP_HOME=/opt/fmpp +- fi +- +- if [ -d "${HOME}/opt/fmpp" ] ; then ++ elif [ -d "${HOME}/opt/fmpp" ] ; then + FMPP_HOME="${HOME}/opt/fmpp" ++ else ++ ## resolve links - $0 may be a link to FMPP's home ++ PRG="$0" ++ progname=`basename "$0"` ++ saveddir=`pwd` ++ ++ # need this for relative symlinks ++ cd `dirname "$PRG"` ++ ++ while [ -h "$PRG" ] ; do ++ ls=`ls -ld "$PRG"` ++ link=`expr "$ls" : '.*-> \(.*\)$'` ++ if expr "$link" : '.*/.*' > /dev/null; then ++ PRG="$link" ++ else ++ PRG=`dirname "$PRG"`"/$link" ++ fi ++ done ++ ++ FMPP_HOME=`dirname "$PRG"`/.. ++ ++ cd "$saveddir" ++ ++ # make it fully qualified ++ FMPP_HOME=`cd "$FMPP_HOME" && pwd` + fi +- +- ## resolve links - $0 may be a link to FMPP's home +- PRG="$0" +- progname=`basename "$0"` +- saveddir=`pwd` +- +- # need this for relative symlinks +- cd `dirname "$PRG"` +- +- while [ -h "$PRG" ] ; do +- ls=`ls -ld "$PRG"` +- link=`expr "$ls" : '.*-> \(.*\)$'` +- if expr "$link" : '.*/.*' > /dev/null; then +- PRG="$link" +- else +- PRG=`dirname "$PRG"`"/$link" +- fi +- done +- +- FMPP_HOME=`dirname "$PRG"`/.. +- +- cd "$saveddir" +- +- # make it fully qualified +- FMPP_HOME=`cd "$FMPP_HOME" && pwd` + fi + + # For Cygwin, ensure paths are in UNIX format before anything is touched |