English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Contents of /branches/freewrt_1_0/package/php5/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2785 - (show annotations) (download)
Wed Jun 13 21:34:10 2007 UTC (6 years, 8 months ago) by tha
File size: 9446 byte(s)
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

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
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:= php
10 PKG_VERSION:= 5.2.2
11 PKG_RELEASE:= 1
12 PKG_MD5SUM:= 7a920d0096900b2b962b21dc5c55fe3c
13 PKG_INIT:= 80
14 PKG_SOURCE_URL:= http://de.php.net/distributions
15
16 include $(TOPDIR)/mk/package.mk
17
18 define 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
26 endef
27
28 PKG_CONFIGURE_OPTS:= \
29 --enable-shared \
30 --disable-static \
31 --disable-rpath \
32 --disable-debug \
33 --without-pear \
34 --disable-spl \
35 --with-config-file-path=/etc \
36 --disable-ipv6 \
37 --enable-magic-quotes \
38 --enable-memory-limit \
39 --disable-short-tags \
40 --disable-ctype \
41 --disable-dom \
42 --enable-ftp=shared \
43 --without-gettext \
44 --without-iconv \
45 --disable-libxml \
46 --without-libxml-dir \
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 --disable-simplexml \
54 --disable-xmlreader \
55 --disable-xmlwriter \
56 --disable-soap \
57 --enable-sockets=shared \
58 --disable-tokenizer \
59 --disable-filter \
60 --without-ldap-sasl \
61 --with-zlib="$(STAGING_DIR)/usr" \
62 --with-zlib-dir="$(STAGING_DIR)/usr" \
63
64 ifneq ($(FWRT_PACKAGE_PHP5_MOD_CURL),)
65 PKG_CONFIGURE_OPTS+= --with-curl=shared,"$(STAGING_DIR)/usr"
66 else
67 PKG_CONFIGURE_OPTS+= --without-curl
68 endif
69 ifneq ($(FWRT_PACKAGE_PHP5_MOD_GD),)
70 PKG_CONFIGURE_OPTS+= --with-gd=shared,"$(STAGING_DIR)/usr" \
71 --without-freetype-dir \
72 --with-jpeg-dir="$(STAGING_DIR)/usr" \
73 --with-png-dir="$(STAGING_DIR)/usr" \
74 --without-xpm-dir \
75 --without-ttf \
76 --without-t1lib \
77 --enable-gd-native-ttf \
78 --disable-gd-jis-conv
79 else
80 PKG_CONFIGURE_OPTS+= --without-gd
81 endif
82 ifneq ($(FWRT_PACKAGE_PHP5_MOD_GMP),)
83 PKG_CONFIGURE_OPTS+= --with-gmp=shared,"$(STAGING_DIR)/usr"
84 else
85 PKG_CONFIGURE_OPTS+= --without-gmp
86 endif
87 ifneq ($(FWRT_PACKAGE_PHP5_MOD_LDAP),)
88 PKG_CONFIGURE_OPTS+= --with-ldap=shared,"$(STAGING_DIR)/usr"
89 else
90 PKG_CONFIGURE_OPTS+= --without-ldap
91 endif
92 ifneq ($(FWRT_PACKAGE_PHP5_MOD_MYSQL),)
93 PKG_CONFIGURE_OPTS+= --with-mysql=shared,"$(STAGING_DIR)/usr"
94 else
95 PKG_CONFIGURE_OPTS+= --without-mysql
96 endif
97 ifneq ($(FWRT_PACKAGE_PHP5_MOD_PCRE),)
98 PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr"
99 else
100 PKG_CONFIGURE_OPTS+= --without-pcre-regex
101 endif
102 ifneq ($(FWRT_PACKAGE_PHP5_MOD_PGSQL),)
103 PKG_CONFIGURE_OPTS+= --with-pgsql=shared,"$(STAGING_DIR)/usr"
104 else
105 PKG_CONFIGURE_OPTS+= --without-pgsql
106 endif
107 ifneq ($(FWRT_PACKAGE_PHP5_MOD_SQLITE),)
108 PKG_CONFIGURE_OPTS+= --with-sqlite=shared,"$(STAGING_DIR)/usr"
109 else
110 PKG_CONFIGURE_OPTS+= --without-sqlite
111 endif
112 ifneq ($(FWRT_PACKAGE_PHP5_MOD_XML),)
113 PKG_CONFIGURE_OPTS+= --enable-xml=shared,"$(STAGING_DIR)/usr" \
114 --with-libexpat-dir="$(STAGING_DIR)/usr"
115 else
116 PKG_CONFIGURE_OPTS+= --disable-xml
117 endif
118
119 $(eval $(call PKG_template,PHP5_CLI,php5-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
120 $(eval $(call PKG_template,PHP5_CGI,php5-cgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
121 $(eval $(call PKG_template,PHP5_FASTCGI,php5-fastcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
122
123 $(eval $(call PKG_template,PHP5_MOD_CURL,php5-mod-curl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
124 $(eval $(call PKG_template,PHP5_MOD_FTP,php5-mod-ftp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
125 $(eval $(call PKG_template,PHP5_MOD_GD,php5-mod-gd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
126 $(eval $(call PKG_template,PHP5_MOD_GMP,php5-mod-gmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
127 $(eval $(call PKG_template,PHP5_MOD_LDAP,php5-mod-ldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
128 $(eval $(call PKG_template,PHP5_MOD_MYSQL,php5-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
129 $(eval $(call PKG_template,PHP5_MOD_OPENSSL,php5-mod-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
130 $(eval $(call PKG_template,PHP5_MOD_PCRE,php5-mod-pcre,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
131 $(eval $(call PKG_template,PHP5_MOD_PGSQL,php5-mod-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
132 $(eval $(call PKG_template,PHP5_MOD_SESSION,php5-mod-session,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
133 $(eval $(call PKG_template,PHP5_MOD_SOCKETS,php5-mod-sockets,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
134 $(eval $(call PKG_template,PHP5_MOD_SQLITE,php5-mod-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
135 $(eval $(call PKG_template,PHP5_MOD_XML,php5-mod-xml,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
136
137 $(eval $(call PKG_mod_template,PHP5_MOD_CURL,curl))
138 $(eval $(call PKG_mod_template,PHP5_MOD_FTP,ftp))
139 $(eval $(call PKG_mod_template,PHP5_MOD_GD,gd))
140 $(eval $(call PKG_mod_template,PHP5_MOD_GMP,gmp))
141 $(eval $(call PKG_mod_template,PHP5_MOD_LDAP,ldap))
142 $(eval $(call PKG_mod_template,PHP5_MOD_MYSQL,mysql))
143 $(eval $(call PKG_mod_template,PHP5_MOD_OPENSSL,openssl))
144 $(eval $(call PKG_mod_template,PHP5_MOD_PCRE,pcre))
145 $(eval $(call PKG_mod_template,PHP5_MOD_PGSQL,pgsql))
146 $(eval $(call PKG_mod_template,PHP5_MOD_SESSION,session))
147 $(eval $(call PKG_mod_template,PHP5_MOD_SOCKETS,sockets))
148 $(eval $(call PKG_mod_template,PHP5_MOD_SQLITE,sqlite))
149 $(eval $(call PKG_mod_template,PHP5_MOD_XML,xml))
150
151
152 $(WRKBUILD)/.configured:
153 touch $@
154
155 $(WRKBUILD)/.built:
156 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
157 $(TARGET_CONFIGURE_OPTS) \
158 CFLAGS="$(TARGET_CFLAGS)" \
159 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
160 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
161 LIBS="-lcrypto -lssl" \
162 php_cv_cc_rpath="no" \
163 ./configure \
164 --target=$(GNU_TARGET_NAME) \
165 --host=$(GNU_TARGET_NAME) \
166 --build=$(GNU_HOST_NAME) \
167 --program-prefix="" \
168 --program-suffix="" \
169 --prefix=/usr \
170 --exec-prefix=/usr \
171 --bindir=/usr/bin \
172 --datadir=/usr/share \
173 --includedir=/usr/include \
174 --infodir=/usr/share/info \
175 --libdir=/usr/lib \
176 --libexecdir=/usr/lib \
177 --localstatedir=/var \
178 --mandir=/usr/share/man \
179 --sbindir=/usr/sbin \
180 --sysconfdir=/etc \
181 --disable-nls \
182 $(PKG_CONFIGURE_OPTS) \
183 --enable-cli \
184 --disable-cgi \
185 --disable-fastcgi \
186 --enable-force-cgi-redirect \
187 --enable-discard-path \
188 );
189 $(MAKE) -C $(WRKBUILD)
190 mv $(WRKBUILD)/sapi/cli/php $(WRKBUILD)/php-cli
191 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
192 $(TARGET_CONFIGURE_OPTS) \
193 CFLAGS="$(TARGET_CFLAGS)" \
194 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
195 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
196 LIBS="-lcrypto -lssl" \
197 php_cv_cc_rpath="no" \
198 ./configure \
199 --target=$(GNU_TARGET_NAME) \
200 --host=$(GNU_TARGET_NAME) \
201 --build=$(GNU_HOST_NAME) \
202 --program-prefix="" \
203 --program-suffix="" \
204 --prefix=/usr \
205 --exec-prefix=/usr \
206 --bindir=/usr/bin \
207 --datadir=/usr/share \
208 --includedir=/usr/include \
209 --infodir=/usr/share/info \
210 --libdir=/usr/lib \
211 --libexecdir=/usr/lib \
212 --localstatedir=/var \
213 --mandir=/usr/share/man \
214 --sbindir=/usr/sbin \
215 --sysconfdir=/etc \
216 --disable-nls \
217 $(PKG_CONFIGURE_OPTS) \
218 --disable-cli \
219 --enable-cgi \
220 --disable-fastcgi \
221 --enable-force-cgi-redirect \
222 --enable-discard-path \
223 );
224 $(MAKE) -C $(WRKBUILD)
225 mv $(WRKBUILD)/sapi/cgi/php $(WRKBUILD)/php-cgi
226 $(MAKE) -C $(WRKBUILD) clean
227 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
228 $(TARGET_CONFIGURE_OPTS) \
229 CFLAGS="$(TARGET_CFLAGS)" \
230 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
231 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
232 LIBS="-lcrypto -lssl" \
233 php_cv_cc_rpath="no" \
234 ./configure \
235 --target=$(GNU_TARGET_NAME) \
236 --host=$(GNU_TARGET_NAME) \
237 --build=$(GNU_HOST_NAME) \
238 --program-prefix="" \
239 --program-suffix="" \
240 --prefix=/usr \
241 --exec-prefix=/usr \
242 --bindir=/usr/sbin \
243 --datadir=/usr/share \
244 --includedir=/usr/include \
245 --infodir=/usr/share/info \
246 --libdir=/usr/lib \
247 --libexecdir=/usr/lib \
248 --localstatedir=/var \
249 --mandir=/usr/share/man \
250 --sbindir=/usr/sbin \
251 --sysconfdir=/etc \
252 --disable-nls \
253 $(PKG_CONFIGURE_OPTS) \
254 --disable-cli \
255 --enable-cgi \
256 --enable-fastcgi \
257 --enable-force-cgi-redirect \
258 --enable-discard-path \
259 );
260 $(MAKE) -C $(WRKBUILD)
261 mv $(WRKBUILD)/sapi/cgi/php $(WRKBUILD)/php-fastcgi
262 touch $@
263
264 $(IPKG_PHP5_CLI):
265 install -m0755 -d $(IDIR_PHP5_CLI)/etc
266 install -m0644 ./files/php.ini $(IDIR_PHP5_CLI)/etc/
267 install -m0755 -d $(IDIR_PHP5_CLI)/usr/bin
268 $(CP) $(WRKBUILD)/php-cli $(IDIR_PHP5_CLI)/usr/bin/php
269 $(RSTRIP) $(IDIR_PHP5_CLI)
270 $(IPKG_BUILD) $(IDIR_PHP5_CLI) $(PACKAGE_DIR)
271
272 $(IPKG_PHP5_CGI):
273 install -m0755 -d $(IDIR_PHP5_CGI)/etc
274 install -m0644 ./files/php.ini $(IDIR_PHP5_CGI)/etc/
275 install -m0755 -d $(IDIR_PHP5_CGI)/usr/bin
276 $(CP) $(WRKBUILD)/php-cgi $(IDIR_PHP5_CGI)/usr/bin/php
277 $(RSTRIP) $(IDIR_PHP5_CGI)
278 $(IPKG_BUILD) $(IDIR_PHP5_CGI) $(PACKAGE_DIR)
279
280 $(IPKG_PHP5_FASTCGI):
281 install -m0755 -d $(IDIR_PHP5_FASTCGI)/etc
282 install -m0644 ./files/php.ini $(IDIR_PHP5_FASTCGI)/etc/
283 install -m0755 -d $(IDIR_PHP5_FASTCGI)/etc/init.d
284 install -m0755 ./files/php.init \
285 $(IDIR_PHP5_FASTCGI)/etc/init.d/S$(PKG_INIT)php5
286 install -m0755 -d $(IDIR_PHP5_FASTCGI)/usr/sbin
287 $(CP) $(WRKBUILD)/php-fastcgi $(IDIR_PHP5_FASTCGI)/usr/sbin/php
288 $(RSTRIP) $(IDIR_PHP5_FASTCGI)
289 $(IPKG_BUILD) $(IDIR_PHP5_FASTCGI) $(PACKAGE_DIR)

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20