source: freewrt/package/php4/Makefile@ 621d5d2

freewrt_2_0
Last change on this file since 621d5d2 was f13cb8e, checked in by Ralph Paßgang <tha@…>, 18 years ago

upgrade to latest php 4/5 release, because a lot of security related
problems gets fixed. to be exact, the following list of CVE's ;)

CVE-2007-0988, CVE-2007-1001, CVE-2007-1375, CVE-2007-1376,
CVE-2007-1380, CVE-2007-1383, CVE-2007-1453, CVE-2007-1454,
CVE-2007-1460, CVE-2007-1461, CVE-2007-1484, CVE-2007-1521,
CVE-2007-1522, CVE-2007-1583, CVE-2007-1700, CVE-2007-1717,
CVE-2007-1718, CVE-2007-1824, CVE-2007-1889, CVE-2007-1900

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@2785 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 8.8 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:= php
10PKG_VERSION:= 4.4.7
11PKG_RELEASE:= 1
12PKG_MD5SUM:= 2669d2049822ac14abb263703d24f643
13PKG_INIT:= 80
14PKG_SOURCE_URL:= http://fr.php.net/distributions/
15
16include $(TOPDIR)/mk/package.mk
17
18define PKG_mod_template
19
20$$(IPKG_$(1)):
21 install -d -m0755 $$(IDIR_$(1))/usr/lib/php
22 install -m0755 $(WRKBUILD)/modules/$(2).so $$(IDIR_$(1))/usr/lib/php
23 $(RSTRIP) $$(IDIR_$(1))
24 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
25
26endef
27
28PKG_CONFIGURE_OPTS:= \
29 --enable-shared \
30 --disable-static \
31 --disable-rpath \
32 --disable-debug \
33 --without-pear \
34 \
35 --with-config-file-path=/etc \
36 --disable-ipv6 \
37 --enable-magic-quotes \
38 --enable-memory-limit \
39 --disable-overload \
40 --disable-short-tags \
41 \
42 --disable-ctype \
43 --disable-dom \
44 --enable-ftp=shared \
45 --without-gettext \
46 --without-iconv \
47 --disable-mbstring \
48 --disable-mbregex \
49 --with-openssl=shared,"$(STAGING_DIR)/usr" \
50 --with-kerberos=no \
51 --with-openssl-dir="$(STAGING_DIR)/usr" \
52 --enable-session=shared \
53 --enable-sockets=shared \
54 --disable-tokenizer \
55 --with-zlib="$(STAGING_DIR)/usr" \
56 --with-zlib-dir="$(STAGING_DIR)/usr" \
57
58ifneq ($(FWRT_PACKAGE_PHP4_MOD_CURL),)
59PKG_CONFIGURE_OPTS+= --with-curl=shared,"$(STAGING_DIR)/usr"
60else
61PKG_CONFIGURE_OPTS+= --without-curl
62endif
63ifneq ($(FWRT_PACKAGE_PHP4_MOD_GD),)
64PKG_CONFIGURE_OPTS+= --with-gd=shared,"$(STAGING_DIR)/usr" \
65 --without-freetype-dir \
66 --with-jpeg-dir="$(STAGING_DIR)/usr" \
67 --with-png-dir="$(STAGING_DIR)/usr" \
68 --without-xpm-dir \
69 --without-ttf \
70 --without-t1lib \
71 --enable-gd-native-ttf \
72 --disable-gd-jis-conv
73else
74PKG_CONFIGURE_OPTS+= --without-gd
75endif
76ifneq ($(FWRT_PACKAGE_PHP4_MOD_GMP),)
77PKG_CONFIGURE_OPTS+= --with-gmp=shared,"$(STAGING_DIR)/usr"
78else
79PKG_CONFIGURE_OPTS+= --without-gmp
80endif
81#ifneq ($(FWRT_PACKAGE_PHP4_MOD_LDAP),)
82#PKG_CONFIGURE_OPTS+= --with-ldap=shared,"$(STAGING_DIR)/usr"
83# --with-ldap-sasl="$(STAGING_DIR)/usr"
84#else
85PKG_CONFIGURE_OPTS+= --without-ldap
86#endif
87ifneq ($(FWRT_PACKAGE_PHP4_MOD_MYSQL),)
88PKG_CONFIGURE_OPTS+= --with-mysql=shared,"$(STAGING_DIR)/usr"
89else
90PKG_CONFIGURE_OPTS+= --without-mysql
91endif
92ifneq ($(FWRT_PACKAGE_PHP4_MOD_PCRE),)
93PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr"
94else
95PKG_CONFIGURE_OPTS+= --without-pcre-regex
96endif
97ifneq ($(FWRT_PACKAGE_PHP4_MOD_PGSQL),)
98PKG_CONFIGURE_OPTS+= --with-pgsql=shared,"$(STAGING_DIR)/usr"
99else
100PKG_CONFIGURE_OPTS+= --without-pgsql
101endif
102ifneq ($(FWRT_PACKAGE_PHP4_MOD_XML),)
103PKG_CONFIGURE_OPTS+= --enable-xml=shared \
104 --with-expat-dir="$(STAGING_DIR)/usr"
105else
106PKG_CONFIGURE_OPTS+= --disable-xml
107endif
108
109$(eval $(call PKG_template,PHP4_CLI,php4-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
110$(eval $(call PKG_template,PHP4_CGI,php4-cgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
111$(eval $(call PKG_template,PHP4_FASTCGI,php4-fastcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
112
113$(eval $(call PKG_template,PHP4_MOD_CURL,php4-mod-curl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
114$(eval $(call PKG_template,PHP4_MOD_FTP,php4-mod-ftp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
115$(eval $(call PKG_template,PHP4_MOD_GD,php4-mod-gd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
116$(eval $(call PKG_template,PHP4_MOD_GMP,php4-mod-gmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
117#$(eval $(call PKG_template,PHP4_MOD_LDAP,php4-mod-ldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
118$(eval $(call PKG_template,PHP4_MOD_MYSQL,php4-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
119$(eval $(call PKG_template,PHP4_MOD_OPENSSL,php4-mod-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
120$(eval $(call PKG_template,PHP4_MOD_PCRE,php4-mod-pcre,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
121$(eval $(call PKG_template,PHP4_MOD_PGSQL,php4-mod-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
122$(eval $(call PKG_template,PHP4_MOD_SESSION,php4-mod-session,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
123$(eval $(call PKG_template,PHP4_MOD_SOCKETS,php4-mod-sockets,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
124$(eval $(call PKG_template,PHP4_MOD_XML,php4-mod-xml,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
125
126$(eval $(call PKG_mod_template,PHP4_MOD_CURL,curl))
127$(eval $(call PKG_mod_template,PHP4_MOD_FTP,ftp))
128$(eval $(call PKG_mod_template,PHP4_MOD_GD,gd))
129$(eval $(call PKG_mod_template,PHP4_MOD_GMP,gmp))
130#$(eval $(call PKG_mod_template,PHP4_MOD_LDAP,ldap))
131$(eval $(call PKG_mod_template,PHP4_MOD_MYSQL,mysql))
132$(eval $(call PKG_mod_template,PHP4_MOD_OPENSSL,openssl))
133$(eval $(call PKG_mod_template,PHP4_MOD_PCRE,pcre))
134$(eval $(call PKG_mod_template,PHP4_MOD_PGSQL,pgsql))
135$(eval $(call PKG_mod_template,PHP4_MOD_SESSION,session))
136$(eval $(call PKG_mod_template,PHP4_MOD_SOCKETS,sockets))
137$(eval $(call PKG_mod_template,PHP4_MOD_XML,xml))
138
139
140$(WRKBUILD)/.configured:
141 touch $@
142
143$(WRKBUILD)/.built:
144 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
145 $(TARGET_CONFIGURE_OPTS) \
146 CFLAGS="$(TARGET_CFLAGS)" \
147 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
148 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
149 LIBS="-lcrypto -lssl" \
150 php_cv_cc_rpath="no" \
151 ./configure \
152 --target=$(GNU_TARGET_NAME) \
153 --host=$(GNU_TARGET_NAME) \
154 --build=$(GNU_HOST_NAME) \
155 --program-prefix="" \
156 --program-suffix="" \
157 --prefix=/usr \
158 --exec-prefix=/usr \
159 --bindir=/usr/bin \
160 --datadir=/usr/share \
161 --includedir=/usr/include \
162 --infodir=/usr/share/info \
163 --libdir=/usr/lib \
164 --libexecdir=/usr/lib \
165 --localstatedir=/var \
166 --mandir=/usr/share/man \
167 --sbindir=/usr/sbin \
168 --sysconfdir=/etc \
169 --disable-nls \
170 $(PKG_CONFIGURE_OPTS) \
171 --enable-cli \
172 --disable-cgi \
173 --disable-fastcgi \
174 --enable-force-cgi-redirect \
175 --enable-discard-path \
176 );
177 $(MAKE) -C $(WRKBUILD)
178 mv $(WRKBUILD)/sapi/cli/php $(WRKBUILD)/php-cli
179 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
180 $(TARGET_CONFIGURE_OPTS) \
181 CFLAGS="$(TARGET_CFLAGS)" \
182 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
183 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
184 LIBS="-lcrypto -lssl" \
185 php_cv_cc_rpath="no" \
186 ./configure \
187 --target=$(GNU_TARGET_NAME) \
188 --host=$(GNU_TARGET_NAME) \
189 --build=$(GNU_HOST_NAME) \
190 --program-prefix="" \
191 --program-suffix="" \
192 --prefix=/usr \
193 --exec-prefix=/usr \
194 --bindir=/usr/bin \
195 --datadir=/usr/share \
196 --includedir=/usr/include \
197 --infodir=/usr/share/info \
198 --libdir=/usr/lib \
199 --libexecdir=/usr/lib \
200 --localstatedir=/var \
201 --mandir=/usr/share/man \
202 --sbindir=/usr/sbin \
203 --sysconfdir=/etc \
204 --disable-nls \
205 $(PKG_CONFIGURE_OPTS) \
206 --disable-cli \
207 --enable-cgi \
208 --disable-fastcgi \
209 --enable-force-cgi-redirect \
210 --enable-discard-path \
211 );
212 $(MAKE) -C $(WRKBUILD)
213 mv $(WRKBUILD)/sapi/cgi/php $(WRKBUILD)/php-cgi
214 $(MAKE) -C $(WRKBUILD) clean
215 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
216 $(TARGET_CONFIGURE_OPTS) \
217 CFLAGS="$(TARGET_CFLAGS)" \
218 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
219 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
220 LIBS="-lcrypto -lssl" \
221 php_cv_cc_rpath="no" \
222 ./configure \
223 --target=$(GNU_TARGET_NAME) \
224 --host=$(GNU_TARGET_NAME) \
225 --build=$(GNU_HOST_NAME) \
226 --program-prefix="" \
227 --program-suffix="" \
228 --prefix=/usr \
229 --exec-prefix=/usr \
230 --bindir=/usr/sbin \
231 --datadir=/usr/share \
232 --includedir=/usr/include \
233 --infodir=/usr/share/info \
234 --libdir=/usr/lib \
235 --libexecdir=/usr/lib \
236 --localstatedir=/var \
237 --mandir=/usr/share/man \
238 --sbindir=/usr/sbin \
239 --sysconfdir=/etc \
240 --disable-nls \
241 $(PKG_CONFIGURE_OPTS) \
242 --disable-cli \
243 --enable-cgi \
244 --enable-fastcgi \
245 --enable-force-cgi-redirect \
246 --enable-discard-path \
247 );
248 $(MAKE) -C $(WRKBUILD)
249 mv $(WRKBUILD)/sapi/cgi/php $(WRKBUILD)/php-fastcgi
250 touch $@
251
252$(IPKG_PHP4_CLI):
253 install -m0755 -d $(IDIR_PHP4_CLI)/etc
254 install -m0644 ./files/php.ini $(IDIR_PHP4_CLI)/etc/
255 install -m0755 -d $(IDIR_PHP4_CLI)/usr/bin
256 $(CP) $(WRKBUILD)/php-cli $(IDIR_PHP4_CLI)/usr/bin/php
257 $(RSTRIP) $(IDIR_PHP4_CLI)
258 $(IPKG_BUILD) $(IDIR_PHP4_CLI) $(PACKAGE_DIR)
259
260$(IPKG_PHP4_CGI):
261 install -m0755 -d $(IDIR_PHP4_CGI)/etc
262 install -m0644 ./files/php.ini $(IDIR_PHP4_CGI)/etc/
263 install -m0755 -d $(IDIR_PHP4_CGI)/usr/bin
264 $(CP) $(WRKBUILD)/php-cgi $(IDIR_PHP4_CGI)/usr/bin/php
265 $(RSTRIP) $(IDIR_PHP4_CGI)
266 $(IPKG_BUILD) $(IDIR_PHP4_CGI) $(PACKAGE_DIR)
267
268$(IPKG_PHP4_FASTCGI):
269 install -m0755 -d $(IDIR_PHP4_FASTCGI)/etc
270 install -m0644 ./files/php.ini $(IDIR_PHP4_FASTCGI)/etc/
271 install -m0755 -d $(IDIR_PHP4_FASTCGI)/etc/init.d
272 install -m0755 ./files/php.init \
273 $(IDIR_PHP4_FASTCGI)/etc/init.d/S$(PKG_INIT)php
274 install -m0755 -d $(IDIR_PHP4_FASTCGI)/usr/sbin
275 $(CP) $(WRKBUILD)/php-fastcgi $(IDIR_PHP4_FASTCGI)/usr/sbin/php
276 $(RSTRIP) $(IDIR_PHP4_FASTCGI)
277 $(IPKG_BUILD) $(IDIR_PHP4_FASTCGI) $(PACKAGE_DIR)
Note: See TracBrowser for help on using the repository browser.