diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-08-18 03:03:41 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-08-18 03:03:41 +0000 |
commit | 4202f20703fa96c4d2649cf16f0bc114ebc1d281 (patch) | |
tree | cec398d70ca2dfe17049be6677e2ffa407cc07fb /dev/perl/perl-text-markdown | |
parent | bd7d35dab7b6ee5396301661fd2348d145b22272 (diff) | |
download | slackbuilds-4202f20703fa96c4d2649cf16f0bc114ebc1d281.tar.gz slackbuilds-4202f20703fa96c4d2649cf16f0bc114ebc1d281.tar.bz2 |
perl-html-parser: updating perl-html-parser and adding other perl modules
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2235 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/perl/perl-text-markdown')
-rw-r--r-- | dev/perl/perl-text-markdown/Manifest | 24 | ||||
-rw-r--r-- | dev/perl/perl-text-markdown/perl-text-markdown.SlackBuild | 251 | ||||
-rw-r--r-- | dev/perl/perl-text-markdown/perl-text-markdown.diff | 13 |
3 files changed, 288 insertions, 0 deletions
diff --git a/dev/perl/perl-text-markdown/Manifest b/dev/perl/perl-text-markdown/Manifest new file mode 100644 index 00000000..17ce166c --- /dev/null +++ b/dev/perl/perl-text-markdown/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST Text-Markdown-1.0.24.tar.gz 143401 MD5 471d61df7fdf66a791d66ad37074bd7b RMD160 9c5bf5eca4ac03774d004a56a3b0ee620749c6c5 SHA1 0cdefc25e84d6bdce1cf362200a4bd5a04509a8f SHA256 5f5be987f39960f4fdd1d92d305a61df73870349754469910733cacd0132d0de SHA512 e83c7b151670815c5fddaec1f8c0f388f669949fe7a91b0a759683dd5d8dde43bdd1e907b46e1fce086414f73a5c43dbc8e66ecb3dbe752777466ccc0f9923bd +MKBUILD perl-text-markdown.mkbuild 2406 MD5 d81f4a6ea5f9af8b6ddfd9f6518dc1d2 RMD160 d25c5cf52662324910198fdb18c53af0fa8134a9 SHA1 ea9e762aac176c0a55bf56ee4b14aa7cf0926810 SHA256 63bee4050831e5837416253798f673f6e950af0a8891b5867635934d25f5a56f SHA512 cb86f6c2e437be6c03bcfe972c16b6a02b2bf1c8d1c2416420e96091f2acfc9fd1bdf7e25d62040f5fa32f0c694191ae51582d4aa61f68704a37a23bd96af13f +PATCH perl-text-markdown.diff 496 MD5 e44d5fb0e533186f6c2307ca8efa5982 RMD160 1e6d72808c3d16113fa6355ab779dcec1d655700 SHA1 ed3bf0ee8caefbbada960d6a24dcb26ad893fb4a SHA256 bc05f535c9f53fa6e17a4a2369b1b52330fe08b30e1c33f869ebc54bdc84e6bb SHA512 53849b941d21a3ab168d2e2b04ef7a0e6a40305b6eb84e0b123f378f4fe434ae6828468375a3da6aee3de2c45c91e652c079aa5ff4724b39259f17991373cd98 +SLACKBUILD perl-text-markdown.SlackBuild 8063 MD5 93e7d328b2cf8002200ef34d9da92ea3 RMD160 10aeb133bcb27f3adca493f613dbe95d46b63fbd SHA1 65b4a5c7dd6a1a5b394441e4b2e0936436ca26dd SHA256 7221731a7d0410a733babf6e023e7df70b679766920b6cccbba028c849ce712c SHA512 cf61f7fc2652bb93e2d5a3311648a63db3f17d8d9ff2c6fe6b4ded43655d72f4b59610f592f90b6530c88b236b6a2391085628b117049de303c17d8538f8fcaf +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKihOZAAoJEEHL93ESzgeiVm0QALuISlE7iqHL7XI7WDvE0hOD +ppk8YCmEy+hEzGTF1FLksBS0knp4MJjeX6fR+EN0H8YUs5tImlpjowhSMept8akc +lC0JLkIGaAinelLirZCb/yBlBVvKY4kBRWS/7rJafrXLbTieBBHtF+DGvaO+9k1e +aVgHkqKgeTibmFoMY/iDdnsGJpmCS87StcsyqVnKfldTSr7CN0urMpN3q7GP3Fwc +T8stLwkDbed3oso9fXEvNvbkmj3e3EelqNl/c551GVV4ykwIJqEdI20eLASbb9+W +nOPGZ4d6WL/B4rUG9gvktLbctNnhz7LtMaQT+XSv7P1mG/TSAm9ZYiwS7ifYhbHl +xz7tz+IjlaHRNqTcQP8LCmxr5EiH8QNuCgEMAAUCH94FV2mlN0nqqvz1Y1TvamtJ +4IUsGM4ooiu43Ji7z2IKAQOgwEQjMX5XG1h6QGzUwvdXQyJQsj3DiSb4VoGP5yBw +JHEjbnokNLwwSVEvvbxR1l6HT18QnJwvk7Fk9lq5r9frRziM3krdWiB1MyClZ6Is +DguMlc2WTtplPMjdQDj+YYzX60rVuWHbo/M8wP4ldsKhBLFlEpVkM87iMBN5Xqvt +7bgrcHbgOflZI4wjzvnIOB2LnvIFdp4hAKgqrmSX804ddvBWab+t4cIattTzD7fE +02q9AIJrG3ZrLJtKlU6B +=bu3+ +-----END PGP SIGNATURE----- diff --git a/dev/perl/perl-text-markdown/perl-text-markdown.SlackBuild b/dev/perl/perl-text-markdown/perl-text-markdown.SlackBuild new file mode 100644 index 00000000..1546e0e9 --- /dev/null +++ b/dev/perl/perl-text-markdown/perl-text-markdown.SlackBuild @@ -0,0 +1,251 @@ +#!/bin/bash +# +# perl-text-markdown.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# perl-text-markdown.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for perl-text-markdown, by Silvio Rhatto +# requires: +# tested: perl-text-markdown-1.0.24 +# model: perl.mkSlackBuild $Rev: 796 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="Text-Markdown" +PKG_NAME="perl-text-markdown" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=1.0.24} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="dev/perl/perl-text-markdown"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2" + LIBDIR="$PREFIX/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; + +# Clean up any leftovers of previous builds +rm -rf "$PKG_SRC" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://search.cpan.org/CPAN/authors/id/B/BO/BOBTFISH/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Check Manifest file +if [ -e "$CWD/Manifest" ]; then + + # Manifest signature checking + if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then + echo "Checking Manifest signature..." + gpg --verify $CWD/Manifest + if [ "$?" != "0" ]; then + exit $ERROR_MANIFEST + fi + fi + + MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`" + + for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do + + MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`" + MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`" + MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`" + + if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then + MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE" + else + MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`" + fi + + if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then + continue + fi + + echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..." + + SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`" + SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`" + + # Check source code size + if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then + echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC" + exit $ERROR_MANIFEST + else + echo "Size match." + fi + + # Check source code integrity + for ALGO in md5 sha1 sha256 sha512 rmd160; do + if [ $ALGO = "rmd160" ]; then + ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`" + else + ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`" + fi + ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`" + ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }') + if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then + echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC" + exit $ERROR_MANIFEST + else + echo "$ALGO match." + fi + done + + done + +else + exit $ERROR_MANIFEST +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC=`ls -l | awk '/^d/ { print $8 }'` +cd "$PKG_SRC" + +# Patch source +patches=" [[PATCH URLS]] + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + patch="`basename $patch`" + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$SRC_DIR/$patch" ]; then + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + fi +done + +# Configure +perl Makefile.PL || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Fix .packlist +string="`echo $PKG | sed -e 's/\//\\\\\//g'`" +for file in `find $PKG -name .packlist`; do + sed -e "s/^$string//g" $file > $file.tmp + mv $file.tmp $file +done + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# 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-------------------------------------------| +perl-text-markdown: perl-text-markdown +perl-text-markdown: +perl-text-markdown: Convert Markdown syntax to (X)HTML +perl-text-markdown: +perl-text-markdown: +perl-text-markdown: +perl-text-markdown: +perl-text-markdown: +perl-text-markdown: +perl-text-markdown: +perl-text-markdown: +EODESC + +# Build the package +cd "$PKG" +mkdir -p $REPOS/$SLACKBUILD_PATH +makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/dev/perl/perl-text-markdown/perl-text-markdown.diff b/dev/perl/perl-text-markdown/perl-text-markdown.diff new file mode 100644 index 00000000..d031d1c4 --- /dev/null +++ b/dev/perl/perl-text-markdown/perl-text-markdown.diff @@ -0,0 +1,13 @@ +diff -Naur Text-Markdown-1.0.24.orig/Makefile.PL Text-Markdown-1.0.24/Makefile.PL +--- Text-Markdown-1.0.24.orig/Makefile.PL 2008-10-23 15:30:29.000000000 -0200 ++++ Text-Markdown-1.0.24/Makefile.PL 2009-08-17 23:34:47.000000000 -0300 +@@ -20,7 +20,7 @@ + build_requires 'FindBin' => undef; + + # Scripts I install +-prompt_script('script/Markdown.pl'); +-prompt_script('script/MultiMarkdown.pl'); ++#prompt_script('script/Markdown.pl'); ++#prompt_script('script/MultiMarkdown.pl'); + + WriteAll; |