Installing Wt on Slackware » History » Version 2
  Pieter Libin, 10/29/2009 02:07 PM 
  
| 1 | 1 | Pieter Libin | h1. Installing Wt on Slackware  | 
|---|---|---|---|
| 2 | |||
| 3 | {{toc}} | 
||
| 4 | |||
| 5 | By Miguel Suarez Xavier Penteado miguel_penteado@fca.unesp.br  | 
||
| 6 | |||
| 7 | (sorry by poor english)  | 
||
| 8 | |||
| 9 | In slackware 12 we have not in default installation  | 
||
| 10 | # boost library  | 
||
| 11 | # asio library _*' --(no asio stand alone and no boost asio)--  | 
||
| 12 | # mxml  | 
||
| 13 | # fastcgi lib  | 
||
| 14 | # fastcgi apache mod  | 
||
| 15 | # ICU  | 
||
| 16 | # mysql++  | 
||
| 17 | # wt  | 
||
| 18 | |||
| 19 | Then, we need build each previous packages and install it before try compile witty.  | 
||
| 20 | |||
| 21 | Slackare 12 use slackbuilds to build packges, so we will put here the slackbuilds for packages above  | 
||
| 22 | |||
| 23 | *Remember all packets will be generated in /tmp directory*  | 
||
| 24 | |||
| 25 | |||
| 26 | h3. boost 1.34.1 Slackbuild  | 
||
| 27 | |||
| 28 | 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.  | 
||
| 29 | |||
| 30 | *boost_bjam-gcc42_mod.patch*  | 
||
| 31 | |||
| 32 | |||
| 33 | <pre>  | 
||
| 34 | Index: tools/jam/src/build.sh  | 
||
| 35 | --- tools/jam/src/build.sh.orig 2006-02-03 17:57:42 +0100  | 
||
| 36 | +++ tools/jam/src/build.sh 2007-06-17 13:54:31 +0200  | 
||
| 37 | @@ -127,7 +127,7 @@  | 
||
| 38 | ;;  | 
||
| 39 | |||
| 40 | gcc)  | 
||
| 41 | - BOOST_JAM_CC=gcc  | 
||
| 42 | + BOOST_JAM_CC="gcc -O0"  | 
||
| 43 | ;;  | 
||
| 44 | |||
| 45 | darwin)  | 
||
| 46 | Index: tools/jam/src/build.jam  | 
||
| 47 | --- tools/jam/src/build.jam.orig 2007-06-17 14:07:34 +0200  | 
||
| 48 | +++ tools/jam/src/build.jam 2007-06-17 14:08:21 +0200  | 
||
| 49 | @@ -153,7 +153,7 @@  | 
||
| 50 | ## GCC 2.x, 3.x, 4.x  | 
||
| 51 | toolset gcc gcc : "-o " : -D  | 
||
| 52 | : -pedantic  | 
||
| 53 | - [ opt --release : [ opt --symbols : -g : -s ] -O3 ]  | 
||
| 54 | + [ opt --release : [ opt --symbols : -g : -s ] -O0 ]  | 
||
| 55 | [ opt --debug : -g -O0 -fno-inline ]  | 
||
| 56 | -I$(--python-include) -Wno-long-long  | 
||
| 57 | : -L$(--python-lib[1]) -l$(--python-lib[2]) ;  | 
||
| 58 | </pre>  | 
||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | *boost-configure.patch*  | 
||
| 63 | |||
| 64 | <pre>  | 
||
| 65 | *** configure.orig 2007-01-16 01:39:00.000000000 +0100  | 
||
| 66 | --- configure 2007-01-19 03:53:08.000000000 +0100  | 
||
| 67 | ***************  | 
||
| 68 | *** 9,15 ****  | 
||
| 69 | |||
| 70 | BJAM=""  | 
||
| 71 | TOOLSET=""  | 
||
| 72 | ! BJAM_CONFIG=""  | 
||
| 73 | BUILD=""  | 
||
| 74 | PREFIX=/usr/local  | 
||
| 75 | EPREFIX=  | 
||
| 76 | --- 9,15 ----  | 
||
| 77 | |||
| 78 | BJAM=""  | 
||
| 79 | TOOLSET=""  | 
||
| 80 | ! BJAM_CONFIG="-d2 --layout=system variant=release debug-symbols=on"  | 
||
| 81 | BUILD=""  | 
||
| 82 | PREFIX=/usr/local  | 
||
| 83 | EPREFIX=  | 
||
| 84 | *************** INCLUDEDIR=$INCLUDEDIR  | 
||
| 85 | *** 325,332 ****  | 
||
| 86 | LIBS=$LIBS  | 
||
| 87 | |||
| 88 | all: .dummy  | 
||
| 89 | ! @echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS)"  | 
||
| 90 | ! @\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) || \\  | 
||
| 91 | echo "Not all Boost libraries built properly."  | 
||
| 92 | |||
| 93 | clean: .dummy  | 
||
| 94 | --- 325,332 ----  | 
||
| 95 | LIBS=$LIBS  | 
||
| 96 | |||
| 97 | all: .dummy  | 
||
| 98 | ! @echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) stage"  | 
||
| 99 | ! @\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) stage || \\  | 
||
| 100 | echo "Not all Boost libraries built properly."  | 
||
| 101 | |||
| 102 | clean: .dummy  | 
||
| 103 | |||
| 104 | </pre>  | 
||
| 105 | |||
| 106 | *boost-gcc-soname.patch*  | 
||
| 107 | |||
| 108 | <pre>  | 
||
| 109 | *** tools/build/v2/tools/gcc.jam.orig 2007-05-03 08:09:04.000000000 +0200  | 
||
| 110 | --- tools/build/v2/tools/gcc.jam 2007-06-26 20:37:44.000000000 +0200  | 
||
| 111 | *************** if [ os.name ] != NT && [ os.name ] != O  | 
||
| 112 | *** 316,322 ****  | 
||
| 113 | # expected, therefore it has been disabled.  | 
||
| 114 | |||
| 115 | HAVE_SONAME = "" ;  | 
||
| 116 | ! SONAME_OPTION = -h ;  | 
||
| 117 | }  | 
||
| 118 | |||
| 119 | |||
| 120 | --- 316,323 ----  | 
||
| 121 | # expected, therefore it has been disabled.  | 
||
| 122 | |||
| 123 | HAVE_SONAME = "" ;  | 
||
| 124 | ! SONAME_OPTION = -soname ;  | 
||
| 125 | ! SONAME_VERSION = 3 ;  | 
||
| 126 | }  | 
||
| 127 | |||
| 128 | |||
| 129 | *************** rule link.dll ( targets * : sources * :  | 
||
| 130 | *** 631,637 ****  | 
||
| 131 | # Differ from 'link' above only by -shared.  | 
||
| 132 | actions link.dll bind LIBRARIES  | 
||
| 133 |    { | 
||
| 134 | ! "$(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)  | 
||
| 135 | }  | 
||
| 136 | |||
| 137 | # Set up threading support. It's somewhat contrived, so perform it at the end,  | 
||
| 138 | --- 632,638 ----  | 
||
| 139 | # Differ from 'link' above only by -shared.  | 
||
| 140 | actions link.dll bind LIBRARIES  | 
||
| 141 |    { | 
||
| 142 | ! "$(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)  | 
||
| 143 | }  | 
||
| 144 | |||
| 145 | # Set up threading support. It's somewhat contrived, so perform it at the end,  | 
||
| 146 | </pre>  | 
||
| 147 | |||
| 148 | *boost-use-rpm-optflags.patch*  | 
||
| 149 | |||
| 150 | <pre>  | 
||
| 151 | *** tools/build/v2/tools/gcc.jam.orig 2007-08-01 01:17:16.000000000 -0500  | 
||
| 152 | --- tools/build/v2/tools/gcc.jam 2007-08-01 01:17:46.000000000 -0500  | 
||
| 153 | *************** flags gcc.compile PCH_FILE <pch>on : <pc  | 
||
| 154 | *** 268,274 ****  | 
||
| 155 | |||
| 156 | # Declare flags and action for compilation  | 
||
| 157 | flags gcc.compile OPTIONS <optimization>off : -O0 ;  | 
||
| 158 | ! flags gcc.compile OPTIONS <optimization>speed : -O3 ;  | 
||
| 159 | flags gcc.compile OPTIONS <optimization>space : -Os ;  | 
||
| 160 | |||
| 161 | flags gcc.compile OPTIONS <inlining>off : -fno-inline ;  | 
||
| 162 | --- 268,274 ----  | 
||
| 163 | |||
| 164 | # Declare flags and action for compilation  | 
||
| 165 | flags gcc.compile OPTIONS <optimization>off : -O0 ;  | 
||
| 166 | ! flags gcc.compile OPTIONS <optimization>speed : "$RPM_OPT_FLAGS" ;  | 
||
| 167 | flags gcc.compile OPTIONS <optimization>space : -Os ;  | 
||
| 168 | |||
| 169 | flags gcc.compile OPTIONS <inlining>off : -fno-inline ;  | 
||
| 170 | </pre>  | 
||
| 171 | |||
| 172 | |||
| 173 | 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:  | 
||
| 174 | |||
| 175 | *boost_asio* on http://sourceforge.net/project/showfiles.php?group_id=122478 or if you prefer directly on  | 
||
| 176 | http://easynews.dl.sourceforge.net/sourceforge/asio/asio-0.3.8rc3.tar.gz  | 
||
| 177 | |||
| 178 | *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  | 
||
| 179 | |||
| 180 | finily _*' boost 1.34.1 _*' on http://sourceforge.net/project/showfiles.php?group_id=7586 or directly on  | 
||
| 181 | http://easynews.dl.sourceforge.net/sourceforge/boost/boost_1_34_1.tar.bz2  | 
||
| 182 | (boost.Slackbuild will compile your bjam -ARGH!!- (a ./configure like autotool system) ) in your system , and you will not need download bjam binary.  | 
||
| 183 | |||
| 184 | |||
| 185 | This Slackbuild is based on boost.SlackBuild,v 1.6 2007/09/04 of Eric Hameleers <alien@slackware.com>  | 
||
| 186 | and boost.spec from boost-1.34.0-2.el5.src.rpm from Red Hat Enterprise linux  | 
||
| 187 | |||
| 188 | *boost.Slackbuild*  | 
||
| 189 | <pre>  | 
||
| 190 | #!/bin/sh  | 
||
| 191 | # $Id: boost.SlackBuild,v 1.6 2007/09/04 23:08:43 root Exp root $  | 
||
| 192 | # Copyright (c) 2007 Eric Hameleers <alien@slackware.com>  | 
||
| 193 | # All rights reserved.  | 
||
| 194 | #  | 
||
| 195 | # Permission to use, copy, modify, and distribute this software for  | 
||
| 196 | # any purpose with or without fee is hereby granted, provided that  | 
||
| 197 | # the above copyright notice and this permission notice appear in all  | 
||
| 198 | # copies.  | 
||
| 199 | #  | 
||
| 200 | # THIS SOFTWARE IS PROVIDED ``AS IS*_ AND ANY EXPRESSED OR IMPLIED  | 
||
| 201 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF  | 
||
| 202 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  | 
||
| 203 | # IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR  | 
||
| 204 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  | 
||
| 205 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  | 
||
| 206 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF  | 
||
| 207 | # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND  | 
||
| 208 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,  | 
||
| 209 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  | 
||
| 210 | # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF  | 
||
| 211 | # SUCH DAMAGE.  | 
||
| 212 | #  | 
||
| 213 | # Slackware SlackBuild script  | 
||
| 214 | # ===========================  | 
||
| 215 | # By: Eric Hameleers <alien@slackware.com>  | 
||
| 216 | # For: boost  | 
||
| 217 | # Descr: collection of portable C++ source libraries  | 
||
| 218 | # URL: http://www.boost.org/  | 
||
| 219 | # Needs:  | 
||
| 220 | # Changelog:  | 
||
| 221 | # 1.34.1-1 01/10/2007 by Miguel Suarez Xavier Penteado <miguel_penteado@fca.unesp.br>  | 
||
| 222 | # 1.33.1-1: 23/Dec/2006 by Eric Hameleers <alien@slackware.com>  | 
||
| 223 | # * Initial build.  | 
||
| 224 | # 1.34.0-1: 04/Sep/2007 by Eric Hameleers <alien@slackware.com>  | 
||
| 225 | # * Update, Slackware 12.0 package.  | 
||
| 226 | #  | 
||
| 227 | # Run 'sh boost.SlackBuild --cleanup' to build a Slackware package.  | 
||
| 228 | # The package (.tgz) plus descriptive .txt file are created in /tmp .  | 
||
| 229 | # Install using 'installpkg'.  | 
||
| 230 | #  | 
||
| 231 | # Set initial variables:  | 
||
| 232 | |||
| 233 | echo "Setting variables ..."  | 
||
| 234 | echo "Setando variaveis ..."  | 
||
| 235 | |||
| 236 | PRGNAM=boost  | 
||
| 237 |  VERSION=${VERSION:-1.34.1} | 
||
| 238 |  SRCVER=$(echo ${VERSION} | tr '.' '_') | 
||
| 239 |  ARCH=${ARCH:-i486} | 
||
| 240 |  BUILD=${BUILD:-1} | 
||
| 241 | |||
| 242 | # This is the python we build against:  | 
||
| 243 | PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')  | 
||
| 244 | PYTHON_FLAGS="-sPYTHON_ROOT=/usr -sPYTHON_VERSION=$PYTHON_VERSION"  | 
||
| 245 | |||
| 246 | DOCS="README LICENSE_1_0.txt people wiki"  | 
||
| 247 | |||
| 248 | # Where do we look for sources?  | 
||
| 249 | CWD=$(pwd)  | 
||
| 250 | SRCDIR=$(dirname $0)  | 
||
| 251 |  [ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR} | 
||
| 252 | |||
| 253 | # Place to build (TMP) package (PKG) and output (OUTPUT) the program:  | 
||
| 254 |  TMP=${TMP:-/tmp/build} | 
||
| 255 | PKG=$TMP/package-$PRGNAM  | 
||
| 256 |  OUTPUT=${OUTPUT:-/tmp} | 
||
| 257 | |||
| 258 | ###################################################################################  | 
||
| 259 | ASIO=boost_asio  | 
||
| 260 | VER_ASIO="0_3_8rc3"  | 
||
| 261 |  SOURCE_ASIO="$SRCDIR/${ASIO}_${VER_ASIO}.tar.gz" | 
||
| 262 | PKG_ASIO=$TMP/package-$ASIO  | 
||
| 263 | |||
| 264 | ###################################################################################  | 
||
| 265 | |||
| 266 | ###################################################################################  | 
||
| 267 | GIL=gil  | 
||
| 268 | VER_GIL="2.1.1"  | 
||
| 269 |  SOURCE_GIL="$SRCDIR/${GIL}-${VER_GIL}.tar.gz" | 
||
| 270 | PKG_GIL=$TMP/package-$GIL  | 
||
| 271 | |||
| 272 | ###################################################################################  | 
||
| 273 | |||
| 274 | |||
| 275 | # Input URL: http://dl.sourceforge.net/boost/boost_1_34_1.tar.gz  | 
||
| 276 |  SOURCE="$SRCDIR/${PRGNAM}_${SRCVER}.tar.gz" | 
||
| 277 |  SRCURL="http://dl.sourceforge.net/${PRGNAM}/${PRGNAM}_${SRCVER}.tar.gz"  | 
||
| 278 | |||
| 279 | |||
| 280 | # Exit the script on errors:  | 
||
| 281 | set -e  | 
||
| 282 |  trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR | 
||
| 283 | # Catch unitialized variables:  | 
||
| 284 | set -u  | 
||
| 285 |  P1=${1:-1} | 
||
| 286 | |||
| 287 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 288 | echo -e '\E[01;33;40m'"Setando a vers~ao de gcc para 3.3.x ou 4.2.x" ;tput sgr0;  | 
||
| 289 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 290 | echo -e '\E[01;32;40m'  | 
||
| 291 | |||
| 292 | # Slackware 11 and up need other option (gcc > 3.3.x)  | 
||
| 293 | if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then  | 
||
| 294 | MOPT=tune  | 
||
| 295 | else  | 
||
| 296 | MOPT=cpu  | 
||
| 297 | fi  | 
||
| 298 | |||
| 299 | case "$ARCH" in  | 
||
| 300 |  i386)      SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"  | 
||
| 301 | SLKLDFLAGS=""; LIBDIRSUFFIX=""  | 
||
| 302 | ;;  | 
||
| 303 |  i486)      SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686" | 
||
| 304 | SLKLDFLAGS=""; LIBDIRSUFFIX=""  | 
||
| 305 | ;;  | 
||
| 306 | s390) SLKCFLAGS="-O2"  | 
||
| 307 | SLKLDFLAGS=""; LIBDIRSUFFIX=""  | 
||
| 308 | ;;  | 
||
| 309 | powerpc) SLKCFLAGS="-O2"  | 
||
| 310 | SLKLDFLAGS=""; LIBDIRSUFFIX=""  | 
||
| 311 | ;;  | 
||
| 312 | x86_64) SLKCFLAGS="-O2 -fPIC"  | 
||
| 313 | SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"  | 
||
| 314 | ;;  | 
||
| 315 | athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"  | 
||
| 316 | SLKLDFLAGS=""; LIBDIRSUFFIX=""  | 
||
| 317 | ;;  | 
||
| 318 | esac  | 
||
| 319 | |||
| 320 | # Create working directories:  | 
||
| 321 | mkdir -p $TMP/tmp-$PRGNAM # location to build the source  | 
||
| 322 | rm -rf $TMP/tmp-$PRGNAM/* # By default we remove the remnants of previous build  | 
||
| 323 | mkdir -p $PKG # place for the package to be built  | 
||
| 324 | rm -rf $PKG/* # We always erase old package's contents:  | 
||
| 325 | mkdir -p $OUTPUT # place for the package to be saved  | 
||
| 326 | |||
| 327 | # Source file availability:  | 
||
| 328 |  if ! [ -f ${SOURCE} ]; then | 
||
| 329 |  if ! [ "x${SRCURL}" == "x" ]; then | 
||
| 330 | # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT  | 
||
| 331 | [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"  | 
||
| 332 |  echo "Source '$(basename ${SOURCE})' not available yet..." | 
||
| 333 | echo "Will download file to $(dirname $SOURCE)"  | 
||
| 334 |  wget -nv --connect-timeout=30 -O "${SOURCE}" "${SRCURL}" || true | 
||
| 335 |  if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then | 
||
| 336 |  echo "Downloading '$(basename ${SOURCE})' failed... aborting the build." | 
||
| 337 |  mv -f "${SOURCE}" "${SOURCE}".FAIL | 
||
| 338 | exit 1  | 
||
| 339 | fi  | 
||
| 340 | else  | 
||
| 341 |  echo "File '$(basename ${SOURCE})' not available... aborting the build." | 
||
| 342 | exit 1  | 
||
| 343 | fi  | 
||
| 344 | fi  | 
||
| 345 | |||
| 346 | if [ "$P1" == "--download" ]; then  | 
||
| 347 | echo "Download complete."  | 
||
| 348 | exit 0  | 
||
| 349 | fi  | 
||
| 350 | |||
| 351 | |||
| 352 | #################################################################################################  | 
||
| 353 | # --- PACKAGE BUILDING ---  | 
||
| 354 | |||
| 355 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 356 | echo -e '\E[01;33;40m'"extraindo arquivos" ;tput sgr0;  | 
||
| 357 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 358 | echo -e '\E[01;36;40m'  | 
||
| 359 | |||
| 360 | echo "++================="  | 
||
| 361 | echo "|| $PRGNAM-$VERSION"  | 
||
| 362 | echo "++================="  | 
||
| 363 | |||
| 364 | cd $TMP/tmp-$PRGNAM  | 
||
| 365 | echo "Extracting the source archive(s) for $PRGNAM..."  | 
||
| 366 |  if $(file ${SOURCE} | grep -q ": bzip2"); then | 
||
| 367 |  tar -xjvf ${SOURCE} | 
||
| 368 |  elif $(file ${SOURCE} | grep -q ": gzip"); then | 
||
| 369 |  tar -xzvf ${SOURCE} | 
||
| 370 | fi  | 
||
| 371 |  mv ${PRGNAM}_${SRCVER} ${PRGNAM}-${VERSION} | 
||
| 372 |  cd ${PRGNAM}-${VERSION} | 
||
| 373 | BUILD_DIR_BOOST=`pwd`  | 
||
| 374 | chown -R root:root .  | 
||
| 375 | chmod -R u+w,go+r-w,a-s .  | 
||
| 376 | |||
| 377 | |||
| 378 | |||
| 379 | #################################################################################################  | 
||
| 380 | mkdir -p $TMP/tmp-$ASIO # location to build the source  | 
||
| 381 | rm -rf $TMP/tmp-$ASIO/* # By default we remove the remnants of previous build  | 
||
| 382 | |||
| 383 | cd $TMP/tmp-$ASIO  | 
||
| 384 | echo "Extracting the SOURCE_ASIO archive(s) for $ASIO..."  | 
||
| 385 |  if $(file ${SOURCE_ASIO} | grep -q ": bzip2"); then | 
||
| 386 |  tar -xjvf ${SOURCE_ASIO} | 
||
| 387 |  elif $(file ${SOURCE_ASIO} | grep -q ": gzip"); then | 
||
| 388 |  tar -xzvf ${SOURCE_ASIO} | 
||
| 389 | fi  | 
||
| 390 |  mv ${ASIO}_${VER_ASIO} ${ASIO}-${VER_ASIO} | 
||
| 391 |  cd ${ASIO}-${VER_ASIO} | 
||
| 392 | chown -R root:root .  | 
||
| 393 | chmod -R u+w,go+r-w,a-s .  | 
||
| 394 | |||
| 395 |  cp -a boost/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION} | 
||
| 396 |  cp -a  libs/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION} | 
||
| 397 | |||
| 398 | #################################################################################################  | 
||
| 399 | |||
| 400 | #################################################################################################  | 
||
| 401 | mkdir -p $TMP/tmp-$GIL # location to build the source  | 
||
| 402 | rm -rf $TMP/tmp-$GIL/* # By default we remove the remnants of previous build  | 
||
| 403 | |||
| 404 | cd $TMP/tmp-$GIL  | 
||
| 405 | echo "Extracting the SOURCE_GIL archive(s) for $GIL..."  | 
||
| 406 |  if $(file ${SOURCE_GIL} | grep -q ": bzip2"); then | 
||
| 407 |  tar -xjvf ${SOURCE_GIL} | 
||
| 408 |  elif $(file ${SOURCE_GIL} | grep -q ": gzip"); then | 
||
| 409 |  tar -xzvf ${SOURCE_GIL} | 
||
| 410 | fi  | 
||
| 411 | |||
| 412 |  cd ${GIL}-${VER_GIL} | 
||
| 413 | chown -R root:root .  | 
||
| 414 | chmod -R u+w,go+r-w,a-s .  | 
||
| 415 | |||
| 416 |  cp -a boost/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION} | 
||
| 417 |  cp -a  libs/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION} | 
||
| 418 | |||
| 419 | #################################################################################################  | 
||
| 420 | |||
| 421 | cd $BUILD_DIR_BOOST  | 
||
| 422 | |||
| 423 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 424 | echo -e '\E[01;33;40m'"aplicando o patch para gcc 4.2.x " ;tput sgr0;  | 
||
| 425 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 426 | echo -e '\E[01;32;40m'  | 
||
| 427 | |||
| 428 |  cp -a $CWD/boost_bjam-gcc42_mod.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/ | 
||
| 429 | |||
| 430 | patch -p0 < boost_bjam-gcc42_mod.patch  | 
||
| 431 | |||
| 432 | # echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 433 | # echo -e '\E[01;33;40m'"aplicando o patch para Thread " ;tput sgr0;  | 
||
| 434 | # echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 435 | # echo -e '\E[01;32;40m'  | 
||
| 436 | #  | 
||
| 437 |  # cp -a $CWD/boost-thread.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/ | 
||
| 438 | #  | 
||
| 439 | # patch -p0 < boost-thread.patch  | 
||
| 440 | |||
| 441 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 442 | echo -e '\E[01;33;40m'"aplicando o patch para Configure " ;tput sgr0;  | 
||
| 443 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 444 | echo -e '\E[01;32;40m'  | 
||
| 445 | |||
| 446 |  cp -a $CWD/boost-configure.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/ | 
||
| 447 | |||
| 448 | patch -p0 < boost-configure.patch  | 
||
| 449 | |||
| 450 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 451 | echo -e '\E[01;33;40m'"aplicando o patch para boost-gcc-soname.patch " ;tput sgr0;  | 
||
| 452 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 453 | echo -e '\E[01;32;40m'  | 
||
| 454 | |||
| 455 |  cp -a $CWD/boost-gcc-soname.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/ | 
||
| 456 | |||
| 457 | patch -p0 < boost-gcc-soname.patch  | 
||
| 458 | |||
| 459 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 460 | echo -e '\E[01;33;40m'"aplicando o patch para boost-use-rpm-optflags.patch " ;tput sgr0;  | 
||
| 461 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 462 | echo -e '\E[01;32;40m'  | 
||
| 463 | |||
| 464 |  cp -a $CWD/boost-use-rpm-optflags.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/ | 
||
| 465 | |||
| 466 | patch -p0 < boost-use-rpm-optflags.patch  | 
||
| 467 | |||
| 468 | |||
| 469 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 470 | echo -e '\E[01;33;40m'"Construindo BJAM " ;tput sgr0;  | 
||
| 471 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 472 | echo -e '\E[01;36;40m'  | 
||
| 473 | |||
| 474 | |||
| 475 | echo Building ...  | 
||
| 476 | export LDFLAGS="$SLKLDFLAGS"  | 
||
| 477 | export CFLAGS="$SLKCFLAGS"  | 
||
| 478 | export CXXFLAGS="$SLKCFLAGS"  | 
||
| 479 | |||
| 480 | BOOST_ROOT=`pwd`  | 
||
| 481 | staged_dir=stage  | 
||
| 482 | export BOOST_ROOT  | 
||
| 483 | |||
| 484 | |||
| 485 | # First build bjam, the boost build system:  | 
||
| 486 | ( cd tools/jam/src  | 
||
| 487 |  ./build.sh gcc 2>&1 | tee $OUTPUT/make-${PRGNAM}.log | 
||
| 488 | ) || exit $?  | 
||
| 489 | BJAM=$(find tools/jam/src/ -name bjam -a -type f)  | 
||
| 490 | |||
| 491 | # Create build subdirectory  | 
||
| 492 | mkdir -p obj  | 
||
| 493 | |||
| 494 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 495 | echo -e '\E[01;33;40m'"Configure " ;tput sgr0;  | 
||
| 496 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 497 | echo -e '\E[01;32;40m'  | 
||
| 498 | |||
| 499 | #"-sBUILD=<optimization>speed <runtime-link>shared <runtime-link>static <inlining>full <threading>single/multi "  | 
||
| 500 | # Next, we build boost using bjam  | 
||
| 501 | echo "Building boost now..."  | 
||
| 502 | $BJAM \  | 
||
| 503 | release \  | 
||
| 504 | "-d2 -sBUILD= <runtime-link>shared <threading>multi " \  | 
||
| 505 | "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=/usr/include" "-sZLIB_LIBPATH=/usr/lib" \  | 
||
| 506 | "-sBZIP2_INCLUDE=/usr/include" "-sBZIP2_LIBPATH=/usr/lib" \  | 
||
| 507 | --toolset=gcc --layout=system --builddir=obj \  | 
||
| 508 | --prefix=/usr \  | 
||
| 509 | $PYTHON_FLAGS \  | 
||
| 510 | stage \  | 
||
| 511 |  2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log | 
||
| 512 | |||
| 513 | |||
| 514 | # ./configure \  | 
||
| 515 | # --with-bjam=$BJAM \  | 
||
| 516 | # --with-toolset=gcc \  | 
||
| 517 | # --prefix=/usr \  | 
||
| 518 | # --with-libraries=all \  | 
||
| 519 | # --with-python=/usr/bin/python \  | 
||
| 520 | # --with-python-root=/usr \  | 
||
| 521 | # --with-python-version=$PYTHON_VERSION  | 
||
| 522 | # #--with-icu \  | 
||
| 523 | # #--with-icu=DIR \  | 
||
| 524 | |||
| 525 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 526 | echo -e '\E[01;33;40m'"Construindo boost " ;tput sgr0;  | 
||
| 527 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 528 | echo -e '\E[01;33;40m'  | 
||
| 529 | |||
| 530 | # make all  | 
||
| 531 | |||
| 532 | |||
| 533 | |||
| 534 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 535 | echo -e '\E[01;33;40m'"Instalando o boost em `pwd` " ;tput sgr0;  | 
||
| 536 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 537 | echo -e '\E[01;34;40m'  | 
||
| 538 | |||
| 539 | echo "Installing boost now..."  | 
||
| 540 | $BJAM \  | 
||
| 541 | release \  | 
||
| 542 | --toolset=gcc --layout=system --link=shared --builddir=obj \  | 
||
| 543 | --prefix=$PKG/usr \  | 
||
| 544 | $PYTHON_FLAGS \  | 
||
| 545 | install \  | 
||
| 546 |  2>&1 | tee $OUTPUT/install-${PRGNAM}.log | 
||
| 547 | |||
| 548 | |||
| 549 | |||
| 550 | # And then install boost..  | 
||
| 551 |  mkdir -p $PKG/usr/{bin,lib,include} | 
||
| 552 |  mkdir -p $PKG/usr/share/${PRGNAM}-${VERSION} | 
||
| 553 | cp -a $BJAM $PKG/usr/bin  | 
||
| 554 | |||
| 555 | #install lib  | 
||
| 556 | for i in `find stage -type f -name \*.a`; do  | 
||
| 557 | NAME=`basename $i`;  | 
||
| 558 | install -p -m 0644 $i $PKG/usr/lib/$NAME;  | 
||
| 559 | done;  | 
||
| 560 | |||
| 561 | for i in `find stage -type f -name \*.so`; do  | 
||
| 562 | NAME=$i;  | 
||
| 563 | SONAME=$i.3;  | 
||
| 564 |  VNAME=$i.${VERSION}; | 
||
| 565 | base=`basename $i`;  | 
||
| 566 | NAMEbase=$base;  | 
||
| 567 | SONAMEbase=$base.3;  | 
||
| 568 |  VNAMEbase=$base.${VERSION}; | 
||
| 569 | mv $i $VNAME;  | 
||
| 570 | ln -s $VNAMEbase $SONAME;  | 
||
| 571 | ln -s $VNAMEbase $NAME;  | 
||
| 572 | install -p -m 755 $VNAME $PKG/usr/lib/$VNAMEbase;  | 
||
| 573 | mv $SONAME $PKG/usr/lib/$SONAMEbase;  | 
||
| 574 | mv $NAME $PKG/usr/lib/$NAMEbase;  | 
||
| 575 | done;  | 
||
| 576 | |||
| 577 | |||
| 578 | ## Move incorrectly installed include files  | 
||
| 579 |  if [ -d $PKG/usr/include/${PRGNAM}-${VERSION} ]; then | 
||
| 580 | echo -e '\E[01;33;40m'"Movendo os Includes boost para $PKG/usr/include/ " ;tput sgr0;  | 
||
| 581 | echo -e '\E[01;34;40m'  | 
||
| 582 |  mv $PKG/usr/include/${PRGNAM}-${VERSION}/boost $PKG/usr/include/ | 
||
| 583 |  rmdir $PKG/usr/include/${PRGNAM}-${VERSION} | 
||
| 584 | fi  | 
||
| 585 | |||
| 586 | |||
| 587 | |||
| 588 | # Add documentation:  | 
||
| 589 | mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION  | 
||
| 590 | cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true  | 
||
| 591 | chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*  | 
||
| 592 | |||
| 593 | # Strip binaries:  | 
||
| 594 | cd $PKG  | 
||
| 595 | find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true  | 
||
| 596 | find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true  | 
||
| 597 | cd -  | 
||
| 598 | |||
| 599 | # Add a package description:  | 
||
| 600 | mkdir -p $PKG/install  | 
||
| 601 | cat $SRCDIR/slack-desc > $PKG/install/slack-desc  | 
||
| 602 | if [ -f $SRCDIR/doinst.sh ]; then  | 
||
| 603 | cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh  | 
||
| 604 | fi  | 
||
| 605 | |||
| 606 | # Build the package:  | 
||
| 607 | cd $PKG  | 
||
| 608 |  makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log | 
||
| 609 | cd $OUTPUT  | 
||
| 610 |  md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5 | 
||
| 611 | cd -  | 
||
| 612 |  cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt | 
||
| 613 | |||
| 614 | # Clean up the extra stuff:  | 
||
| 615 | if [ "$P1" = "--cleanup" ]; then  | 
||
| 616 | rm -rf $TMP/tmp-$PRGNAM  | 
||
| 617 | rm -rf $PKG  | 
||
| 618 | fi  | 
||
| 619 | tput sgr0;  | 
||
| 620 | </pre>  | 
||
| 621 | |||
| 622 | |||
| 623 | h3. asio 0.3.7 standalone library Slackbuild  | 
||
| 624 | |||
| 625 | Next step: we will patch and compile asio-0.3.7.tar.gz . Use asio 0.3.7 version , is working.  | 
||
| 626 | #Patch asio-0.3.7 standalone  | 
||
| 627 | |||
| 628 | asio_openssl_init.patch  | 
||
| 629 | <pre>  | 
||
| 630 | --- ./include/asio/ssl/detail/openssl_init.hpp.orig 2006-11-15 00:10:08.000000000 +0100  | 
||
| 631 | +++ ./include/asio/ssl/detail/openssl_init.hpp 2006-11-15 00:10:38.000000000 +0100  | 
||
| 632 | @@ -45,13 +45,13 @@  | 
||
| 633 |         { | 
||
| 634 | ::SSL_library_init();  | 
||
| 635 | ::SSL_load_error_strings();  | 
||
| 636 | + ::OpenSSL_add_ssl_algorithms();  | 
||
| 637 | |||
| 638 | mutexes_.resize(::CRYPTO_num_locks());  | 
||
| 639 | for (size_t i = 0; i < mutexes_.size(); ++i)  | 
||
| 640 | mutexes_[i].reset(new asio::detail::mutex);  | 
||
| 641 | ::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);  | 
||
| 642 | |||
| 643 | - ::OpenSSL_add_ssl_algorithms();  | 
||
| 644 | }  | 
||
| 645 | }  | 
||
| 646 | </pre>  | 
||
| 647 | |||
| 648 | Getting Asio 0.3.7 library  | 
||
| 649 | You may open asio's homepage http://asio.sourceforge.net/ or get asio with this direct link  | 
||
| 650 | http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/a/as/asio/asio-0.3.7.tar.gz  | 
||
| 651 | |||
| 652 | 2 | Pieter Libin | *asio.Slackbuild*  | 
| 653 | 1 | Pieter Libin | |
| 654 | <pre>  | 
||
| 655 | #!/bin/sh  | 
||
| 656 | |||
| 657 | PRGNAM=asio  | 
||
| 658 | VERSION=0.3.7  | 
||
| 659 |  ARCH=${ARCH:-i486} | 
||
| 660 |  BUILD=${BUILD:-1} | 
||
| 661 |  TAG=${TAG:-MSXP} | 
||
| 662 | CWD=$(pwd)  | 
||
| 663 |  TMP=${TMP:-/tmp}	 | 
||
| 664 | PKG=$TMP/package-$PRGNAM  | 
||
| 665 |  OUTPUT=${OUTPUT:-/tmp}  | 
||
| 666 | |||
| 667 | if [ "$ARCH" = "i486" ]; then  | 
||
| 668 | SLKCFLAGS="-O2 -march=i486 -mtune=i686"  | 
||
| 669 | elif [ "$ARCH" = "i686" ]; then  | 
||
| 670 | SLKCFLAGS="-O2 -march=i686 -mtune=i686"  | 
||
| 671 | fi  | 
||
| 672 | |||
| 673 | rm -rf $PKG  | 
||
| 674 | mkdir -p $TMP $PKG $OUTPUT  | 
||
| 675 | cd $TMP || exit 1  | 
||
| 676 | rm -rf $PRGNAM-$VERSION  | 
||
| 677 | tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1  | 
||
| 678 | cd $PRGNAM-$VERSION || exit 1  | 
||
| 679 | chown -R root:root .  | 
||
| 680 | chmod -R u+w,go+r-w,a-s .  | 
||
| 681 | |||
| 682 | echo -e '\E[01;32;40m'"****************************************************************";tput sgr0;  | 
||
| 683 | echo -e '\E[01;33;40m'"aplicando o patch para $TMP/$PRGNAM-$VERSION em`pwd` " ;tput sgr0;  | 
||
| 684 | echo -e '\E[01;32;40m'"****************************************************************";tput sgr0;  | 
||
| 685 | echo -e '\E[01;32;40m'  | 
||
| 686 | |||
| 687 | cp -a $CWD/asio_openssl_init.patch $TMP/$PRGNAM-$VERSION/  | 
||
| 688 | |||
| 689 | patch -p0 < asio_openssl_init.patch  | 
||
| 690 | |||
| 691 | |||
| 692 | echo -e '\E[01;32;40m'"****************************************************************";tput sgr0;  | 
||
| 693 | echo -e '\E[01;33;40m'"execucao do script configure para $PRGNAM-$VERSION em`pwd` " ;tput sgr0;  | 
||
| 694 | echo -e '\E[01;32;40m'"****************************************************************";tput sgr0;  | 
||
| 695 | echo -e '\E[01;36;40m'  | 
||
| 696 | |||
| 697 | CFLAGS="$SLKCFLAGS" \  | 
||
| 698 | CXXFLAGS="$SLKCFLAGS" \  | 
||
| 699 | ./configure \  | 
||
| 700 | --prefix=/usr \  | 
||
| 701 | --sysconfdir=/etc \  | 
||
| 702 | --localstatedir=/var \  | 
||
| 703 | --with-boost=/usr \  | 
||
| 704 | --with-openssl=/usr  | 
||
| 705 | |||
| 706 | echo -e '\E[01;32;40m'"****************************************************************" ;tput sgr0;  | 
||
| 707 | echo -e '\E[01;33;40m'"execucao de make configure para $PRGNAM-$VERSION em`pwd` " ;tput sgr0;  | 
||
| 708 | echo -e '\E[01;32;40m'"****************************************************************" ;tput sgr0;  | 
||
| 709 | echo -e '\E[01;34;40m'  | 
||
| 710 | |||
| 711 | make  | 
||
| 712 | |||
| 713 | echo -e '\E[01;32;40m'"******************************************************************" ;tput sgr0;  | 
||
| 714 | echo -e '\E[01;33;40m'"execucao de make install configure para $PRGNAM-$VERSION em`pwd` " ;tput sgr0;  | 
||
| 715 | echo -e '\E[01;32;40m'"******************************************************************" ;tput sgr0;  | 
||
| 716 | echo -e '\E[01;33;40m'  | 
||
| 717 | |||
| 718 | make install DESTDIR=$PKG  | 
||
| 719 | |||
| 720 | echo -e '\E[01;32;40m'"****************************************************************" ;tput sgr0;  | 
||
| 721 | echo -e '\E[01;33;40m'"Criando o pacote $PRGNAM-$VERSION em`pwd` " ;tput sgr0;  | 
||
| 722 | echo -e '\E[01;32;40m'"****************************************************************" ;tput sgr0;  | 
||
| 723 | echo -e '\E[01;32;40m'  | 
||
| 724 | |||
| 725 | if [ -d $PKG/usr/man ]; then  | 
||
| 726 | ( cd $PKG/usr/man  | 
||
| 727 |    find . -type f -exec gzip -9 {} \; | 
||
| 728 | for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done  | 
||
| 729 | )  | 
||
| 730 | fi  | 
||
| 731 | |||
| 732 | mkdir -p $PKG/install  | 
||
| 733 | cat $CWD/slack-desc > $PKG/install/slack-desc  | 
||
| 734 | |||
| 735 | cd $PKG  | 
||
| 736 | /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz  | 
||
| 737 | |||
| 738 | tput sgr0;  | 
||
| 739 | </pre>  | 
||
| 740 | |||
| 741 | h3. mxml 2.3 library Slackbuild  | 
||
| 742 | |||
| 743 | Next step we will download Mini XML 2.3 version on  | 
||
| 744 | http://www.minixml.org/software.php or in direct link  | 
||
| 745 | http://ftp.easysw.com/pub/mxml/2.3/mxml-2.3.tar.gz  | 
||
| 746 | |||
| 747 | *mxml.SlackBuild*  | 
||
| 748 | |||
| 749 | <pre>  | 
||
| 750 | #!/bin/sh  | 
||
| 751 | |||
| 752 | # Slackware build script for mxml  | 
||
| 753 | # Original form Written by Chess Griffin <chess at chessgriffin dot com>  | 
||
| 754 | # Adapted by Miguel Suarez Xavier Penteado <miguel_penteado@fca.unesp.br>  | 
||
| 755 | |||
| 756 | PRGNAM=mxml  | 
||
| 757 | VERSION=2.3  | 
||
| 758 |  ARCH=${ARCH:-i486} | 
||
| 759 |  BUILD=${BUILD:-1} | 
||
| 760 |  TAG=${TAG:-MSXP} | 
||
| 761 | CWD=$(pwd)  | 
||
| 762 |  TMP=${TMP:-/tmp/SBo}	 | 
||
| 763 | PKG=$TMP/package-$PRGNAM  | 
||
| 764 |  OUTPUT=${OUTPUT:-/tmp} | 
||
| 765 | |||
| 766 | if [ "$ARCH" = "i486" ]; then  | 
||
| 767 | SLKCFLAGS="-O2 -march=i486 -mtune=i686"  | 
||
| 768 | elif [ "$ARCH" = "i686" ]; then  | 
||
| 769 | SLKCFLAGS="-O2 -march=i686 -mtune=i686"  | 
||
| 770 | fi  | 
||
| 771 | |||
| 772 | rm -rf $PKG  | 
||
| 773 | mkdir -p $TMP $PKG $OUTPUT  | 
||
| 774 | cd $TMP || exit 1  | 
||
| 775 | rm -rf $PRGNAM-$VERSION  | 
||
| 776 | tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1  | 
||
| 777 | cd $PRGNAM-$VERSION || exit 1  | 
||
| 778 | chown -R root:root .  | 
||
| 779 | chmod -R u+w,go+r-w,a-s .  | 
||
| 780 | |||
| 781 | |||
| 782 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 783 | echo -e '\E[01;33;40m'"Confire mxml in `pwd` ";tput sgr0;  | 
||
| 784 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 785 | echo -e '\E[01;35;40m';  | 
||
| 786 | |||
| 787 | CFLAGS="$SLKCFLAGS" \  | 
||
| 788 | CXXFLAGS="$SLKCFLAGS" \  | 
||
| 789 | ./configure \  | 
||
| 790 | --prefix=/usr \  | 
||
| 791 | --sysconfdir=/etc \  | 
||
| 792 | --localstatedir=/var \  | 
||
| 793 | --enable-static=no  | 
||
| 794 | |||
| 795 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 796 | echo -e '\E[01;33;40m'"make mxml in `pwd` ";tput sgr0;  | 
||
| 797 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 798 | echo -e '\E[01;36;40m';  | 
||
| 799 | |||
| 800 | make  | 
||
| 801 | |||
| 802 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 803 | echo -e '\E[01;33;40m'"make install mxml in `pwd` ";tput sgr0;  | 
||
| 804 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 805 | echo -e '\E[01;37;40m';  | 
||
| 806 | |||
| 807 | make install BUILDROOT=$PKG  | 
||
| 808 | |||
| 809 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 810 | echo -e '\E[01;33;40m'" Building packge mxml in `pwd` ";tput sgr0;  | 
||
| 811 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 812 | echo -e '\E[01;35;40m';  | 
||
| 813 | |||
| 814 | if [ -d $PKG/usr/man ]; then  | 
||
| 815 | ( cd $PKG/usr/man  | 
||
| 816 |    find . -type f -exec gzip -9 {} \; | 
||
| 817 | for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done  | 
||
| 818 | )  | 
||
| 819 | fi  | 
||
| 820 | |||
| 821 | mkdir -p $PKG/install  | 
||
| 822 | cat $CWD/slack-desc > $PKG/install/slack-desc  | 
||
| 823 | |||
| 824 | cd $PKG  | 
||
| 825 | /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz  | 
||
| 826 | tput sgr0;  | 
||
| 827 | </pre>  | 
||
| 828 | |||
| 829 | <pre>  | 
||
| 830 | |||
| 831 | </pre>  | 
||
| 832 | |||
| 833 | h3. Fastcgi-2.4.0 Slackbuild  | 
||
| 834 | |||
| 835 | This slackbuild will install fastcgi library in your Slackware 12 ! You will need Fastcgi library plus apache modules. Lets get Library first.  | 
||
| 836 | |||
| 837 | You can download fcgi sorces at http://www.fastcgi.com/ or in this direct link  | 
||
| 838 | http://www.fastcgi.com/dist/fcgi.tar.gz You will get 2.4.0 version  | 
||
| 839 | |||
| 840 | Before, you must save this patch in sources tar directory  | 
||
| 841 | |||
| 842 | <pre>  | 
||
| 843 | The patch have 5.117 lines ... sorry try without him  | 
||
| 844 | </pre>  | 
||
| 845 | |||
| 846 | |||
| 847 | then you may use fastcgi.Slackbuild  | 
||
| 848 | 2 | Pieter Libin | |
| 849 | 1 | Pieter Libin | *fastcgi.Slackbuild*  | 
| 850 | |||
| 851 | <pre>  | 
||
| 852 | #!/bin/sh  | 
||
| 853 | |||
| 854 | # Slackware build script for mysql++  | 
||
| 855 | # Written by Chess Griffin <chess at chessgriffin dot com>  | 
||
| 856 | # Adapted by Miguel Suarez Xavier Penteado <miguel_penteado@fca.unesp.br>  | 
||
| 857 | |||
| 858 | PRGNAM=fcgi  | 
||
| 859 | VERSION=2.4.0  | 
||
| 860 |  ARCH=${ARCH:-i486} | 
||
| 861 |  BUILD=${BUILD:-1} | 
||
| 862 |  TAG=${TAG:-MSXP} | 
||
| 863 | CWD=$(pwd)  | 
||
| 864 |  TMP=${TMP:-/tmp/SBo}	 | 
||
| 865 | PKG=$TMP/package-$PRGNAM  | 
||
| 866 |  OUTPUT=${OUTPUT:-/tmp} | 
||
| 867 | |||
| 868 | if [ "$ARCH" = "i486" ]; then  | 
||
| 869 | SLKCFLAGS="-O2 -march=i486 -mtune=i686"  | 
||
| 870 | elif [ "$ARCH" = "i686" ]; then  | 
||
| 871 | SLKCFLAGS="-O2 -march=i686 -mtune=i686"  | 
||
| 872 | fi  | 
||
| 873 | |||
| 874 | rm -rf $PKG  | 
||
| 875 | mkdir -p $TMP $PKG $OUTPUT  | 
||
| 876 | cd $TMP || exit 1  | 
||
| 877 | rm -rf $PRGNAM-$VERSION  | 
||
| 878 | #tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1  | 
||
| 879 | tar -xzvf $CWD/$PRGNAM.tar.gz || exit 1  | 
||
| 880 | cd $PRGNAM-$VERSION || exit 1  | 
||
| 881 | chown -R root:root .  | 
||
| 882 | chmod -R u+w,go+r-w,a-s .  | 
||
| 883 | chmod a-x include/fcgios.h libfcgi/os_unix.c  | 
||
| 884 | |||
| 885 | cp $CWD/fcgi-2.4.0-autotools.patch $PKG/$PRGNAM-$VERSION  | 
||
| 886 | patch -p0 < $PKG/$PRGNAM-$VERSION/fcgi-2.4.0-autotools.patch  | 
||
| 887 | |||
| 888 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 889 | echo -e '\E[01;33;40m'"configurando em "`pwd` ;tput sgr0;  | 
||
| 890 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 891 | echo -e '\E[01;36;40m'  | 
||
| 892 | |||
| 893 | CFLAGS="$SLKCFLAGS" \  | 
||
| 894 | CXXFLAGS="$SLKCFLAGS" \  | 
||
| 895 | ./configure \  | 
||
| 896 | --prefix=/usr \  | 
||
| 897 | --sysconfdir=/etc \  | 
||
| 898 | --localstatedir=/var  | 
||
| 899 | |||
| 900 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 901 | echo -e '\E[01;33;40m'"make em "`pwd` ;tput sgr0;  | 
||
| 902 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 903 | echo -e '\E[01;32;40m'  | 
||
| 904 | make  | 
||
| 905 | |||
| 906 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 907 | echo -e '\E[01;33;40m'"make install "`pwd` ;tput sgr0;  | 
||
| 908 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 909 | echo -e '\E[01;38;40m'  | 
||
| 910 | |||
| 911 | make install DESTDIR=$PKG  | 
||
| 912 | |||
| 913 | |||
| 914 | if [ -d $PKG/usr/man ]; then  | 
||
| 915 | ( cd $PKG/usr/man  | 
||
| 916 |    find . -type f -exec gzip -9 {} \; | 
||
| 917 | for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done  | 
||
| 918 | )  | 
||
| 919 | fi  | 
||
| 920 | |||
| 921 | mkdir -p $PKG/install  | 
||
| 922 | cat $CWD/slack-desc > $PKG/install/slack-desc  | 
||
| 923 | |||
| 924 | cd $PKG  | 
||
| 925 | /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz  | 
||
| 926 | tput sgr0;  | 
||
| 927 | |||
| 928 | </pre>  | 
||
| 929 | |||
| 930 | |||
| 931 | h3. Modfastcgi-2.4.2 for apache Slackbuild  | 
||
| 932 | |||
| 933 | The mod_fastcgi will generate a patch for your apache 2.x.x modules  | 
||
| 934 | |||
| 935 | Get the module source http://www.fastcgi.com/ or directly here  | 
||
| 936 | http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz  | 
||
| 937 | |||
| 938 | |||
| 939 | patch  | 
||
| 940 | *mod_fastcgi-2.4.2-update.patch*  | 
||
| 941 | <pre>  | 
||
| 942 | sorry, to big 774 lines ... search in google, or try without it  | 
||
| 943 | </pre>  | 
||
| 944 | |||
| 945 | Patch for you save in Sorce + Slackbuilds dir  | 
||
| 946 | |||
| 947 | _*' mod_fastcgi-2.4.2-apache2.2.patch*  | 
||
| 948 | <pre>  | 
||
| 949 | --- mod_fastcgi-2.4.2/fcgi.h 2006-03-22 16:59:55.000000000 +0000  | 
||
| 950 | +++ mod_fastcgi-2.4.2/fcgi.h 2006-03-22 17:04:41.000000000 +0000  | 
||
| 951 | @@ -73,6 +73,36 @@  | 
||
| 952 | #define ap_reset_timeout(a)  | 
||
| 953 | #define ap_unblock_alarms()  | 
||
| 954 | |||
| 955 | +/* starting with apache 2.2 the backward-compatibility defines for  | 
||
| 956 | + * 1.3 APIs are not available anymore. Define them ourselves here.  | 
||
| 957 | + */  | 
||
| 958 | +#ifndef ap_copy_table  | 
||
| 959 | +  | 
||
| 960 | +#define ap_copy_table apr_table_copy  | 
||
| 961 | +#define ap_cpystrn apr_cpystrn  | 
||
| 962 | +#define ap_destroy_pool apr_pool_destroy  | 
||
| 963 | +#define ap_isspace apr_isspace  | 
||
| 964 | +#define ap_make_array apr_array_make  | 
||
| 965 | +#define ap_make_table apr_table_make  | 
||
| 966 | +#define ap_null_cleanup apr_pool_cleanup_null  | 
||
| 967 | +#define ap_palloc apr_palloc  | 
||
| 968 | +#define ap_pcalloc apr_pcalloc  | 
||
| 969 | +#define ap_psprintf apr_psprintf  | 
||
| 970 | +#define ap_pstrcat apr_pstrcat  | 
||
| 971 | +#define ap_pstrdup apr_pstrdup  | 
||
| 972 | +#define ap_pstrndup apr_pstrndup  | 
||
| 973 | +#define ap_push_array apr_array_push  | 
||
| 974 | +#define ap_register_cleanup apr_pool_cleanup_register  | 
||
| 975 | +#define ap_snprintf apr_snprintf  | 
||
| 976 | +#define ap_table_add apr_table_add  | 
||
| 977 | +#define ap_table_do apr_table_do  | 
||
| 978 | +#define ap_table_get apr_table_get  | 
||
| 979 | +#define ap_table_set apr_table_set  | 
||
| 980 | +#define ap_table_setn apr_table_setn  | 
||
| 981 | +#define ap_table_unset apr_table_unset  | 
||
| 982 | +  | 
||
| 983 | +#endif /* defined(ap_copy_table) */  | 
||
| 984 | +  | 
||
| 985 | #if (defined(HAVE_WRITEV) && !HAVE_WRITEV && !defined(NO_WRITEV)) || defined WIN32  | 
||
| 986 | #define NO_WRITEV  | 
||
| 987 | #endif  | 
||
| 988 | --- mod_fastcgi-2.4.2/Makefile.AP2 2006-03-22 17:04:55.000000000 +0000  | 
||
| 989 | +++ mod_fastcgi-2.4.2/Makefile.AP2 2006-03-22 17:05:22.000000000 +0000  | 
||
| 990 | @@ -20,8 +20,6 @@  | 
||
| 991 | |||
| 992 | all: local-shared-build  | 
||
| 993 | |||
| 994 | -install: install-modules  | 
||
| 995 | -  | 
||
| 996 | clean:  | 
||
| 997 | -rm -f *.o *.lo *.slo *.la  | 
||
| 998 | </pre>  | 
||
| 999 | |||
| 1000 | Outro patch para voce slavar junto ao fonte e aos slackbuilds  | 
||
| 1001 | |||
| 1002 | _*' mod_fastcgi-2.4.2-fix_warnings.patch*  | 
||
| 1003 | |||
| 1004 | <pre>  | 
||
| 1005 | --- mod_fastcgi-2.4.2/fcgi_config.c 2007-05-25 16:01:49.000000000 +0200  | 
||
| 1006 | +++ mod_fastcgi-2.4.2/fcgi_config.c 2007-05-25 16:06:42.000000000 +0200  | 
||
| 1007 | @@ -694,7 +694,7 @@  | 
||
| 1008 | return invalid_value(tp, name, fs_path, option, err);  | 
||
| 1009 | }  | 
||
| 1010 |           else if (strcasecmp(option, "-min-server-life") == 0) { | 
||
| 1011 | - if ((err = get_int(tp, &arg, &s->minServerLife, 0)))  | 
||
| 1012 | + if ((err = get_u_int(tp, &arg, &s->minServerLife, 0)))  | 
||
| 1013 | return invalid_value(tp, name, NULL, option, err);  | 
||
| 1014 | }  | 
||
| 1015 |           else if (strcasecmp(option, "-priority") == 0) { | 
||
| 1016 | @@ -763,12 +763,12 @@  | 
||
| 1017 |       { | 
||
| 1018 | if (s->group == NULL)  | 
||
| 1019 |           { | 
||
| 1020 | - s->group = ap_psprintf(tp, "#%ld", fcgi_util_get_server_gid(cmd->server));  | 
||
| 1021 | + s->group = ap_psprintf(tp, "#%d", fcgi_util_get_server_gid(cmd->server));  | 
||
| 1022 | }  | 
||
| 1023 | |||
| 1024 | if (s->user == NULL)  | 
||
| 1025 |           { | 
||
| 1026 | - s->user = ap_psprintf(p, "#%ld", fcgi_util_get_server_uid(cmd->server));  | 
||
| 1027 | + s->user = ap_psprintf(p, "#%d", fcgi_util_get_server_uid(cmd->server));  | 
||
| 1028 | }  | 
||
| 1029 | |||
| 1030 | s->uid = ap_uname2id(s->user);  | 
||
| 1031 | @@ -954,12 +954,12 @@  | 
||
| 1032 |       { | 
||
| 1033 | if (s->group == NULL)  | 
||
| 1034 |           { | 
||
| 1035 | - s->group = ap_psprintf(tp, "#%ld", fcgi_util_get_server_gid(cmd->server));  | 
||
| 1036 | + s->group = ap_psprintf(tp, "#%d", fcgi_util_get_server_gid(cmd->server));  | 
||
| 1037 | }  | 
||
| 1038 | |||
| 1039 | if (s->user == NULL)  | 
||
| 1040 |           { | 
||
| 1041 | - s->user = ap_psprintf(p, "#%ld", fcgi_util_get_server_uid(cmd->server));  | 
||
| 1042 | + s->user = ap_psprintf(p, "#%d", fcgi_util_get_server_uid(cmd->server));  | 
||
| 1043 | }  | 
||
| 1044 | |||
| 1045 | s->uid = ap_uname2id(s->user);  | 
||
| 1046 | |||
| 1047 | </pre>  | 
||
| 1048 | |||
| 1049 | *fastcgi.conf*  | 
||
| 1050 | |||
| 1051 | <pre>  | 
||
| 1052 | # This is the Apache server configuration file providing FastCGI support..  | 
||
| 1053 | #  | 
||
| 1054 | # Documentation is available at <http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html>  | 
||
| 1055 | |||
| 1056 | LoadModule fastcgi_module lib/httpd/modules/mod_fastcgi.so  | 
||
| 1057 | |||
| 1058 | # To use FastCGI to process .fcg .fcgi & .fpl scripts  | 
||
| 1059 | AddHandler fastcgi-script fcg fcgi fpl  | 
||
| 1060 | </pre>  | 
||
| 1061 | |||
| 1062 | |||
| 1063 | *doinst.sh*  | 
||
| 1064 | |||
| 1065 | <pre>  | 
||
| 1066 | cp /etc/httpd/httpd.conf /etc/httpd/httpd.old  | 
||
| 1067 | echo "Include /etc/httpd/extra/fastcgi.conf" >> /etc/httpd/httpd.conf  | 
||
| 1068 | echo "Restarting httpd ..."  | 
||
| 1069 | sh /etc/rc.d/rc.httpd restart  | 
||
| 1070 | </pre>  | 
||
| 1071 | |||
| 1072 | |||
| 1073 | *slack-desc*  | 
||
| 1074 | |||
| 1075 | <pre>  | 
||
| 1076 | |-----handy-ruler------------------------------------------------------|  | 
||
| 1077 | mod_fastcgi: mod_fastcgi 2.4.2  | 
||
| 1078 | mod_fastcgi:  | 
||
| 1079 | mod_fastcgi: A fastcgi module for httpd  | 
||
| 1080 | mod_fastcgi:  | 
||
| 1081 | mod_fastcgi:  | 
||
| 1082 | mod_fastcgi:  | 
||
| 1083 | mod_fastcgi:  | 
||
| 1084 | mod_fastcgi:  | 
||
| 1085 | mod_fastcgi:  | 
||
| 1086 | mod_fastcgi:  | 
||
| 1087 | </pre>  | 
||
| 1088 | |||
| 1089 | |||
| 1090 | *modfastcgi.Slackbuild  | 
||
| 1091 | |||
| 1092 | <pre>  | 
||
| 1093 | #!/bin/sh  | 
||
| 1094 | #  | 
||
| 1095 | # $Id: mod_fastcgi-server.SlackBuild 275 2005-03-08 01:20:25Z freerock $  | 
||
| 1096 | |||
| 1097 | CWD=`pwd`  | 
||
| 1098 |  TMP=${TMP:-/tmp} | 
||
| 1099 | PKG=$TMP/package-mod_fastcgi  | 
||
| 1100 | |||
| 1101 | VERSION=2.4.2  | 
||
| 1102 |  ARCH=${ARCH:-i486} | 
||
| 1103 | BUILD=1  | 
||
| 1104 | |||
| 1105 | if [ ! -d $TMP ]; then  | 
||
| 1106 | mkdir -p $TMP # location to build the source  | 
||
| 1107 | fi  | 
||
| 1108 | rm -rf $PKG  | 
||
| 1109 | mkdir -p $PKG  | 
||
| 1110 | |||
| 1111 | if [ "$ARCH" = "i386" ]; then  | 
||
| 1112 | SLKCFLAGS="-O2 -march=i386 -mcpu=i686"  | 
||
| 1113 | elif [ "$ARCH" = "i486" ]; then  | 
||
| 1114 | SLKCFLAGS="-O2 -march=i486 -mcpu=i686"  | 
||
| 1115 | elif [ "$ARCH" = "s390" ]; then  | 
||
| 1116 | SLKCFLAGS="-O2"  | 
||
| 1117 | elif [ "$ARCH" = "x86_64" ]; then  | 
||
| 1118 | SLKCFLAGS="-O2"  | 
||
| 1119 | fi  | 
||
| 1120 | |||
| 1121 | cd $TMP  | 
||
| 1122 | tar xzvf $CWD/mod_fastcgi-$VERSION.tar.gz  | 
||
| 1123 | |||
| 1124 | cd mod_fastcgi-$VERSION  | 
||
| 1125 | |||
| 1126 | echo "copiando patch ..."  | 
||
| 1127 | |||
| 1128 | cp $CWD/mod_fastcgi-2.4.2-apache2.2.patch $TMP/mod_fastcgi-$VERSION  | 
||
| 1129 | cp $CWD/mod_fastcgi-2.4.2-update.patch $TMP/mod_fastcgi-$VERSION  | 
||
| 1130 | cp $CWD/mod_fastcgi-2.4.2-fix_warnings.patch $TMP/mod_fastcgi-$VERSION  | 
||
| 1131 | |||
| 1132 | echo "aplicando patch ..."  | 
||
| 1133 | |||
| 1134 | patch -p1 < mod_fastcgi-2.4.2-apache2.2.patch  | 
||
| 1135 | patch -p1 < mod_fastcgi-2.4.2-update.patch  | 
||
| 1136 | patch -p1 < mod_fastcgi-2.4.2-fix_warnings.patch  | 
||
| 1137 | |||
| 1138 | rm Makefile  | 
||
| 1139 | |||
| 1140 | cat Makefile.AP2 > Makefile  | 
||
| 1141 | |||
| 1142 | LDFLAGS=-s \  | 
||
| 1143 | CFLAGS="$SLKCFLAGS" \  | 
||
| 1144 | CXXFLAGS="$SLKCFLAGS"  | 
||
| 1145 | |||
| 1146 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 1147 | echo -e '\E[01;33;40m'"make em "`pwd` ;tput sgr0;  | 
||
| 1148 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 1149 | echo -e '\E[01;32;40m'  | 
||
| 1150 | |||
| 1151 | topdir=$(/usr/bin/dirname $(/usr/sbin/apxs -q exp_installbuilddir))  | 
||
| 1152 | |||
| 1153 |  make top_dir=${topdir} | 
||
| 1154 | |||
| 1155 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 1156 | echo -e '\E[01;33;40m'"make install "`pwd` ;tput sgr0;  | 
||
| 1157 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 1158 | echo -e '\E[01;36;40m'  | 
||
| 1159 | |||
| 1160 |  make top_dir=${topdir} DESTDIR=$PKG MKINSTALLDIRS="mkdir -p"  install | 
||
| 1161 | |||
| 1162 | tput sgr0;  | 
||
| 1163 | |||
| 1164 | mkdir -p $PKG/etc/httpd/extra/  | 
||
| 1165 | cp -a $CWD/fastcgi.conf $PKG/etc/httpd/extra/  | 
||
| 1166 | |||
| 1167 | echo "Criando diretório de documentação ..."  | 
||
| 1168 | mkdir -p $PKG/usr/doc/mod_fastcgi-$VERSION  | 
||
| 1169 | |||
| 1170 | echo "Copiando arquivos de documetação ..."  | 
||
| 1171 | cp -a INSTALL README CHANGES $PKG/usr/doc/mod_fastcgi-$VERSION  | 
||
| 1172 | |||
| 1173 | chmod 644 $PKG/usr/doc/mod_fastcgi-$VERSION/*  | 
||
| 1174 | chown root.root $PKG/usr/doc/mod_fastcgi-$VERSION/*  | 
||
| 1175 | |||
| 1176 | find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded  | 
||
| 1177 | gzip -9 $PKG/usr/man/*/*  | 
||
| 1178 | |||
| 1179 | echo "criando diretório de scripts instalação ..."  | 
||
| 1180 | mkdir -p $PKG/install  | 
||
| 1181 | cat $CWD/slack-desc > $PKG/install/slack-desc  | 
||
| 1182 | cat $CWD/doinst.sh >> $PKG/install/doinst.sh  | 
||
| 1183 | |||
| 1184 | echo "criando o pacote ..."  | 
||
| 1185 | cd $PKG  | 
||
| 1186 | makepkg -l y -c n $TMP/mod_fastcgi-$VERSION-$ARCH-$BUILD.tgz  | 
||
| 1187 | |||
| 1188 | # Clean up the extra stuff:  | 
||
| 1189 | if [ "$1" = "--cleanup" ]; then  | 
||
| 1190 | rm -rf $TMP/template-$VERSION  | 
||
| 1191 | rm -rf $PKG  | 
||
| 1192 | fi  | 
||
| 1193 | </pre>  | 
||
| 1194 | |||
| 1195 | |||
| 1196 | h3. Mysql++ Slackbuild  | 
||
| 1197 | |||
| 1198 | You can get the sources of Mysql++ at http://tangentsoft.net/mysql++/ or directly in  | 
||
| 1199 | http://tangentsoft.net/mysql++/releases/mysql++-2.3.2.tar.gz  | 
||
| 1200 | |||
| 1201 | |||
| 1202 | You may need some how-to or tutorials on internet for mysql++ , so you may like this  | 
||
| 1203 | http://www.devarticles.com/c/a/Cplusplus/Building-a-Store-Application-With-MySQL-and-C/  | 
||
| 1204 | save this with *slack-desc* name in the sources + mysql++.Slacbuild directory  | 
||
| 1205 | |||
| 1206 | <pre>  | 
||
| 1207 | # HOW TO EDIT THIS FILE:  | 
||
| 1208 | # The "handy ruler" below makes it easier to edit a package description. Line  | 
||
| 1209 | # up the first '|' above the ':' following the base package name, and the '|' on  | 
||
| 1210 | # the right side marks the last column you can put a character in. You must make  | 
||
| 1211 | # exactly 11 lines for the formatting to be correct. It's also customary to  | 
||
| 1212 | # leave one space after the ':'.  | 
||
| 1213 | |||
| 1214 | |-----handy-ruler------------------------------------------------------|  | 
||
| 1215 | mysql++: mysql++-2.3.2  | 
||
| 1216 | mysql++:  | 
||
| 1217 | mysql++: MySQL++ is a powerful C++ wrapper for MySQL's C API.  | 
||
| 1218 | mysql++: Its purpose is to make working with queries as easy as working  | 
||
| 1219 | mysql++: with STL containers.  | 
||
| 1220 | mysql++:  | 
||
| 1221 | mysql++:  | 
||
| 1222 | mysql++:  | 
||
| 1223 | mysql++:  | 
||
| 1224 | mysql++:  | 
||
| 1225 | mysql++:  | 
||
| 1226 | </pre>  | 
||
| 1227 | |||
| 1228 | |||
| 1229 | Now you can build package with mysql++.Slackbuild  | 
||
| 1230 | |||
| 1231 | *Mysql++.Slackbuild  | 
||
| 1232 | |||
| 1233 | <pre>  | 
||
| 1234 | #!/bin/sh  | 
||
| 1235 | |||
| 1236 | # Slackware build script for mysql++  | 
||
| 1237 | # Written by Chess Griffin <chess at chessgriffin dot com>  | 
||
| 1238 | |||
| 1239 | PRGNAM=mysql++  | 
||
| 1240 | VERSION=2.3.2  | 
||
| 1241 |  ARCH=${ARCH:-i486} | 
||
| 1242 |  BUILD=${BUILD:-1} | 
||
| 1243 |  TAG=${TAG:-MSXP} | 
||
| 1244 | CWD=$(pwd)  | 
||
| 1245 |  TMP=${TMP:-/tmp/SBo}	 | 
||
| 1246 | PKG=$TMP/package-$PRGNAM  | 
||
| 1247 |  OUTPUT=${OUTPUT:-/tmp} | 
||
| 1248 | |||
| 1249 | if [ "$ARCH" = "i486" ]; then  | 
||
| 1250 | SLKCFLAGS="-O2 -march=i486 -mtune=i686"  | 
||
| 1251 | elif [ "$ARCH" = "i686" ]; then  | 
||
| 1252 | SLKCFLAGS="-O2 -march=i686 -mtune=i686"  | 
||
| 1253 | fi  | 
||
| 1254 | |||
| 1255 | rm -rf $PKG  | 
||
| 1256 | mkdir -p $TMP $PKG $OUTPUT  | 
||
| 1257 | cd $TMP || exit 1  | 
||
| 1258 | rm -rf $PRGNAM-$VERSION  | 
||
| 1259 | tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1  | 
||
| 1260 | cd $PRGNAM-$VERSION || exit 1  | 
||
| 1261 | chown -R root:root .  | 
||
| 1262 | chmod -R u+w,go+r-w,a-s .  | 
||
| 1263 | |||
| 1264 | CFLAGS="$SLKCFLAGS" \  | 
||
| 1265 | CXXFLAGS="$SLKCFLAGS" \  | 
||
| 1266 | ./configure \  | 
||
| 1267 | --prefix=/usr \  | 
||
| 1268 | --sysconfdir=/etc \  | 
||
| 1269 | --localstatedir=/var  | 
||
| 1270 | |||
| 1271 | make  | 
||
| 1272 | |||
| 1273 | make install DESTDIR=$PKG  | 
||
| 1274 | |||
| 1275 | if [ -d $PKG/usr/man ]; then  | 
||
| 1276 | ( cd $PKG/usr/man  | 
||
| 1277 |    find . -type f -exec gzip -9 {} \; | 
||
| 1278 | for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done  | 
||
| 1279 | )  | 
||
| 1280 | fi  | 
||
| 1281 | |||
| 1282 | mkdir -p $PKG/install  | 
||
| 1283 | cat $CWD/slack-desc > $PKG/install/slack-desc  | 
||
| 1284 | |||
| 1285 | cd $PKG  | 
||
| 1286 | /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz  | 
||
| 1287 | |||
| 1288 | </pre>  | 
||
| 1289 | |||
| 1290 | |||
| 1291 | |||
| 1292 | h3. ICU Slackbuild  | 
||
| 1293 | |||
| 1294 | optional  | 
||
| 1295 | |||
| 1296 | |||
| 1297 | h3. Wt-2.0.5 Slackbuild  | 
||
| 1298 | |||
| 1299 | Finally tou ready for Witty.  | 
||
| 1300 | |||
| 1301 | Get witty sources on  | 
||
| 1302 | http://www.webtoolkit.eu/ or in direct link  | 
||
| 1303 | http://easynews.dl.sourceforge.net/sourceforge/witty/wt-2.0.5.tar.gz  | 
||
| 1304 | |||
| 1305 | #put this description file file as *slack-desc* in wt.Slackbuild source directory  | 
||
| 1306 | <pre>  | 
||
| 1307 | # HOW TO EDIT THIS FILE:  | 
||
| 1308 | # The "handy ruler" below makes it easier to edit a package description. Line  | 
||
| 1309 | # up the first '|' above the ':' following the base package name, and the '|' on  | 
||
| 1310 | # the right side marks the last column you can put a character in. You must make  | 
||
| 1311 | # exactly 11 lines for the formatting to be correct. It's also customary to  | 
||
| 1312 | # leave one space after the ':'.  | 
||
| 1313 | |||
| 1314 | |-----handy-ruler------------------------------------------------------|  | 
||
| 1315 | wt: wt-2.0.5 - Webtoolkit  | 
||
| 1316 | wt:  | 
||
| 1317 | wt: Wt (pronounced 'witty') is a C++ library and application server  | 
||
| 1318 | wt: for developping and deploying web applications. The API is  | 
||
| 1319 | wt: widget-centric, and inspired by existing C++ Graphical User Interface  | 
||
| 1320 | wt: (GUI) APIs. To the developer, it offers complete abstraction of any  | 
||
| 1321 | wt: web-specific implementation details.  | 
||
| 1322 | wt: In contrast, a web application developed with Wt is written in only  | 
||
| 1323 | wt: one compiled language (C++), from which the library generates the  | 
||
| 1324 | wt: necessary HTML, Javascript, CGI, and AJAX code.  | 
||
| 1325 | wt:  | 
||
| 1326 | wt: http://www.webtoolkit.eu/  | 
||
| 1327 | wt:  | 
||
| 1328 | </pre>  | 
||
| 1329 | |||
| 1330 | |||
| 1331 | |||
| 1332 | #put this config file in Slackbuild + source directory  | 
||
| 1333 | *wt_httpd.conf*  | 
||
| 1334 | |||
| 1335 | <pre>  | 
||
| 1336 | <Directory /var/www/wt/>  | 
||
| 1337 | #Order Deny,Allow  | 
||
| 1338 | Allow from all  | 
||
| 1339 | # Don't show indexes for directories on publicly accessible machines (Uncomment if it's a private devshell).  | 
||
| 1340 | #Options -Indexes  | 
||
| 1341 | # Enable CGIs to be executed  | 
||
| 1342 | Options ExecCGI  | 
||
| 1343 | </Directory>  | 
||
| 1344 | |||
| 1345 | </pre>  | 
||
| 1346 | |||
| 1347 | #put this post-install script file in Slackbuild + source directory  | 
||
| 1348 | *doinst.sh*  | 
||
| 1349 | <pre>  | 
||
| 1350 | echo "backup /etc/httpd/httpd.conf as httpd.conf.old ..."  | 
||
| 1351 | cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.old  | 
||
| 1352 | echo "Including /etc/httpd/extra/wt_httpd.conf in httpd.conf ..."  | 
||
| 1353 | echo "Include /etc/httpd/extra/wt_httpd.conf" >> /etc/httpd/httpd.conf  | 
||
| 1354 | echo "Reloading Apache httpd ..."  | 
||
| 1355 | sh /etc/rc.d/rc.httpd restart  | 
||
| 1356 | </pre>  | 
||
| 1357 | |||
| 1358 | *wt.Slackbuild*  | 
||
| 1359 | |||
| 1360 | <pre>  | 
||
| 1361 | #!/bin/sh  | 
||
| 1362 | # Slackware build script for wt.  | 
||
| 1363 | NAME=wt  | 
||
| 1364 | |||
| 1365 | # Get the current and temporary directories  | 
||
| 1366 | CWD=`pwd`  | 
||
| 1367 | if [ "$TMP" = "" ]; then  | 
||
| 1368 | TMP=/tmp  | 
||
| 1369 | fi  | 
||
| 1370 | PKG=$TMP/package-$NAME  | 
||
| 1371 | |||
| 1372 |  VERSION=${VERSION:-2.0.5} | 
||
| 1373 |  ARCH=${ARCH:-i486} | 
||
| 1374 |  BUILD=${BUILD:-1} | 
||
| 1375 | |||
| 1376 | if [ "$ARCH" = "i386" ]; then  | 
||
| 1377 | SLKCFLAGS="-O2 -m32 -march=i386 -mcpu=i386"  | 
||
| 1378 | elif [ "$ARCH" = "i486" ]; then  | 
||
| 1379 | SLKCFLAGS="-O2 -m32 -march=i486 -mtune=i686"  | 
||
| 1380 | elif [ "$ARCH" = "s390" ]; then  | 
||
| 1381 | SLKCFLAGS="-O2"  | 
||
| 1382 | elif [ "$ARCH" = "x86_64" ]; then  | 
||
| 1383 | SLKCFLAGS="-O2"  | 
||
| 1384 | fi  | 
||
| 1385 | |||
| 1386 | if [ ! -d $TMP ]; then  | 
||
| 1387 | mkdir -p $TMP # location to build the source  | 
||
| 1388 | fi  | 
||
| 1389 | |||
| 1390 | # Clean up a previous build  | 
||
| 1391 | rm -rf $PKG  | 
||
| 1392 | mkdir -p $PKG  | 
||
| 1393 | |||
| 1394 | # Decompress  | 
||
| 1395 | cd $TMP  | 
||
| 1396 | rm -rf $NAME-$VERSION  | 
||
| 1397 | tar xvf $CWD/$NAME-$VERSION.tar.gz || exit 1  | 
||
| 1398 | cd $NAME-$VERSION  | 
||
| 1399 | |||
| 1400 | # Fix  | 
||
| 1401 | chown -R root:root .  | 
||
| 1402 |  find . -perm 666 -exec chmod 644 {} \; | 
||
| 1403 |  find . -perm 664 -exec chmod 644 {} \; | 
||
| 1404 |  find . -perm 600 -exec chmod 644 {} \; | 
||
| 1405 |  find . -perm 444 -exec chmod 644 {} \; | 
||
| 1406 |  find . -perm 400 -exec chmod 644 {} \; | 
||
| 1407 |  find . -perm 440 -exec chmod 644 {} \; | 
||
| 1408 |  find . -perm 777 -exec chmod 755 {} \; | 
||
| 1409 |  find . -perm 775 -exec chmod 755 {} \; | 
||
| 1410 |  find . -perm 511 -exec chmod 755 {} \; | 
||
| 1411 |  find . -perm 711 -exec chmod 755 {} \; | 
||
| 1412 |  find . -perm 555 -exec chmod 755 {} \; | 
||
| 1413 | |||
| 1414 | mkdir -p $PKG/var/www/wt  | 
||
| 1415 | mkdir -p $PKG/etc/wt  | 
||
| 1416 | |||
| 1417 | mkdir $PKG/usr/src/wt  | 
||
| 1418 | cp $CWD/wt.Slackbuild $PKG/usr/src/wt  | 
||
| 1419 | |||
| 1420 | mkdir `pwd`/build  | 
||
| 1421 | cd `pwd`/build  | 
||
| 1422 | |||
| 1423 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 1424 | echo -e '\E[01;33;40m'"execucao do script cmake para wt em "`pwd` ;tput sgr0;  | 
||
| 1425 | echo -e '\E[01;32;40m'"**************************************************" ;tput sgr0;  | 
||
| 1426 | echo -e '\E[01;36;40m'  | 
||
| 1427 | |||
| 1428 | cmake -D DEPLOYROOT=/var/www/wt \  | 
||
| 1429 | -D WEBUSER=apache \  | 
||
| 1430 | -D BUILD_SHARED_LIBS=ON \  | 
||
| 1431 | -D CONFIGURATION=/etc/wt \  | 
||
| 1432 | -D BOOST_COMPILER=gcc \  | 
||
| 1433 | -D BOOST_VERSION=1_34_1 \  | 
||
| 1434 | -D BOOST_DIR=/usr \  | 
||
| 1435 | -D RUNDIR=/var/run \  | 
||
| 1436 | -D CMAKE_INSTALL_PREFIX=/usr \  | 
||
| 1437 | -D HTTP_WITH_SSL=true \  | 
||
| 1438 | -D CONNECTOR_FCGI=true \  | 
||
| 1439 | -D EXAMPLES_CONNECTOR=wthttp \  | 
||
| 1440 | -D WEBGROUP=users ../  | 
||
| 1441 | #-D EXECUTABLE_OUTPUT_PATH=/var/www/wt/bin \  | 
||
| 1442 | |||
| 1443 | |||
| 1444 | # Build  | 
||
| 1445 | |||
| 1446 | echo -e '\E[01;32;40m'"**************************************************" ; tput sgr0;  | 
||
| 1447 | echo -e '\E[01;33;40m'" Compilando wt com make em " `pwd` ; tput sgr0;  | 
||
| 1448 | echo -e '\E[01;32;40m'"**************************************************" ; tput sgr0;  | 
||
| 1449 | echo -e '\E[01;34;40m';  | 
||
| 1450 | |||
| 1451 | make  | 
||
| 1452 | |||
| 1453 | echo -e '\E[01;32;40m'"**************************************************" ; tput sgr0;  | 
||
| 1454 | echo -e '\E[01;33;40m'" Compilando exemplos com make em " `pwd` ; tput sgr0;  | 
||
| 1455 | echo -e '\E[01;32;40m'"**************************************************" ; tput sgr0;  | 
||
| 1456 | echo -e '\E[01;32;40m';  | 
||
| 1457 | |||
| 1458 | make -C examples  | 
||
| 1459 | |||
| 1460 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 1461 | echo -e '\E[01;33;40m'"instalado wt em $PKG com o make install" ;tput sgr0;  | 
||
| 1462 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 1463 | echo -e '\E[01;35;40m';  | 
||
| 1464 | |||
| 1465 | make install DESTDIR=$PKG  | 
||
| 1466 | |||
| 1467 | |||
| 1468 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 1469 | echo -e '\E[01;33;40m'"instalado wt examples em $PKG " ;tput sgr0;  | 
||
| 1470 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 1471 | echo -e '\E[01;32;40m';  | 
||
| 1472 | |||
| 1473 | |||
| 1474 | mkdir -p $PKG/usr/share/$NAME-$VERSION/examples  | 
||
| 1475 | cp -a $TMP/$NAME-$VERSION/build/examples $PKG/usr/share/$NAME-$VERSION/  | 
||
| 1476 | |||
| 1477 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 1478 | echo -e '\E[01;33;40m'"Montando o pacote" ;tput sgr0;  | 
||
| 1479 | echo -e '\E[01;32;40m'"**************************************************";tput sgr0;  | 
||
| 1480 | |||
| 1481 | # Clean up a previous build  | 
||
| 1482 | rm -rf $PKG/etc/wt  | 
||
| 1483 | mkdir -p $PKG/etc/wt  | 
||
| 1484 | |||
| 1485 | rm -rf $PKG/var/www/wt  | 
||
| 1486 | mkdir -p $PKG/var/www/wt  | 
||
| 1487 | |||
| 1488 | mkdir -p $PKG/etc/httpd/extra  | 
||
| 1489 | cp $CWD/wt_httpd.conf $PKG/etc/httpd/extra  | 
||
| 1490 | |||
| 1491 | |||
| 1492 | # Gzip man pages  | 
||
| 1493 |  find $PKG/usr/man -name "*.[123456789]" -exec gzip -9 {} \; | 
||
| 1494 | |||
| 1495 | # Strip binaries  | 
||
| 1496 | ( cd $PKG  | 
||
| 1497 | find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null  | 
||
| 1498 | find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null  | 
||
| 1499 | )  | 
||
| 1500 | |||
| 1501 | # Copy Slackware package files  | 
||
| 1502 | mkdir -p $PKG/install  | 
||
| 1503 | cat $CWD/slack-desc > $PKG/install/slack-desc  | 
||
| 1504 | cat $CWD/doinst.sh >> $PKG/install/doinst.sh  | 
||
| 1505 | |||
| 1506 | # Create package  | 
||
| 1507 | echo "Creating package"  | 
||
| 1508 | cd $PKG  | 
||
| 1509 | makepkg -l y -c n ../$NAME-$VERSION-$ARCH-$BUILD.tgz  | 
||
| 1510 | |||
| 1511 | # Clean up  | 
||
| 1512 | if [ "$1" = "--cleanup" ]; then  | 
||
| 1513 | rm -rf $TMP/$NAME-$VERSION  | 
||
| 1514 | rm -rf $PKG  | 
||
| 1515 | fi  | 
||
| 1516 | </pre>  | 
||
| 1517 | |||
| 1518 | |||
| 1519 | h3. Testing Witty without apache  | 
||
| 1520 | |||
| 1521 | open a konsole window and  | 
||
| 1522 | |||
| 1523 | <pre>  | 
||
| 1524 | cd /usr/share/wt-2.0.5/examples/  | 
||
| 1525 | cd hello  | 
||
| 1526 | sh deploy.sh  | 
||
| 1527 | </pre>  | 
||
| 1528 | |||
| 1529 | then go to  | 
||
| 1530 | <pre>  | 
||
| 1531 | cd /var/www/wt/hello  | 
||
| 1532 | cd /var/www/wt/hello/  | 
||
| 1533 | ./hello.wt --docroot . --http-address your.ip.com --http-port 8080  | 
||
| 1534 | </pre>  | 
||
| 1535 | |||
| 1536 | and open your browser at http://you.ip.com:8080  | 
||
| 1537 | |||
| 1538 | Have a fun !!!  |