libraries/Smarty: (PHP template engine)

Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
Andrzej Telszewski 2011-07-28 10:55:44 -03:00 committed by Niels Horn
parent 3dfc7de500
commit aafa0914ac
4 changed files with 119 additions and 0 deletions

31
libraries/Smarty/README Normal file
View file

@ -0,0 +1,31 @@
Smarty is a template engine for PHP. More specifically, it facilitates a
manageable way to separate application logic and content from its
presentation. This is best described in a situation where the application
programmer and the template designer play different roles, or in most cases
are not the same person.
Some of Smarty's features:
* It is extremely fast.
* It is efficient since the PHP parser does the dirty work.
* No template parsing overhead, only compiles once.
* It is smart about recompiling only the template files that have changed.
* You can easily create your own custom functions and variable modifiers,
so the template language is extremely extensible.
* Configurable template {delimiter} tag syntax, so you can use
{$foo}, {{$foo}}, <!--{$foo}-->, etc.
* The {if}..{elseif}..{else}..{/if} constructs are passed to the PHP
parser, so the {if...} expression syntax can be as simple or as complex
an evaluation as you like.
* Allows unlimited nesting of sections, if's etc.
* Built-in caching support
* Arbitrary template sources
* Custom cache handling functions
* Template Inheritance for easy management of template content.
* Plugin architecture
See the Documentation at http://www.smarty.net/documentation for
instructions on how to configure PHP & Smarty to work together.
Smarty gets installed under /usr/lib/php/Smarty, so to use it, in standard
configuration it should be enough to use the following PHP code:
require_once( 'Smarty/Smarty.class.php' );

View file

@ -0,0 +1,59 @@
#!/bin/sh
# Slackware build script for Smarty
# Written by Andrzej Telszewski <atelszewski@gmail.com>
PRGNAM=Smarty
VERSION=${VERSION:-3.0.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
else
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/php/Smarty
cp -a libs/* $PKG/usr/lib$LIBDIRSUFFIX/php/Smarty
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a demo change_log.txt COPYING.lib README SMARTY2_BC_NOTES \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,10 @@
PRGNAM="Smarty"
VERSION="3.0.8"
HOMEPAGE="http://www.smarty.net/"
DOWNLOAD="http://www.smarty.net/files/Smarty-3.0.8.tar.gz"
MD5SUM="21d8a35d86a21618b01f34b00a7a02cf"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Andrzej Telszewski"
EMAIL="atelszewski@gmail.com"
APPROVED="Niels Horn"

View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
Smarty: Smarty (PHP template engine)
Smarty:
Smarty: Smarty is a template engine for PHP, which facilitates a manageable
Smarty: way to separate application logic and content from its presentation.
Smarty:
Smarty: Homepage: http://www.smarty.net/
Smarty:
Smarty:
Smarty:
Smarty:
Smarty: