Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 157 lines (127 sloc) 3.91 kb
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
1 #! /bin/sh
2
3 # Based slightly on an original by John H Terpstra but not much left of his.
4 # S Liddicott 1999 sam@campbellsci.co.uk
5
6 PREFIX="php"
7 TARDIR="`basename \`pwd\``"
8 RELEASE=${1:-1}
5c8035e This file needed an update..
foobar authored
9 VERSION=${2:-`echo $TARDIR | sed "s/$PREFIX-//g"`}
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
10
11 if [ "$VERSION" = "" ]
12 then cat <<"EOH"
13 $PREFIX source needs to be installed in a folder that contains the version
14 number, e.g. ${PREFIX}4 or ${PREFIX}4b2
15 EOH
16 fi
17
18 echo "Usage:"
19 echo "$0 <release>"
20 echo
21 echo "e.g.:"
22 echo "$0 2"
23 echo -n "Building RPM version $VERSION, release: $RELEASE "
24 sleep 1 ; echo -n . ; sleep 1 ; echo -n . ; sleep 1 ; echo -n .
25 echo
26
5c8035e This file needed an update..
foobar authored
27 TAR=php-$VERSION.tar.gz
28 SPEC=php-$VERSION.spec
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
29
30 # write out the .spec file
31 sed -e "s/PVERSION/$VERSION/g" \
32 -e "s/PRELEASE/$RELEASE/g" \
33 -e "s/TARDIR/$TARDIR/g" \
34 > $SPEC <<'EOF'
5c8035e This file needed an update..
foobar authored
35 Summary: PHP 4 - A powerful scripting language
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
36 Name: mod_php4
37 Version: PVERSION
38 Release: PRELEASE
39 Group: Networking/Daemons
5c8035e This file needed an update..
foobar authored
40 Source0: http://www.php.net/distributions/php-%{PACKAGE_VERSION}.tar.gz
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
41 Copyright: GPL
5c8035e This file needed an update..
foobar authored
42 BuildRoot: /tmp/php4-root
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
43 Requires: webserver
44
45 %description
564f979 Small fix: Description still referred to package as PHP3.
Joey Smith authored
46 PHP4 is a powerful apache module that adds scripting and database connection
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
47 capabilities to the apache server. This version includes the "php" binary
48 for suExec and stand alone php scripts too.
49
50 %prep
51 %setup -q -n TARDIR
52 #mkdir manual; cd manual && tar xzf $RPM_SOURCE_DIR/php3-manual.tar.gz
53 chown -R root.root .
54 ./buildconf
55
56 %build
57 # first the standalone (why can't you build both at once?)
58 # need to run this under sh or it breaks
59
60 sh ./configure --prefix=/usr \
61 --with-config-file-path=/usr/lib \
62 --enable-force-cgi-redirect \
63 --enable-safe-mode \
64 --with-exec-dir=/usr/bin \
65 --with-mysql=/usr \
66 --with-pdflib=/usr \
5c8035e This file needed an update..
foobar authored
67 --with-zlib=/usr \
68 --enable-xml \
69 --enable-wddx
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
70
71 make
72 mv php php.keepme
73
74 # then the apache module
75 rm config.cache
76 sh ./configure --prefix=/usr \
77 --with-apxs=/usr/sbin/apxs \
78 --enable-versioning \
79 --with-config-file-path=/usr/lib \
80 --enable-safe-mode \
81 --with-exec-dir=/usr/bin \
82 --with-mysql=/usr \
83 --with-pdflib=/usr \
5c8035e This file needed an update..
foobar authored
84 --with-zlib=/usr \
85 --enable-xml \
86 --enable-wddx
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
87
88 make clean
89 make
90 # restore cgi version
91 mv php.keepme php
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 mkdir -p $RPM_BUILD_ROOT/usr/lib/apache
ea2a3bd - Fix a path and remove --with-imap
Derick Rethans authored
96 install -m 755 .libs/libphp4.so $RPM_BUILD_ROOT/usr/lib/apache
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
97 mkdir -p $RPM_BUILD_ROOT/usr/bin
98 install -m 755 php $RPM_BUILD_ROOT/usr/bin
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %changelog
ea2a3bd - Fix a path and remove --with-imap
Derick Rethans authored
104 * Mon Mar 04 2002 Arjen Lentz <agl@bitbike.com>
105 - Fix path and remove --with-imap due to conflicts with kerberos.
106
5c8035e This file needed an update..
foobar authored
107 * Fri Jun 29 2001 Jani Taskinen <sniper@iki.fi>
108 - Removed some useless configure options. Made the tar names correct.
109
564f979 Small fix: Description still referred to package as PHP3.
Joey Smith authored
110 * Sun Apr 30 2000 Joey Smith <joey@samaritan.com>
111 - Small fix: Description still referred to package as PHP3.
112
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
113 * Wed Jul 21 1999 Sam Liddicott <sam@campbellsci.co.uk>
114 - added php4b1 and modified cgi building rules so it doesn't break module
115
116 * Wed Mar 17 1999 Sam Liddicott <sam@campbellsci.co.uk>
117 - Stuffed in 3.0.7 source tar and added "php" as a build destination
118
119 * Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
120 - rebuild for apache 1.3.3
121
122 * Thu Oct 08 1998 Preston Brown <pbrown@redhat.com>
123 - updated to 3.0.5, fixes nasty bugs in 3.0.4.
124
125 * Sun Sep 27 1998 Cristian Gafton <gafton@redhat.com>
126 - updated to 3.0.4 and recompiled for apache 1.3.2
127
128 * Thu Sep 03 1998 Preston Brown <pbrown@redhat.com>
129 - improvements; builds with apache-devel package installed.
130
131 * Tue Sep 01 1998 Preston Brown <pbrown@redhat.com>
132 - Made initial cut for PHP3.
133
134 %files
135 /usr/lib/apache/libphp4.so
136 /usr/bin/php
137 %doc TODO CODING_STANDARDS CREDITS ChangeLog LICENSE BUGS examples
138 %doc manual/*
139 EOF
140
141 RPMDIR=/usr/src/redhat/RPMS
142 SPECDIR=/usr/src/redhat/SPECS
143 SRCDIR=/usr/src/redhat/SOURCES
144
145 (
146 make clean
147 find . -name config.cache -exec rm -f '{}'
148 cd ..
149 tar czvf ${SRCDIR}/${TAR} $TARDIR )
150
151 cp -a $SPEC $SPECDIR/${SPEC}
152 #cp -a *.patch $SRCDIR
153 cd $SRCDIR
154 chown -R root.root ${TAR}
155 cd $SPECDIR
156 rpm -ba -v ${SPEC}
Something went wrong with that request. Please try again.