h1. Installing Wt on Slackware
- Table of contents
- boost library
- asio library _*' --(no asio stand alone and no boost asio)--
- mxml
- fastcgi lib
- fastcgi apache mod
- ICU
- mysql++
- wt
By Miguel Suarez Xavier Penteado miguel_penteado@fca.unesp.br
(sorry by poor english)
In slackware 12 we have not in default installation
boost library¶
asio library _*' --(no asio stand alone and no boost asio)--¶
mxml¶
fastcgi lib¶
fastcgi apache mod¶
ICU¶
mysql++¶
wt¶
Then, we need build each previous packages and install it before try compile witty.
Slackare 12 use slackbuilds to build packges, so we will put here the slackbuilds for packages above
Remember all packets will be generated in /tmp directory
h3. boost 1.34.1 Slackbuild
Before you ctr+c the follow boost.Slackbuild, you need to create the patch files used by script in same dir where you will save boost.Slackbuild.
boost_bjam-gcc42_mod.patch
Index: tools/jam/src/build.sh
--- tools/jam/src/build.sh.orig 2006-02-03 17:57:42 +0100
+++ tools/jam/src/build.sh 2007-06-17 13:54:31 +0200
@@ -127,7 +127,7 @@
;;
gcc)
- BOOST_JAM_CC=gcc
BOOST_JAM_CC="gcc -O0"
;;darwin)
Index: tools/jam/src/build.jam
--- tools/jam/src/build.jam.orig 2007-06-17 14:07:34 +0200
+++ tools/jam/src/build.jam 2007-06-17 14:08:21 +0200
@@ -153,7 +153,7 @@GCC 2.x, 3.x, 4.x¶
toolset gcc gcc : "-o " : -D
: -pedantic[ opt --release : [ opt --symbols : -g : -s ] -O3 ]
[ opt --release : [ opt --symbols : -g : -s ] -O0 ]
[ opt --debug : -g -O0 -fno-inline ]
-I$(--python-include) -Wno-long-long
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
boost-configure.patch
*** configure.orig 2007-01-16 01:39:00.000000000 +0100
--- configure 2007-01-19 03:53:08.000000000 +0100
*** 9,15 ****
BJAM=""
TOOLSET=""
! BJAM_CONFIG=""
BUILD=""
PREFIX=/usr/local
EPREFIX=
--- 9,15 ----
BJAM=""
TOOLSET=""
! BJAM_CONFIG="-d2 --layout=system variant=release debug-symbols=on"
BUILD=""
PREFIX=/usr/local
EPREFIX=
*************** INCLUDEDIR=$INCLUDEDIR
*** 325,332 ****
LIBS=$LIBS
all: .dummy
! @echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS)"
! @\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) || \
echo "Not all Boost libraries built properly."
clean: .dummy
--- 325,332 ----
LIBS=$LIBS
all: .dummy
! @echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) stage"
! @\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) stage || \
echo "Not all Boost libraries built properly."
clean: .dummy
boost-gcc-soname.patch
*** tools/build/v2/tools/gcc.jam.orig 2007-05-03 08:09:04.000000000 +0200
--- tools/build/v2/tools/gcc.jam 2007-06-26 20:37:44.000000000 +0200
*************** if [ os.name ] != NT && [ os.name ] != O
*** 316,322 ****
# expected, therefore it has been disabled.
HAVE_SONAME = "" ;
! SONAME_OPTION = -h ;
}
--- 316,323 ----
# expected, therefore it has been disabled.
HAVE_SONAME = "" ;
! SONAME_OPTION = -soname ;
! SONAME_VERSION = 3 ;
}
*************** rule link.dll ( targets * : sources * :
*** 631,637 ****
# Differ from 'link' above only by -shared.
actions link.dll bind LIBRARIES
{
! "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}
# Set up threading support. It's somewhat contrived, so perform it at the end,
--- 632,638 ----
# Differ from 'link' above only by -shared.
actions link.dll bind LIBRARIES
{
! "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=).$(SONAME_VERSION) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}
# Set up threading support. It's somewhat contrived, so perform it at the end,
boost-use-rpm-optflags.patch
*** tools/build/v2/tools/gcc.jam.orig 2007-08-01 01:17:16.000000000 -0500
--- tools/build/v2/tools/gcc.jam 2007-08-01 01:17:46.000000000 -0500
*************** flags gcc.compile PCH_FILE on : <pc
*** 268,274 ****
# Declare flags and action for compilation
flags gcc.compile OPTIONS off : -O0 ;
! flags gcc.compile OPTIONS speed : -O3 ;
flags gcc.compile OPTIONS space : -Os ;
flags gcc.compile OPTIONS off : -fno-inline ;
--- 268,274 ----
# Declare flags and action for compilation
flags gcc.compile OPTIONS off : -O0 ;
! flags gcc.compile OPTIONS speed : "$RPM_OPT_FLAGS" ;
flags gcc.compile OPTIONS space : -Os ;
flags gcc.compile OPTIONS off : -fno-inline ;
Now you need download im place where you put patches ( and will put boost.Slackbuild ) the sorces used by scripts of corse. If you to read boost.script , will see script uses two files in build process:
boost_asio on http://sourceforge.net/project/showfiles.php?group_id=122478 or if you prefer directly on
http://easynews.dl.sourceforge.net/sourceforge/asio/asio-0.3.8rc3.tar.gz
Adobe GPL GIL (just for enhace your boost lib) on http://opensource.adobe.com/gil/download.html or directly on http://opensource.adobe.com/gil/gil.tar.gz
finily _' boost 1.34.1 _' on http://sourceforge.net/project/showfiles.php?group_id=7586 or directly on
http://easynews.dl.sourceforge.net/sourceforge/boost/boost_1_34_1.tar.bz2
(boost.Slackbuild will compile your bjam -ARGH!!- (a ./configure like autotool system) ) in your system , and you will not need download bjam binary.
This Slackbuild is based on boost.SlackBuild,v 1.6 2007/09/04 of Eric Hameleers alien@slackware.com
and boost.spec from boost-1.34.0-2.el5.src.rpm from Red Hat Enterprise linux
boost.Slackbuild
#!/bin/sh
# $Id: boost.SlackBuild,v 1.6 2007/09/04 23:08:43 root Exp root $
# Copyright (c) 2007 Eric Hameleers alien@slackware.com
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
# any purpose with or without fee is hereby granted, provided that
# the above copyright notice and this permission notice appear in all
# copies.
#
# THIS SOFTWARE IS PROVIDED ``AS IS*_ AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
# CONTRIBUTORS 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.
#
# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers alien@slackware.com
# For: boost
# Descr: collection of portable C++ source libraries
# URL: http://www.boost.org/
# Needs:
# Changelog:
# 1.34.1-1 01/10/2007 by Miguel Suarez Xavier Penteado
# 1.33.1-1: 23/Dec/2006 by Eric Hameleers alien@slackware.com
# * Initial build.
# 1.34.0-1: 04/Sep/2007 by Eric Hameleers alien@slackware.com
# * Update, Slackware 12.0 package.
#
# Run 'sh boost.SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
# Set initial variables:
echo "Setting variables ..."
echo "Setando variaveis ..."
PRGNAM=boost
VERSION=${VERSION:-1.34.1}
SRCVER=$(echo ${VERSION} | tr '.' '_')
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
# This is the python we build against:
PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
PYTHON_FLAGS="-sPYTHON_ROOT=/usr -sPYTHON_VERSION=$PYTHON_VERSION"
DOCS="README LICENSE_1_0.txt people wiki"
# Where do we look for sources?
CWD=$(pwd)
SRCDIR=$(dirname $0)
[ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR}
# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
###################################################################################
ASIO=boost_asio
VER_ASIO="0_3_8rc3"
SOURCE_ASIO="$SRCDIR/${ASIO}_${VER_ASIO}.tar.gz"
PKG_ASIO=$TMP/package-$ASIO
###################################################################################
###################################################################################
GIL=gil
VER_GIL="2.1.1"
SOURCE_GIL="$SRCDIR/${GIL}-${VER_GIL}.tar.gz"
PKG_GIL=$TMP/package-$GIL
###################################################################################
# Input URL: http://dl.sourceforge.net/boost/boost_1_34_1.tar.gz
SOURCE="$SRCDIR/${PRGNAM}${SRCVER}.tar.gz"
SRCURL="http://dl.sourceforge.net/${PRGNAM}/${PRGNAM}${SRCVER}.tar.gz"
# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
# Catch unitialized variables:
set -u
P1=${1:-1}
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"Setando a vers~ao de gcc para 3.3.x ou 4.2.x" ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
# Slackware 11 and up need other option (gcc > 3.3.x)
if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then
MOPT=tune
else
MOPT=cpu
fi
case "$ARCH" in
i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
s390) SLKCFLAGS="-O2"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
powerpc) SLKCFLAGS="-O2"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
esac
# Create working directories:
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
rm -rf $TMP/tmp-$PRGNAM/* # By default we remove the remnants of previous build
mkdir -p $PKG # place for the package to be built
rm -rf $PKG/* # We always erase old package's contents:
mkdir -p $OUTPUT # place for the package to be saved
# Source file availability:
if ! [ -f ${SOURCE} ]; then
if ! [ "x${SRCURL}" == "x" ]; then
# Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
[ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
echo "Source '$(basename ${SOURCE})' not available yet..."
echo "Will download file to $(dirname $SOURCE)"
wget -nv --connect-timeout=30 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
exit 1
fi
else
echo "File '$(basename ${SOURCE})' not available... aborting the build."
exit 1
fi
fi
if [ "$P1" == "--download" ]; then
echo "Download complete."
exit 0
fi
#################################################################################################
# --- PACKAGE BUILDING ---
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"extraindo arquivos" ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;36;40m'
echo "++================="
echo "|| $PRGNAM-$VERSION"
echo "++================="
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
if $(file ${SOURCE} | grep -q ": bzip2"); then
tar -xjvf ${SOURCE}
elif $(file ${SOURCE} | grep -q ": gzip"); then
tar -xzvf ${SOURCE}
fi
mv ${PRGNAM}_${SRCVER} ${PRGNAM}-${VERSION}
cd ${PRGNAM}-${VERSION}
BUILD_DIR_BOOST=pwd
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
#################################################################################################
mkdir -p $TMP/tmp-$ASIO # location to build the source
rm -rf $TMP/tmp-$ASIO/* # By default we remove the remnants of previous build
cd $TMP/tmp-$ASIO
echo "Extracting the SOURCE_ASIO archive(s) for $ASIO..."
if $(file ${SOURCE_ASIO} | grep -q ": bzip2"); then
tar -xjvf ${SOURCE_ASIO}
elif $(file ${SOURCE_ASIO} | grep -q ": gzip"); then
tar -xzvf ${SOURCE_ASIO}
fi
mv ${ASIO}_${VER_ASIO} ${ASIO}-${VER_ASIO}
cd ${ASIO}-${VER_ASIO}
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
cp -a boost/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}
cp -a libs/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}
#################################################################################################
#################################################################################################
mkdir -p $TMP/tmp-$GIL # location to build the source
rm -rf $TMP/tmp-$GIL/* # By default we remove the remnants of previous build
cd $TMP/tmp-$GIL
echo "Extracting the SOURCE_GIL archive(s) for $GIL..."
if $(file ${SOURCE_GIL} | grep -q ": bzip2"); then
tar -xjvf ${SOURCE_GIL}
elif $(file ${SOURCE_GIL} | grep -q ": gzip"); then
tar -xzvf ${SOURCE_GIL}
fi
cd ${GIL}-${VER_GIL}
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
cp -a boost/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}
cp -a libs/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}
#################################################################################################
cd $BUILD_DIR_BOOST
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"aplicando o patch para gcc 4.2.x " ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
cp -a $CWD/boost_bjam-gcc42_mod.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
patch -p0 < boost_bjam-gcc42_mod.patch
# echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
# echo -e '\E[01;33;40m'"aplicando o patch para Thread " ;tput sgr0;
# echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
# echo -e '\E[01;32;40m'
#
# cp -a $CWD/boost-thread.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
#
# patch -p0 < boost-thread.patch
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"aplicando o patch para Configure " ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
cp -a $CWD/boost-configure.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
patch -p0 < boost-configure.patch
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"aplicando o patch para boost-gcc-soname.patch " ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
cp -a $CWD/boost-gcc-soname.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
patch -p0 < boost-gcc-soname.patch
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"aplicando o patch para boost-use-rpm-optflags.patch " ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
cp -a $CWD/boost-use-rpm-optflags.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
patch -p0 < boost-use-rpm-optflags.patch
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"Construindo BJAM " ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;36;40m'
echo Building ...
export LDFLAGS="$SLKLDFLAGS"
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
BOOST_ROOT=pwd
staged_dir=stage
export BOOST_ROOT
# First build bjam, the boost build system:
( cd tools/jam/src
./build.sh gcc 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
) || exit $?
BJAM=$(find tools/jam/src/ -name bjam -a -type f)
# Create build subdirectory
mkdir -p obj
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"Configure " ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
#"-sBUILD=speed shared static full single/multi "
# Next, we build boost using bjam
echo "Building boost now..."
$BJAM \
release \
"-d2 -sBUILD= shared multi " \
"-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=/usr/include" "-sZLIB_LIBPATH=/usr/lib" \
"-sBZIP2_INCLUDE=/usr/include" "-sBZIP2_LIBPATH=/usr/lib" \
--toolset=gcc --layout=system --builddir=obj \
--prefix=/usr \
$PYTHON_FLAGS \
stage \
2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
# ./configure \
# --with-bjam=$BJAM \
# --with-toolset=gcc \
# --prefix=/usr \
# --with-libraries=all \
# --with-python=/usr/bin/python \
# --with-python-root=/usr \
# --with-python-version=$PYTHON_VERSION
# #--with-icu \
# #--with-icu=DIR \
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"Construindo boost " ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'
# make all
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"Instalando o boost em pwd
" ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;34;40m'
echo "Installing boost now..."
$BJAM \
release \
--toolset=gcc --layout=system --link=shared --builddir=obj \
--prefix=$PKG/usr \
$PYTHON_FLAGS \
install \
2>&1 | tee $OUTPUT/install-${PRGNAM}.log
# And then install boost..
mkdir -p $PKG/usr/{bin,lib,include}
mkdir -p $PKG/usr/share/${PRGNAM}-${VERSION}
cp -a $BJAM $PKG/usr/bin
#install lib
for i in find stage -type f -name \*.a
; do
NAME=basename $i
;
install -p -m 0644 $i $PKG/usr/lib/$NAME;
done;
for i in find stage -type f -name \*.so
; do
NAME=$i;
SONAME=$i.3;
VNAME=$i.${VERSION};
base=basename $i
;
NAMEbase=$base;
SONAMEbase=$base.3;
VNAMEbase=$base.${VERSION};
mv $i $VNAME;
ln -s $VNAMEbase $SONAME;
ln -s $VNAMEbase $NAME;
install -p -m 755 $VNAME $PKG/usr/lib/$VNAMEbase;
mv $SONAME $PKG/usr/lib/$SONAMEbase;
mv $NAME $PKG/usr/lib/$NAMEbase;
done;
## Move incorrectly installed include files
if [ -d $PKG/usr/include/${PRGNAM}-${VERSION} ]; then
echo -e '\E[01;33;40m'"Movendo os Includes boost para $PKG/usr/include/ " ;tput sgr0;
echo -e '\E[01;34;40m'
mv $PKG/usr/include/${PRGNAM}-${VERSION}/boost $PKG/usr/include/
rmdir $PKG/usr/include/${PRGNAM}-${VERSION}
fi
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
# Strip binaries:
cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
cd -
# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
if [ -f $SRCDIR/doinst.sh ]; then
cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
fi
# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5
cd -
cat $PKG/install/slack-desc | grep "${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt
# Clean up the extra stuff:
if [ "$P1" = "--cleanup" ]; then
rm -rf $TMP/tmp-$PRGNAM
rm -rf $PKG
fi
tput sgr0;
h3. asio 0.3.7 standalone library Slackbuild
Next step: we will patch and compile asio-0.3.7.tar.gz . Use asio 0.3.7 version , is working.
#Patch asio-0.3.7 standalone
asio_openssl_init.patch
--- ./include/asio/ssl/detail/openssl_init.hpp.orig 2006-11-15 00:10:08.000000000 +0100
+++ ./include/asio/ssl/detail/openssl_init.hpp 2006-11-15 00:10:38.000000000 +0100
@@ -45,13 +45,13 @@
{
::SSL_library_init();
::SSL_load_error_strings();
::OpenSSL_add_ssl_algorithms(); mutexes_.resize(::CRYPTO_num_locks()); for (size_t i = 0; i < mutexes_.size(); ++i) mutexes_[i].reset(new asio::detail::mutex); ::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);
::OpenSSL_add_ssl_algorithms(); }
}
Getting Asio 0.3.7 library
You may open asio's homepage http://asio.sourceforge.net/ or get asio with this direct link
http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/a/as/asio/asio-0.3.7.tar.gz
asio.Slackbuild
#!/bin/sh
PRGNAM=asio
VERSION=0.3.7
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-MSXP}
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
echo -e '\E[01;32;40m'"*************************************************************";tput sgr0;
echo -e '\E[01;33;40m'"aplicando o patch para $TMP/$PRGNAM-$VERSION empwd
" ;tput sgr0;
echo -e '\E[01;32;40m'"*************************************************************";tput sgr0;
echo -e '\E[01;32;40m'
cp -a $CWD/asio_openssl_init.patch $TMP/$PRGNAM-$VERSION/
patch -p0 < asio_openssl_init.patch
echo -e '\E[01;32;40m'"*************************************************************";tput sgr0;
echo -e '\E[01;33;40m'"execucao do script configure para $PRGNAM-$VERSION empwd
" ;tput sgr0;
echo -e '\E[01;32;40m'"*************************************************************";tput sgr0;
echo -e '\E[01;36;40m'
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-boost=/usr \
--with-openssl=/usr
echo -e '\E[01;32;40m'"*************************************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"execucao de make configure para $PRGNAM-$VERSION empwd
" ;tput sgr0;
echo -e '\E[01;32;40m'"*************************************************************" ;tput sgr0;
echo -e '\E[01;34;40m'
make
echo -e '\E[01;32;40m'"***************************************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"execucao de make install configure para $PRGNAM-$VERSION empwd
" ;tput sgr0;
echo -e '\E[01;32;40m'"***************************************************************" ;tput sgr0;
echo -e '\E[01;33;40m'
make install DESTDIR=$PKG
echo -e '\E[01;32;40m'"*************************************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"Criando o pacote $PRGNAM-$VERSION empwd
" ;tput sgr0;
echo -e '\E[01;32;40m'"*************************************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
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/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
tput sgr0;
h3. mxml 2.3 library Slackbuild
Next step we will download Mini XML 2.3 version on
http://www.minixml.org/software.php or in direct link
http://ftp.easysw.com/pub/mxml/2.3/mxml-2.3.tar.gz
mxml.SlackBuild
#!/bin/sh
# Slackware build script for mxml
# Original form Written by Chess Griffin
# Adapted by Miguel Suarez Xavier Penteado
PRGNAM=mxml
VERSION=2.3
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-MSXP}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;33;40m'"Confire mxml in pwd
";tput sgr0;
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;35;40m';
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-static=no
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;33;40m'"make mxml in pwd
";tput sgr0;
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;36;40m';
make
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;33;40m'"make install mxml in pwd
";tput sgr0;
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;37;40m';
make install BUILDROOT=$PKG
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;33;40m'" Building packge mxml in pwd
";tput sgr0;
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;35;40m';
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/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
tput sgr0;
h3. Fastcgi-2.4.0 Slackbuild
This slackbuild will install fastcgi library in your Slackware 12 ! You will need Fastcgi library plus apache modules. Lets get Library first.
You can download fcgi sorces at http://www.fastcgi.com/ or in this direct link
http://www.fastcgi.com/dist/fcgi.tar.gz You will get 2.4.0 version
Before, you must save this patch in sources tar directory
The patch have 5.117 lines ... sorry try without him
then you may use fastcgi.Slackbuild
fastcgi.Slackbuild
#!/bin/sh
# Slackware build script for mysql++
# Written by Chess Griffin
# Adapted by Miguel Suarez Xavier Penteado
PRGNAM=fcgi
VERSION=2.4.0
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-MSXP}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
#tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
tar -xzvf $CWD/$PRGNAM.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
chmod a-x include/fcgios.h libfcgi/os_unix.c
cp $CWD/fcgi-2.4.0-autotools.patch $PKG/$PRGNAM-$VERSION
patch -p0 < $PKG/$PRGNAM-$VERSION/fcgi-2.4.0-autotools.patch
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"configurando em "pwd
;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;36;40m'
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"make em "pwd
;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
make
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"make install "pwd
;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;38;40m'
make install DESTDIR=$PKG
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/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
tput sgr0;
h3. Modfastcgi-2.4.2 for apache Slackbuild
The mod_fastcgi will generate a patch for your apache 2.x.x modules
Get the module source http://www.fastcgi.com/ or directly here
http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
patch
mod_fastcgi-2.4.2-update.patch
sorry, to big 774 lines ... search in google, or try without it
Patch for you save in Sorce + Slackbuilds dir
_' mod_fastcgi-2.4.2-apache2.2.patch
--- mod_fastcgi-2.4.2/fcgi.h 2006-03-22 16:59:55.000000000 +0000
+++ mod_fastcgi-2.4.2/fcgi.h 2006-03-22 17:04:41.000000000 +0000
@@ -73,6 +73,36 @@
#define ap_reset_timeout(a)
#define ap_unblock_alarms()
+/* starting with apache 2.2 the backward-compatibility defines for
- * 1.3 APIs are not available anymore. Define them ourselves here.
- / +#ifndef ap_copy_table + +#define ap_copy_table apr_table_copy +#define ap_cpystrn apr_cpystrn +#define ap_destroy_pool apr_pool_destroy +#define ap_isspace apr_isspace +#define ap_make_array apr_array_make +#define ap_make_table apr_table_make +#define ap_null_cleanup apr_pool_cleanup_null +#define ap_palloc apr_palloc +#define ap_pcalloc apr_pcalloc +#define ap_psprintf apr_psprintf +#define ap_pstrcat apr_pstrcat +#define ap_pstrdup apr_pstrdup +#define ap_pstrndup apr_pstrndup +#define ap_push_array apr_array_push +#define ap_register_cleanup apr_pool_cleanup_register +#define ap_snprintf apr_snprintf +#define ap_table_add apr_table_add +#define ap_table_do apr_table_do +#define ap_table_get apr_table_get +#define ap_table_set apr_table_set +#define ap_table_setn apr_table_setn +#define ap_table_unset apr_table_unset + +#endif / defined(ap_copy_table) */ + #if (defined(HAVE_WRITEV) && !HAVE_WRITEV && !defined(NO_WRITEV)) || defined WIN32 #define NO_WRITEV #endif --- mod_fastcgi-2.4.2/Makefile.AP2 2006-03-22 17:04:55.000000000 +0000 +++ mod_fastcgi-2.4.2/Makefile.AP2 2006-03-22 17:05:22.000000000 +0000 @@ -20,8 +20,6 @@
all: local-shared-build
-install: install-modules
-
clean:
-rm -f *.o *.lo *.slo *.la
Outro patch para voce slavar junto ao fonte e aos slackbuilds
_' mod_fastcgi-2.4.2-fix_warnings.patch
--- mod_fastcgi-2.4.2/fcgi_config.c 2007-05-25 16:01:49.000000000 +0200
+++ mod_fastcgi-2.4.2/fcgi_config.c 2007-05-25 16:06:42.000000000 +0200
@@ -694,7 +694,7 @@
return invalid_value(tp, name, fs_path, option, err);
}
else if (strcasecmp(option, "-min-server-life") == 0) {
- if ((err = get_int(tp, &arg, &s->minServerLife, 0)))
- if ((err = get_u_int(tp, &arg, &s->minServerLife, 0))) return invalid_value(tp, name, NULL, option, err); } else if (strcasecmp(option, "-priority") == 0) { @@ -763,12 +763,12 @@ { if (s->group == NULL) {
- s->group = ap_psprintf(tp, "#%ld", fcgi_util_get_server_gid(cmd->server));
s->group = ap_psprintf(tp, "#%d", fcgi_util_get_server_gid(cmd->server)); } if (s->user == NULL) {
s->user = ap_psprintf(p, "#%ld", fcgi_util_get_server_uid(cmd->server));
s->user = ap_psprintf(p, "#%d", fcgi_util_get_server_uid(cmd->server)); } s->uid = ap_uname2id(s->user);
@@ -954,12 +954,12 @@
{
if (s->group == NULL)
{s->group = ap_psprintf(tp, "#%ld", fcgi_util_get_server_gid(cmd->server));
s->group = ap_psprintf(tp, "#%d", fcgi_util_get_server_gid(cmd->server)); } if (s->user == NULL) {
s->user = ap_psprintf(p, "#%ld", fcgi_util_get_server_uid(cmd->server));
s->user = ap_psprintf(p, "#%d", fcgi_util_get_server_uid(cmd->server)); } s->uid = ap_uname2id(s->user);
fastcgi.conf
# This is the Apache server configuration file providing FastCGI support..
#
# Documentation is available at http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html
LoadModule fastcgi_module lib/httpd/modules/mod_fastcgi.so
# To use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fastcgi-script fcg fcgi fpl
doinst.sh
cp /etc/httpd/httpd.conf /etc/httpd/httpd.old
echo "Include /etc/httpd/extra/fastcgi.conf" >> /etc/httpd/httpd.conf
echo "Restarting httpd ..."
sh /etc/rc.d/rc.httpd restart
slack-desc
|-----handy-ruler------------------------------------------------------|
mod_fastcgi: mod_fastcgi 2.4.2
mod_fastcgi:
mod_fastcgi: A fastcgi module for httpd
mod_fastcgi:
mod_fastcgi:
mod_fastcgi:
mod_fastcgi:
mod_fastcgi:
mod_fastcgi:
mod_fastcgi:
*modfastcgi.Slackbuild
#!/bin/sh
#
# $Id: mod_fastcgi-server.SlackBuild 275 2005-03-08 01:20:25Z freerock $
CWD=pwd
TMP=${TMP:-/tmp}
PKG=$TMP/package-mod_fastcgi
VERSION=2.4.2
ARCH=${ARCH:-i486}
BUILD=1
if [ ! -d $TMP ]; then
mkdir -p $TMP # location to build the source
fi
rm -rf $PKG
mkdir -p $PKG
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
cd $TMP
tar xzvf $CWD/mod_fastcgi-$VERSION.tar.gz
cd mod_fastcgi-$VERSION
echo "copiando patch ..."
cp $CWD/mod_fastcgi-2.4.2-apache2.2.patch $TMP/mod_fastcgi-$VERSION
cp $CWD/mod_fastcgi-2.4.2-update.patch $TMP/mod_fastcgi-$VERSION
cp $CWD/mod_fastcgi-2.4.2-fix_warnings.patch $TMP/mod_fastcgi-$VERSION
echo "aplicando patch ..."
patch -p1 < mod_fastcgi-2.4.2-apache2.2.patch
patch -p1 < mod_fastcgi-2.4.2-update.patch
patch -p1 < mod_fastcgi-2.4.2-fix_warnings.patch
rm Makefile
cat Makefile.AP2 > Makefile
LDFLAGS=-s \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS"
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"make em "pwd
;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;32;40m'
topdir=$(/usr/bin/dirname $(/usr/sbin/apxs -q exp_installbuilddir))
make top_dir=${topdir}
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"make install "pwd
;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;36;40m'
make top_dir=${topdir} DESTDIR=$PKG MKINSTALLDIRS="mkdir -p" install
tput sgr0;
mkdir -p $PKG/etc/httpd/extra/
cp -a $CWD/fastcgi.conf $PKG/etc/httpd/extra/
echo "Criando diretório de documentação ..."
mkdir -p $PKG/usr/doc/mod_fastcgi-$VERSION
echo "Copiando arquivos de documetação ..."
cp -a INSTALL README CHANGES $PKG/usr/doc/mod_fastcgi-$VERSION
chmod 644 $PKG/usr/doc/mod_fastcgi-$VERSION/*
chown root.root $PKG/usr/doc/mod_fastcgi-$VERSION/*
find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded
gzip -9 $PKG/usr/man//
echo "criando diretório de scripts instalação ..."
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh >> $PKG/install/doinst.sh
echo "criando o pacote ..."
cd $PKG
makepkg -l y -c n $TMP/mod_fastcgi-$VERSION-$ARCH-$BUILD.tgz
# Clean up the extra stuff:
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/template-$VERSION
rm -rf $PKG
fi
h3. Mysql++ Slackbuild
You can get the sources of Mysql++ at http://tangentsoft.net/mysql++/ or directly in
http://tangentsoft.net/mysql++/releases/mysql++-2.3.2.tar.gz
You may need some how-to or tutorials on internet for mysql++ , so you may like this
http://www.devarticles.com/c/a/Cplusplus/Building-a-Store-Application-With-MySQL-and-C/
save this with slack-desc name in the sources + mysql++.Slacbuild directory
# 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------------------------------------------------------|
mysql++: mysql++-2.3.2
mysql++:
mysql++: MySQL++ is a powerful C++ wrapper for MySQL's C API.
mysql++: Its purpose is to make working with queries as easy as working
mysql++: with STL containers.
mysql++:
mysql++:
mysql++:
mysql++:
mysql++:
mysql++:
Now you can build package with mysql++.Slackbuild
*Mysql++.Slackbuild
#!/bin/sh
# Slackware build script for mysql++
# Written by Chess Griffin
PRGNAM=mysql++
VERSION=2.3.2
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-MSXP}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
make
make install DESTDIR=$PKG
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/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
h3. ICU Slackbuild
optional
h3. Wt-2.0.5 Slackbuild
Finally tou ready for Witty.
Get witty sources on
http://www.webtoolkit.eu/ or in direct link
http://easynews.dl.sourceforge.net/sourceforge/witty/wt-2.0.5.tar.gz
#put this description file file as slack-desc in wt.Slackbuild source directory
# 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------------------------------------------------------|
wt: wt-2.0.5 - Webtoolkit
wt:
wt: Wt (pronounced 'witty') is a C++ library and application server
wt: for developping and deploying web applications. The API is
wt: widget-centric, and inspired by existing C++ Graphical User Interface
wt: (GUI) APIs. To the developer, it offers complete abstraction of any
wt: web-specific implementation details.
wt: In contrast, a web application developed with Wt is written in only
wt: one compiled language (C++), from which the library generates the
wt: necessary HTML, Javascript, CGI, and AJAX code.
wt:
wt: http://www.webtoolkit.eu/
wt:
#put this config file in Slackbuild + source directory
wt_httpd.conf
#Order Deny,Allow
Allow from all
# Don't show indexes for directories on publicly accessible machines (Uncomment if it's a private devshell).
#Options -Indexes
# Enable CGIs to be executed
Options ExecCGI
#put this post-install script file in Slackbuild + source directory
doinst.sh
echo "backup /etc/httpd/httpd.conf as httpd.conf.old ..."
cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.old
echo "Including /etc/httpd/extra/wt_httpd.conf in httpd.conf ..."
echo "Include /etc/httpd/extra/wt_httpd.conf" >> /etc/httpd/httpd.conf
echo "Reloading Apache httpd ..."
sh /etc/rc.d/rc.httpd restart
wt.Slackbuild
#!/bin/sh
# Slackware build script for wt.
NAME=wt
# Get the current and temporary directories
CWD=pwd
if [ "$TMP" = "" ]; then
TMP=/tmp
fi
PKG=$TMP/package-$NAME
VERSION=${VERSION:-2.0.5}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -m32 -march=i386 -mcpu=i386"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -m32 -march=i486 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
if [ ! -d $TMP ]; then
mkdir -p $TMP # location to build the source
fi
# Clean up a previous build
rm -rf $PKG
mkdir -p $PKG
# Decompress
cd $TMP
rm -rf $NAME-$VERSION
tar xvf $CWD/$NAME-$VERSION.tar.gz || exit 1
cd $NAME-$VERSION
# Fix
chown -R root:root .
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
mkdir -p $PKG/var/www/wt
mkdir -p $PKG/etc/wt
mkdir $PKG/usr/src/wt
cp $CWD/wt.Slackbuild $PKG/usr/src/wt
mkdir pwd
/build
cd pwd
/build
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;33;40m'"execucao do script cmake para wt em "pwd
;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ;tput sgr0;
echo -e '\E[01;36;40m'
cmake -D DEPLOYROOT=/var/www/wt \
-D WEBUSER=apache \
-D BUILD_SHARED_LIBS=ON \
-D CONFIGURATION=/etc/wt \
-D BOOST_COMPILER=gcc \
-D BOOST_VERSION=1_34_1 \
-D BOOST_DIR=/usr \
-D RUNDIR=/var/run \
-D CMAKE_INSTALL_PREFIX=/usr \
-D HTTP_WITH_SSL=true \
-D CONNECTOR_FCGI=true \
-D EXAMPLES_CONNECTOR=wthttp \
-D WEBGROUP=users ../
#-D EXECUTABLE_OUTPUT_PATH=/var/www/wt/bin \
# Build
echo -e '\E[01;32;40m'"***********************************************" ; tput sgr0;
echo -e '\E[01;33;40m'" Compilando wt com make em " pwd
; tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ; tput sgr0;
echo -e '\E[01;34;40m';
make
echo -e '\E[01;32;40m'"***********************************************" ; tput sgr0;
echo -e '\E[01;33;40m'" Compilando exemplos com make em " pwd
; tput sgr0;
echo -e '\E[01;32;40m'"***********************************************" ; tput sgr0;
echo -e '\E[01;32;40m';
make -C examples
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;33;40m'"instalado wt em $PKG com o make install" ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;35;40m';
make install DESTDIR=$PKG
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;33;40m'"instalado wt examples em $PKG " ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;32;40m';
mkdir -p $PKG/usr/share/$NAME-$VERSION/examples
cp -a $TMP/$NAME-$VERSION/build/examples $PKG/usr/share/$NAME-$VERSION/
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
echo -e '\E[01;33;40m'"Montando o pacote" ;tput sgr0;
echo -e '\E[01;32;40m'"***********************************************";tput sgr0;
# Clean up a previous build
rm -rf $PKG/etc/wt
mkdir -p $PKG/etc/wt
rm -rf $PKG/var/www/wt
mkdir -p $PKG/var/www/wt
mkdir -p $PKG/etc/httpd/extra
cp $CWD/wt_httpd.conf $PKG/etc/httpd/extra
# Gzip man pages
find $PKG/usr/man -name "*.[123456789]" -exec gzip -9 {} \;
# 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
)
# Copy Slackware package files
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh >> $PKG/install/doinst.sh
# Create package
echo "Creating package"
cd $PKG
makepkg -l y -c n ../$NAME-$VERSION-$ARCH-$BUILD.tgz
# Clean up
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/$NAME-$VERSION
rm -rf $PKG
fi
h3. Testing Witty without apache
open a konsole window and
cd /usr/share/wt-2.0.5/examples/
cd hello
sh deploy.sh
then go to
cd /var/www/wt/hello
cd /var/www/wt/hello/
./hello.wt --docroot . --http-address your.ip.com --http-port 8080
and open your browser at http://you.ip.com:8080
Have a fun !!!
Updated by Pieter Libin about 15 years ago · 2 revisions