3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=fb1aac107870f897d26563a9cc5053c0
10 PKG_SOURCE_URL
:=http
://fr.php.net
/distributions
/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 include $(TOPDIR
)/package
/rules.mk
18 define PKG_mod_template
21 install -d
-m0755
$$(IDIR_
$(1))/usr
/lib
/php
22 install -m0755
$(PKG_BUILD_DIR
)/modules
/$(2).so
$$(IDIR_
$(1))/usr
/lib
/php
23 $(RSTRIP
) $$(IDIR_
$(1))
24 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
28 PKG_CONFIGURE_OPTS
:= \
36 --with-config-file-path
=/etc \
38 --enable-magic-quotes \
39 --enable-memory-limit \
40 --disable-short-tags \
48 --without-libxml-dir \
51 --with-openssl
=shared
,"$(STAGING_DIR)/usr" \
53 --with-openssl-dir
="$(STAGING_DIR)/usr" \
54 --enable-session
=shared \
57 --enable-sockets
=shared \
59 --with-zlib
="$(STAGING_DIR)/usr" \
60 --with-zlib-dir
="$(STAGING_DIR)/usr" \
62 ifneq ($(BR2_PACKAGE_PHP5_MOD_GD
),)
63 PKG_CONFIGURE_OPTS
+= --with-gd
=shared
,"$(STAGING_DIR)/usr" \
64 --enable-gd-native-ttf \
65 --with-png-dir
="$(STAGING_DIR)/usr"
67 PKG_CONFIGURE_OPTS
+= --without-gd
69 ifneq ($(BR2_PACKAGE_PHP5_MOD_LDAP
),)
70 PKG_CONFIGURE_OPTS
+= --with-ldap
=shared
,"$(STAGING_DIR)/usr" \
71 --with-ldap-sasl
="$(STAGING_DIR)/usr"
73 PKG_CONFIGURE_OPTS
+= --without-ldap
75 ifneq ($(BR2_PACKAGE_PHP5_MOD_MYSQL
),)
76 PKG_CONFIGURE_OPTS
+= --with-mysql
=shared
,"$(STAGING_DIR)/usr"
78 PKG_CONFIGURE_OPTS
+= --without-mysql
80 ifneq ($(BR2_PACKAGE_PHP5_MOD_PCRE
),)
81 PKG_CONFIGURE_OPTS
+= --with-pcre-regex
=shared
,"$(STAGING_DIR)/usr"
83 PKG_CONFIGURE_OPTS
+= --without-pcre-regex
85 ifneq ($(BR2_PACKAGE_PHP5_MOD_PGSQL
),)
86 PKG_CONFIGURE_OPTS
+= --with-pgsql
=shared
,"$(STAGING_DIR)/usr"
88 PKG_CONFIGURE_OPTS
+= --without-pgsql
90 ifneq ($(BR2_PACKAGE_PHP5_MOD_SQLITE
),)
91 PKG_CONFIGURE_OPTS
+= --with-sqlite
=shared
,"$(STAGING_DIR)/usr"
93 PKG_CONFIGURE_OPTS
+= --without-sqlite
95 ifneq ($(BR2_PACKAGE_PHP5_MOD_XML
),)
96 PKG_CONFIGURE_OPTS
+= --enable-xml
=shared
,"$(STAGING_DIR)/usr" \
97 --with-libexpat-dir
="$(STAGING_DIR)/usr"
99 PKG_CONFIGURE_OPTS
+= --disable-xml
102 $(eval
$(call PKG_template
,PHP5_CLI
,php5-cli
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
103 $(eval
$(call PKG_template
,PHP5_CGI
,php5-cgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
104 $(eval
$(call PKG_template
,PHP5_FASTCGI
,php5-fastcgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
106 $(eval
$(call PKG_template
,PHP5_MOD_FTP
,php5-mod-ftp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
107 $(eval
$(call PKG_template
,PHP5_MOD_GD
,php5-mod-gd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
108 $(eval
$(call PKG_template
,PHP5_MOD_LDAP
,php5-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
109 $(eval
$(call PKG_template
,PHP5_MOD_MYSQL
,php5-mod-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
110 $(eval
$(call PKG_template
,PHP5_MOD_OPENSSL
,php5-mod-openssl
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
111 $(eval
$(call PKG_template
,PHP5_MOD_PCRE
,php5-mod-pcre
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
112 $(eval
$(call PKG_template
,PHP5_MOD_PGSQL
,php5-mod-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
113 $(eval
$(call PKG_template
,PHP5_MOD_SESSION
,php5-mod-session
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
114 $(eval
$(call PKG_template
,PHP5_MOD_SOCKETS
,php5-mod-sockets
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
115 $(eval
$(call PKG_template
,PHP5_MOD_SQLITE
,php5-mod-sqlite
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
116 $(eval
$(call PKG_template
,PHP5_MOD_XML
,php5-mod-xml
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
118 $(eval
$(call PKG_mod_template
,PHP5_MOD_FTP
,ftp
))
119 $(eval
$(call PKG_mod_template
,PHP5_MOD_GD
,gd
))
120 $(eval
$(call PKG_mod_template
,PHP5_MOD_LDAP
,ldap
))
121 $(eval
$(call PKG_mod_template
,PHP5_MOD_MYSQL
,mysql
))
122 $(eval
$(call PKG_mod_template
,PHP5_MOD_OPENSSL
,openssl
))
123 $(eval
$(call PKG_mod_template
,PHP5_MOD_PCRE
,pcre
))
124 $(eval
$(call PKG_mod_template
,PHP5_MOD_PGSQL
,pgsql
))
125 $(eval
$(call PKG_mod_template
,PHP5_MOD_SESSION
,session
))
126 $(eval
$(call PKG_mod_template
,PHP5_MOD_SOCKETS
,sockets
))
127 $(eval
$(call PKG_mod_template
,PHP5_MOD_SQLITE
,sqlite
))
128 $(eval
$(call PKG_mod_template
,PHP5_MOD_XML
,xml
))
131 $(PKG_BUILD_DIR
)/.configured
:
134 $(PKG_BUILD_DIR
)/.built
:
135 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
136 $(TARGET_CONFIGURE_OPTS
) \
137 CFLAGS
="$(TARGET_CFLAGS)" \
138 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
139 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
140 LIBS
="-lcrypto -lssl" \
141 php_cv_cc_rpath
="no" \
143 --target
=$(GNU_TARGET_NAME
) \
144 --host
=$(GNU_TARGET_NAME
) \
145 --build
=$(GNU_HOST_NAME
) \
146 --program-prefix
="" \
147 --program-suffix
="" \
151 --datadir=/usr
/share \
152 --includedir=/usr
/include \
153 --infodir=/usr
/share
/info \
155 --libexecdir
=/usr
/lib \
156 --localstatedir
=/var \
157 --mandir=/usr
/share
/man \
158 --sbindir
=/usr
/sbin \
160 $(DISABLE_LARGEFILE
) \
162 $(PKG_CONFIGURE_OPTS
) \
166 --enable-force-cgi-redirect \
167 --enable-discard-path \
169 $(MAKE
) -C
$(PKG_BUILD_DIR
)
170 mv
$(PKG_BUILD_DIR
)/sapi
/cli
/php
$(PKG_BUILD_DIR
)/php-cli
171 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
172 $(TARGET_CONFIGURE_OPTS
) \
173 CFLAGS
="$(TARGET_CFLAGS)" \
174 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
175 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
176 LIBS
="-lcrypto -lssl" \
177 php_cv_cc_rpath
="no" \
179 --target
=$(GNU_TARGET_NAME
) \
180 --host
=$(GNU_TARGET_NAME
) \
181 --build
=$(GNU_HOST_NAME
) \
182 --program-prefix
="" \
183 --program-suffix
="" \
187 --datadir=/usr
/share \
188 --includedir=/usr
/include \
189 --infodir=/usr
/share
/info \
191 --libexecdir
=/usr
/lib \
192 --localstatedir
=/var \
193 --mandir=/usr
/share
/man \
194 --sbindir
=/usr
/sbin \
196 $(DISABLE_LARGEFILE
) \
198 $(PKG_CONFIGURE_OPTS
) \
202 --enable-force-cgi-redirect \
203 --enable-discard-path \
205 $(MAKE
) -C
$(PKG_BUILD_DIR
)
206 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-cgi
207 $(MAKE
) -C
$(PKG_BUILD_DIR
) clean
208 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
209 $(TARGET_CONFIGURE_OPTS
) \
210 CFLAGS
="$(TARGET_CFLAGS)" \
211 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
212 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
213 LIBS
="-lcrypto -lssl" \
214 php_cv_cc_rpath
="no" \
216 --target
=$(GNU_TARGET_NAME
) \
217 --host
=$(GNU_TARGET_NAME
) \
218 --build
=$(GNU_HOST_NAME
) \
219 --program-prefix
="" \
220 --program-suffix
="" \
224 --datadir=/usr
/share \
225 --includedir=/usr
/include \
226 --infodir=/usr
/share
/info \
228 --libexecdir
=/usr
/lib \
229 --localstatedir
=/var \
230 --mandir=/usr
/share
/man \
231 --sbindir
=/usr
/sbin \
233 $(DISABLE_LARGEFILE
) \
235 $(PKG_CONFIGURE_OPTS
) \
239 --enable-force-cgi-redirect \
240 --enable-discard-path \
242 $(MAKE
) -C
$(PKG_BUILD_DIR
)
243 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-fastcgi
247 install -m0755
-d
$(IDIR_PHP5_CLI
)/etc
248 install -m0644 .
/files
/php.ini
$(IDIR_PHP5_CLI
)/etc
/
249 install -m0755
-d
$(IDIR_PHP5_CLI
)/usr
/bin
250 cp
-fpR
$(PKG_BUILD_DIR
)/php-cli
$(IDIR_PHP5_CLI
)/usr
/bin
/php
251 $(RSTRIP
) $(IDIR_PHP5_CLI
)
252 $(IPKG_BUILD
) $(IDIR_PHP5_CLI
) $(PACKAGE_DIR
)
255 install -m0755
-d
$(IDIR_PHP5_CGI
)/etc
256 install -m0644 .
/files
/php.ini
$(IDIR_PHP5_CGI
)/etc
/
257 install -m0755
-d
$(IDIR_PHP5_CGI
)/usr
/bin
258 cp
-fpR
$(PKG_BUILD_DIR
)/php-cgi
$(IDIR_PHP5_CGI
)/usr
/bin
/php
259 $(RSTRIP
) $(IDIR_PHP5_CGI
)
260 $(IPKG_BUILD
) $(IDIR_PHP5_CGI
) $(PACKAGE_DIR
)
262 $(IPKG_PHP5_FASTCGI
):
263 install -m0755
-d
$(IDIR_PHP5_FASTCGI
)/etc
264 install -m0644 .
/files
/php.ini
$(IDIR_PHP5_FASTCGI
)/etc
/
265 install -m0755
-d
$(IDIR_PHP5_FASTCGI
)/etc
/init.d
266 install -m0755 .
/files
/php.init
$(IDIR_PHP5_FASTCGI
)/etc
/init.d
/php
267 install -m0755
-d
$(IDIR_PHP5_FASTCGI
)/usr
/sbin
268 cp
-fpR
$(PKG_BUILD_DIR
)/php-fastcgi
$(IDIR_PHP5_FASTCGI
)/usr
/sbin
/php
269 $(RSTRIP
) $(IDIR_PHP5_FASTCGI
)
270 $(IPKG_BUILD
) $(IDIR_PHP5_FASTCGI
) $(PACKAGE_DIR
)