Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 171 lines (139 sloc) 4.421 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
31f10bc Correct license
Marcus Boerger authored
41 Copyright: PHP License
ce983da Use RPM variables
Marcus Boerger authored
42 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
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 ./buildconf
54
55 %build
56 # first the standalone (why can't you build both at once?)
57 # need to run this under sh or it breaks
58
59 sh ./configure --prefix=/usr \
d16b06c Make this thing actually work again
Marcus Boerger authored
60 --with-config-file-path=/etc \
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
61 --enable-force-cgi-redirect \
62 --enable-safe-mode \
63 --with-exec-dir=/usr/bin \
d16b06c Make this thing actually work again
Marcus Boerger authored
64 --with-mysql \
65 --with-zlib \
5c8035e This file needed an update..
foobar authored
66 --enable-xml \
67 --enable-wddx
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
68
69 make
d16b06c Make this thing actually work again
Marcus Boerger authored
70 mv sapi/cgi/php php.keepme
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
71
72 # then the apache module
d16b06c Make this thing actually work again
Marcus Boerger authored
73 test -f config.cache && rm -f config.cache
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
74 sh ./configure --prefix=/usr \
75 --with-apxs=/usr/sbin/apxs \
76 --enable-versioning \
d16b06c Make this thing actually work again
Marcus Boerger authored
77 --enable-cli \
78 --with-config-file-path=/etc \
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
79 --enable-safe-mode \
80 --with-exec-dir=/usr/bin \
d16b06c Make this thing actually work again
Marcus Boerger authored
81 --with-mysql \
82 --with-zlib \
5c8035e This file needed an update..
foobar authored
83 --enable-xml \
84 --enable-wddx
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
85
86 make clean
87 make
88 # restore cgi version
d16b06c Make this thing actually work again
Marcus Boerger authored
89 mv php.keepme sapi/cgi/php
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
ce983da Use RPM variables
Marcus Boerger authored
93 mkdir -p $RPM_BUILD_ROOT%{_libdir}/apache
d525845 still version 4 here
Marcus Boerger authored
94 install -m 0755 .libs/libphp4.so $RPM_BUILD_ROOT%{_libdir}/apache
ce983da Use RPM variables
Marcus Boerger authored
95 mkdir -p $RPM_BUILD_ROOT%{_bindir}
96 install -m 0755 sapi/cli/php $RPM_BUILD_ROOT%{_bindir}
97 install -m 0755 sapi/cgi/php $RPM_BUILD_ROOT%{_bindir}/php_cgi
98 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
99 install -m 0755 sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1
100 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
101 install -m 0755 php.ini-recommended $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %changelog
d16b06c Make this thing actually work again
Marcus Boerger authored
107 * Tue Jan 20 2004 Marcus Boerger <helly@php.net>
108 - Fix script
109 - Drop pdf
110 - Drop hardcoded path to libs
111 - Change ini path to /etc
112 - Added man page
113 - Added cli binary
114
ea2a3bd - Fix a path and remove --with-imap
Derick Rethans authored
115 * Mon Mar 04 2002 Arjen Lentz <agl@bitbike.com>
116 - Fix path and remove --with-imap due to conflicts with kerberos.
117
5c8035e This file needed an update..
foobar authored
118 * Fri Jun 29 2001 Jani Taskinen <sniper@iki.fi>
119 - Removed some useless configure options. Made the tar names correct.
120
564f979 Small fix: Description still referred to package as PHP3.
Joey Smith authored
121 * Sun Apr 30 2000 Joey Smith <joey@samaritan.com>
122 - Small fix: Description still referred to package as PHP3.
123
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
124 * Wed Jul 21 1999 Sam Liddicott <sam@campbellsci.co.uk>
125 - added php4b1 and modified cgi building rules so it doesn't break module
126
127 * Wed Mar 17 1999 Sam Liddicott <sam@campbellsci.co.uk>
128 - Stuffed in 3.0.7 source tar and added "php" as a build destination
129
130 * Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
131 - rebuild for apache 1.3.3
132
133 * Thu Oct 08 1998 Preston Brown <pbrown@redhat.com>
134 - updated to 3.0.5, fixes nasty bugs in 3.0.4.
135
136 * Sun Sep 27 1998 Cristian Gafton <gafton@redhat.com>
137 - updated to 3.0.4 and recompiled for apache 1.3.2
138
139 * Thu Sep 03 1998 Preston Brown <pbrown@redhat.com>
140 - improvements; builds with apache-devel package installed.
141
142 * Tue Sep 01 1998 Preston Brown <pbrown@redhat.com>
143 - Made initial cut for PHP3.
144
145 %files
d16b06c Make this thing actually work again
Marcus Boerger authored
146 %defattr(-,root,root)
ce983da Use RPM variables
Marcus Boerger authored
147 %{_libdir}/apache/libphp4.so
148 %{_bindir}/php
149 %{_bindir}/php_cgi
150 %{_mandir}/man1/php.1*
151 %{_sysconfdir}/php.ini
d16b06c Make this thing actually work again
Marcus Boerger authored
152
153 %doc TODO CODING_STANDARDS CREDITS ChangeLog LICENSE NEWS
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
154 EOF
155
156 RPMDIR=/usr/src/redhat/RPMS
157 SPECDIR=/usr/src/redhat/SPECS
158 SRCDIR=/usr/src/redhat/SOURCES
159
160 (
161 make clean
d16b06c Make this thing actually work again
Marcus Boerger authored
162 find . -name config.cache -exec rm -f '{}' \;
4b6a032 Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk>
Stig Bakken authored
163 cd ..
164 tar czvf ${SRCDIR}/${TAR} $TARDIR )
165
166 cp -a $SPEC $SPECDIR/${SPEC}
167 #cp -a *.patch $SRCDIR
168 cd $SRCDIR
169 cd $SPECDIR
170 rpm -ba -v ${SPEC}
Something went wrong with that request. Please try again.