source: npl/internetserver/apache2/apache2.SlackBuild @ 12bffd8

Last change on this file since 12bffd8 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.6 KB
Line 
1#!/bin/bash
2
3#DEP:openssl
4#DEP:openldap
5#DEP:apr
6#DEP:apr_util
7#DEP:libpcre
8#DEP:expat
9#DEP:zlib
10#DEP:db48
11#DEP:cyrus_sasl
12
13
14#######Essential package info.
15#Change these if autodetection fails.
16
17#Name of the Syn-3 package that we are going to create
18NAME=`basename $0|sed 's/.SlackBuild//'`
19
20#Archive of the sourcefiles to unpack
21SRC_ARC=`ls *.tar.* *.zip 2>/dev/null`
22
23#Version of the sourcefiles
24VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'`
25
26#Architecture that the created binaries run on.
27#Use noarch for scripts.
28ARCH=`uname -m`
29
30#from this point on, exit on errors:
31set -e
32
33########Build and create the pacakge.
34#Uncomment the stuff that you dont want or need
35
36#Unpack source
37#(uncomment if not needed)
38syn3_unpack $SRC_ARC
39
40#Directory where the sourcefiles are unpacked.
41#(you might have to adjust this if autodetection fails)
42SRC_DIR=`ls -c|head -1`
43
44#apply patches
45#patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1
46
47pushd $SRC_DIR
48
49cat ../config.layout.slack >> config.layout
50
51#AUTOMAKE: Configure
52#Some usefull stuff you sometimes need to set:
53#export LDFLAGS="-L/usr/X11/lib/ -L/usr/lib/mysql/"
54#export LD_LIBRARY_PATH=/usr/lib/mysql
55#export VPATH=$LD_LIBRARY_PATH
56#export CFLAGS="-std=c89"
57#export CFLAGS="-fgnu89-inline" #If "multiple definition of `foo'" Also see http://gcc.gnu.org/gcc-4.3/porting_to.html
58export CFLAGS="-DBIG_SECURITY_HOLE"
59MAKE_OPTS=""
60./configure --prefix=/usr --enable-layout=Slackware --with-mpm=prefork || exit 1
61
62#AUTOMAKE: Compile
63
64make $MAKE_OPTS || exit 1
65
66#AUTOMAKE: Test (optional)
67if grep ^test: Makefile; then
68        make pkgconfigdir=/usr/lib/pkgconfig $MAKE_OPTS install || exit 1
69        make $MAKE_OPTS test || exit 1
70elif grep ^check: Makefile; then
71        make pkgconfigdir=/usr/lib/pkgconfig $MAKE_OPTS install || exit 1
72        make $MAKE_OPTS check || exit 1
73fi
74
75#AUTOMAKE: Install
76mkdir -p /tmp/pkg &>/dev/null
77make -j1 pkgconfigdir=/usr/lib/pkgconfig install_prefix=/tmp/pkg DESTDIR=/tmp/pkg INSTALL_ROOT=/tmp/pkg install_root=/tmp/pkg $MAKE_OPTS install || exit 1
78popd
79
80#clean crap
81rm -rf /tmp/pkg/var/www/manual /tmp/pkg/var/www/cgi-bin /tmp/pkg/var/www/htdocs /tmp/pkg/etc
82
83#strip bins and other stuff
84syn3_strip /tmp/pkg || exit 1
85
86#move development stuff and create seperate development package
87syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1
88
89#for apxs stuff
90mkdir -p  /tmp/pkgdev/var/www
91mv /tmp/pkg/var/www/build /tmp/pkgdev/var/www
92
93#oops, move back error includes
94mv /tmp/pkgdev/var/www/error/include /tmp/pkg/var/www/error
95
96syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1
97
98#make main package
99syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1
100
101
102
Note: See TracBrowser for help on using the repository browser.