misc/discount: Added (Markdown text to html)

Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
Antonio Hernández Blas 2011-05-29 20:20:57 -03:00 committed by Robby Workman
parent a1c1f240f2
commit b6780c6fd2
4 changed files with 152 additions and 0 deletions

7
misc/discount/README Normal file
View File

@ -0,0 +1,7 @@
discount (An implementation of Markdown text to html language in C)
This is an implementation of John Grubers Markdown text to html
language written by David Loren Parsons. Theres not much that
differentiates it from any of the existing Markdown implementations
except that its written in C instead of one of the vast flock of
scripting languages that are fighting it out for the Perl crown.

View File

@ -0,0 +1,116 @@
#!/bin/sh
# Slackware build script for discount
# Copyright (c) 2011, Antonio Hernández Blas <hba.nihilismus@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1.- Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=discount
VERSION=${VERSION:-2.0.9}
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
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# Disable ldconfig use during 'make install'
sed -i 's/LDCONFIG=.*$/LDCONFIG=true/g' configure.inc
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure.sh \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--confdir=/etc \
--mandir=/usr/man \
--with-dl=Both \
--with-id-anchor \
--with-github-tags \
--enable-all-features \
--shared
make
mkdir -p $PKG/usr/{bin,lib${LIBDIRSUFFIX},include}
make install.everything DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
if [ -d $PKG/usr/share/man ]; then
mv $PKG/usr/share/man $PKG/usr
fi
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
COPYRIGHT CREDITS INSTALL README VERSION \
$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="discount"
VERSION="2.0.9"
HOMEPAGE="http://www.pell.portland.or.us/~orc/Code/discount/"
DOWNLOAD="http://www.pell.portland.or.us/~orc/Code/discount/discount-2.0.9.tar.bz2"
MD5SUM="97b993f19c554640a7cc9b35bf452866"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Antonio Hernández Blas"
EMAIL="hba.nihilismus@gmail.com"
APPROVED="Niels Horn"

19
misc/discount/slack-desc Normal file
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 ':'.
|-----handy-ruler------------------------------------------------------|
discount: discount (An implementation of Markdown text to html language in C)
discount:
discount: This is an implementation of John Grubers Markdown text to html
discount: language written by David Loren Parsons. Theres not much that
discount: differentiates it from any of the existing Markdown implementations
discount: except that its written in C instead of one of the vast flock of
discount: scripting languages that are fighting it out for the Perl crown.
discount:
discount: Homepage: http://www.pell.portland.or.us/~orc/Code/discount/
discount:
discount: