Skip to content
Newer
Older
100644 177 lines (145 sloc) 4.22 KB
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored Dec 10, 1999
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}
9 VERSION=${2:-`echo $TARDIR | sed "s/$PREFIX//g"`}
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
27 TAR=php$VERSION.tar.gz
28 SPEC=php$VERSION.spec
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'
35 Summary: PHP4b1 - a powerful scripting language for HTML
36 Name: mod_php4
37 Version: PVERSION
38 Release: PRELEASE
39 Group: Networking/Daemons
40 Source0: http://www.php.net/distributions/php%{PACKAGE_VERSION}.tar.gz
41 #Source1: php3-manual.tar.gz
42 Copyright: GPL
43 BuildRoot: /tmp/php3-root
44 Requires: webserver
45
46 %description
564f979 Small fix: Description still referred to package as PHP3.
Joey Smith authored May 1, 2000
47 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 Dec 10, 1999
48 capabilities to the apache server. This version includes the "php" binary
49 for suExec and stand alone php scripts too.
50
51 %prep
52 %setup -q -n TARDIR
53 #mkdir manual; cd manual && tar xzf $RPM_SOURCE_DIR/php3-manual.tar.gz
54 chown -R root.root .
55 ./buildconf
56
57 %build
58 # first the standalone (why can't you build both at once?)
59 # need to run this under sh or it breaks
60 cd ext/wddx
61 ln -s /usr/src/redhat/BUILD/apache_1.3.9/src/lib/expat-lite ./xml
62 cd ../..
63
64 sh ./configure --prefix=/usr \
65 --without-gd \
66 --with-config-file-path=/usr/lib \
67 --enable-force-cgi-redirect \
68 --enable-debugger=yes \
69 --enable-safe-mode \
70 --with-exec-dir=/usr/bin \
71 --with-mysql=/usr \
72 --with-imap=/usr \
73 --with-pdflib=/usr \
74 --with-system-regex \
75 --enable-track-vars \
76 --with-ttf \
77 --with-zlib \
78 --with-xml=/usr/src/redhat/BUILD/apache_1.3.9/src/lib/expat-lite \
79 --with-wddx \
80
81 # ldap don't work
82 # --with-ldap=/usr \
83
84 # system regex conflicts with apache_ssl for some reason
85
86 make
87 mv php php.keepme
88
89 # then the apache module
90 rm config.cache
91 sh ./configure --prefix=/usr \
92 --without-gd \
93 --with-apxs=/usr/sbin/apxs \
94 --enable-versioning \
95 --with-config-file-path=/usr/lib \
96 --enable-debugger=yes \
97 --enable-safe-mode \
98 --with-exec-dir=/usr/bin \
99 --with-mysql=/usr \
100 --with-imap=/usr \
101 --with-pdflib=/usr \
102 --with-system-regex \
103 --enable-track-vars \
104 --with-ttf \
105 --with-zlib \
106 --with-xml=/usr/src/redhat/BUILD/apache_1.3.9/src/lib/expat-lite \
107 --with-wddx \
108
109 # ldap don't work
110 # --with-ldap=/usr \
111
112 # system regex conflicts with apache_ssl for some reason
113
114 make clean
115 make
116 # restore cgi version
117 mv php.keepme php
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121 mkdir -p $RPM_BUILD_ROOT/usr/lib/apache
122 install -m 755 libphp4.so $RPM_BUILD_ROOT/usr/lib/apache
123 mkdir -p $RPM_BUILD_ROOT/usr/bin
124 install -m 755 php $RPM_BUILD_ROOT/usr/bin
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %changelog
564f979 Small fix: Description still referred to package as PHP3.
Joey Smith authored May 1, 2000
130 * Sun Apr 30 2000 Joey Smith <joey@samaritan.com>
131 - Small fix: Description still referred to package as PHP3.
132
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored Dec 10, 1999
133 * Wed Jul 21 1999 Sam Liddicott <sam@campbellsci.co.uk>
134 - added php4b1 and modified cgi building rules so it doesn't break module
135
136 * Wed Mar 17 1999 Sam Liddicott <sam@campbellsci.co.uk>
137 - Stuffed in 3.0.7 source tar and added "php" as a build destination
138
139 * Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
140 - rebuild for apache 1.3.3
141
142 * Thu Oct 08 1998 Preston Brown <pbrown@redhat.com>
143 - updated to 3.0.5, fixes nasty bugs in 3.0.4.
144
145 * Sun Sep 27 1998 Cristian Gafton <gafton@redhat.com>
146 - updated to 3.0.4 and recompiled for apache 1.3.2
147
148 * Thu Sep 03 1998 Preston Brown <pbrown@redhat.com>
149 - improvements; builds with apache-devel package installed.
150
151 * Tue Sep 01 1998 Preston Brown <pbrown@redhat.com>
152 - Made initial cut for PHP3.
153
154 %files
155 /usr/lib/apache/libphp4.so
156 /usr/bin/php
157 %doc TODO CODING_STANDARDS CREDITS ChangeLog LICENSE BUGS examples
158 %doc manual/*
159 EOF
160
161 RPMDIR=/usr/src/redhat/RPMS
162 SPECDIR=/usr/src/redhat/SPECS
163 SRCDIR=/usr/src/redhat/SOURCES
164
165 (
166 make clean
167 find . -name config.cache -exec rm -f '{}'
168 cd ..
169 tar czvf ${SRCDIR}/${TAR} $TARDIR )
170
171 cp -a $SPEC $SPECDIR/${SPEC}
172 #cp -a *.patch $SRCDIR
173 cd $SRCDIR
174 chown -R root.root ${TAR}
175 cd $SPECDIR
176 rpm -ba -v ${SPEC}
Something went wrong with that request. Please try again.