3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=fbc67d240812136a9842bc1f2a217b7a
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
:= \
35 --with-config-file-path
=/etc \
37 --enable-magic-quotes \
38 --enable-memory-limit \
40 --disable-short-tags \
49 --with-openssl
=shared
,"$(STAGING_DIR)/usr" \
51 --with-openssl-dir
="$(STAGING_DIR)/usr" \
52 --enable-session
=shared \
53 --enable-sockets
=shared \
55 --with-zlib
="$(STAGING_DIR)/usr" \
56 --with-zlib-dir
="$(STAGING_DIR)/usr" \
58 ifneq ($(BR2_PACKAGE_PHP4_MOD_GD
),)
59 PKG_CONFIGURE_OPTS
+= --with-gd
=shared
,"$(STAGING_DIR)/usr" \
60 --enable-gd-native-ttf \
61 --with-png-dir
="$(STAGING_DIR)/usr"
63 PKG_CONFIGURE_OPTS
+= --without-gd
65 ifneq ($(BR2_PACKAGE_PHP4_MOD_LDAP
),)
66 PKG_CONFIGURE_OPTS
+= --with-ldap
=shared
,"$(STAGING_DIR)/usr"
67 --with-ldap-sasl
="$(STAGING_DIR)/usr"
69 PKG_CONFIGURE_OPTS
+= --without-ldap
71 ifneq ($(BR2_PACKAGE_PHP4_MOD_MYSQL
),)
72 PKG_CONFIGURE_OPTS
+= --with-mysql
=shared
,"$(STAGING_DIR)/usr"
74 PKG_CONFIGURE_OPTS
+= --without-mysql
76 ifneq ($(BR2_PACKAGE_PHP4_MOD_PCRE
),)
77 PKG_CONFIGURE_OPTS
+= --with-pcre-regex
=shared
,"$(STAGING_DIR)/usr"
79 PKG_CONFIGURE_OPTS
+= --without-pcre-regex
81 ifneq ($(BR2_PACKAGE_PHP4_MOD_PGSQL
),)
82 PKG_CONFIGURE_OPTS
+= --with-pgsql
=shared
,"$(STAGING_DIR)/usr"
84 PKG_CONFIGURE_OPTS
+= --without-pgsql
86 ifneq ($(BR2_PACKAGE_PHP4_MOD_SQLITE
),)
87 PKG_CONFIGURE_OPTS
+= --with-sqlite
=shared
,"$(STAGING_DIR)/usr"
89 PKG_CONFIGURE_OPTS
+= --without-sqlite
91 ifneq ($(BR2_PACKAGE_PHP4_MOD_XML
),)
92 PKG_CONFIGURE_OPTS
+= --enable-xml
=shared \
93 --with-expat-dir
="$(STAGING_DIR)/usr"
95 PKG_CONFIGURE_OPTS
+= --disable-xml
98 $(eval
$(call PKG_template
,PHP4_CLI
,php4-cli
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
99 $(eval
$(call PKG_template
,PHP4_CGI
,php4-cgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
100 $(eval
$(call PKG_template
,PHP4_FASTCGI
,php4-fastcgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
102 $(eval
$(call PKG_template
,PHP4_MOD_FTP
,php4-mod-ftp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
103 $(eval
$(call PKG_template
,PHP4_MOD_GD
,php4-mod-gd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
104 $(eval
$(call PKG_template
,PHP4_MOD_LDAP
,php4-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
105 $(eval
$(call PKG_template
,PHP4_MOD_MYSQL
,php4-mod-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
106 $(eval
$(call PKG_template
,PHP4_MOD_OPENSSL
,php4-mod-openssl
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
107 $(eval
$(call PKG_template
,PHP4_MOD_PCRE
,php4-mod-pcre
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
108 $(eval
$(call PKG_template
,PHP4_MOD_PGSQL
,php4-mod-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
109 $(eval
$(call PKG_template
,PHP4_MOD_SESSION
,php4-mod-session
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
110 $(eval
$(call PKG_template
,PHP4_MOD_SOCKETS
,php4-mod-sockets
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
111 $(eval
$(call PKG_template
,PHP4_MOD_SQLITE
,php4-mod-sqlite
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
112 $(eval
$(call PKG_template
,PHP4_MOD_XML
,php4-mod-xml
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
114 $(eval
$(call PKG_mod_template
,PHP4_MOD_FTP
,ftp
))
115 $(eval
$(call PKG_mod_template
,PHP4_MOD_GD
,gd
))
116 $(eval
$(call PKG_mod_template
,PHP4_MOD_LDAP
,ldap
))
117 $(eval
$(call PKG_mod_template
,PHP4_MOD_MYSQL
,mysql
))
118 $(eval
$(call PKG_mod_template
,PHP4_MOD_OPENSSL
,openssl
))
119 $(eval
$(call PKG_mod_template
,PHP4_MOD_PCRE
,pcre
))
120 $(eval
$(call PKG_mod_template
,PHP4_MOD_PGSQL
,pgsql
))
121 $(eval
$(call PKG_mod_template
,PHP4_MOD_SESSION
,session
))
122 $(eval
$(call PKG_mod_template
,PHP4_MOD_SOCKETS
,sockets
))
123 $(eval
$(call PKG_mod_template
,PHP4_MOD_SQLITE
,sqlite
))
124 $(eval
$(call PKG_mod_template
,PHP4_MOD_XML
,xml
))
127 $(PKG_BUILD_DIR
)/.configured
:
130 $(PKG_BUILD_DIR
)/.built
:
131 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
132 $(TARGET_CONFIGURE_OPTS
) \
133 CFLAGS
="$(TARGET_CFLAGS)" \
134 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
135 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
136 LIBS
="-lcrypto -lssl" \
137 php_cv_cc_rpath
="no" \
139 --target
=$(GNU_TARGET_NAME
) \
140 --host
=$(GNU_TARGET_NAME
) \
141 --build
=$(GNU_HOST_NAME
) \
142 --program-prefix
="" \
143 --program-suffix
="" \
147 --datadir=/usr
/share \
148 --includedir=/usr
/include \
149 --infodir=/usr
/share
/info \
151 --libexecdir
=/usr
/lib \
152 --localstatedir
=/var \
153 --mandir=/usr
/share
/man \
154 --sbindir
=/usr
/sbin \
156 $(DISABLE_LARGEFILE
) \
158 $(PKG_CONFIGURE_OPTS
) \
162 --enable-force-cgi-redirect \
163 --enable-discard-path \
165 $(MAKE
) -C
$(PKG_BUILD_DIR
)
166 mv
$(PKG_BUILD_DIR
)/sapi
/cli
/php
$(PKG_BUILD_DIR
)/php-cli
167 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
168 $(TARGET_CONFIGURE_OPTS
) \
169 CFLAGS
="$(TARGET_CFLAGS)" \
170 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
171 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
172 LIBS
="-lcrypto -lssl" \
173 php_cv_cc_rpath
="no" \
175 --target
=$(GNU_TARGET_NAME
) \
176 --host
=$(GNU_TARGET_NAME
) \
177 --build
=$(GNU_HOST_NAME
) \
178 --program-prefix
="" \
179 --program-suffix
="" \
183 --datadir=/usr
/share \
184 --includedir=/usr
/include \
185 --infodir=/usr
/share
/info \
187 --libexecdir
=/usr
/lib \
188 --localstatedir
=/var \
189 --mandir=/usr
/share
/man \
190 --sbindir
=/usr
/sbin \
192 $(DISABLE_LARGEFILE
) \
194 $(PKG_CONFIGURE_OPTS
) \
198 --enable-force-cgi-redirect \
199 --enable-discard-path \
201 $(MAKE
) -C
$(PKG_BUILD_DIR
)
202 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-cgi
203 $(MAKE
) -C
$(PKG_BUILD_DIR
) clean
204 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
205 $(TARGET_CONFIGURE_OPTS
) \
206 CFLAGS
="$(TARGET_CFLAGS)" \
207 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
208 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
209 LIBS
="-lcrypto -lssl" \
210 php_cv_cc_rpath
="no" \
212 --target
=$(GNU_TARGET_NAME
) \
213 --host
=$(GNU_TARGET_NAME
) \
214 --build
=$(GNU_HOST_NAME
) \
215 --program-prefix
="" \
216 --program-suffix
="" \
220 --datadir=/usr
/share \
221 --includedir=/usr
/include \
222 --infodir=/usr
/share
/info \
224 --libexecdir
=/usr
/lib \
225 --localstatedir
=/var \
226 --mandir=/usr
/share
/man \
227 --sbindir
=/usr
/sbin \
229 $(DISABLE_LARGEFILE
) \
231 $(PKG_CONFIGURE_OPTS
) \
235 --enable-force-cgi-redirect \
236 --enable-discard-path \
238 $(MAKE
) -C
$(PKG_BUILD_DIR
)
239 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-fastcgi
243 install -m0755
-d
$(IDIR_PHP4_CLI
)/etc
244 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_CLI
)/etc
/
245 install -m0755
-d
$(IDIR_PHP4_CLI
)/usr
/bin
246 cp
-fpR
$(PKG_BUILD_DIR
)/php-cli
$(IDIR_PHP4_CLI
)/usr
/bin
/php
247 $(RSTRIP
) $(IDIR_PHP4_CLI
)
248 $(IPKG_BUILD
) $(IDIR_PHP4_CLI
) $(PACKAGE_DIR
)
251 install -m0755
-d
$(IDIR_PHP4_CGI
)/etc
252 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_CGI
)/etc
/
253 install -m0755
-d
$(IDIR_PHP4_CGI
)/usr
/bin
254 cp
-fpR
$(PKG_BUILD_DIR
)/php-cgi
$(IDIR_PHP4_CGI
)/usr
/bin
/php
255 $(RSTRIP
) $(IDIR_PHP4_CGI
)
256 $(IPKG_BUILD
) $(IDIR_PHP4_CGI
) $(PACKAGE_DIR
)
258 $(IPKG_PHP4_FASTCGI
):
259 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/etc
260 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_FASTCGI
)/etc
/
261 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/etc
/init.d
262 install -m0755 .
/files
/php.init
$(IDIR_PHP4_FASTCGI
)/etc
/init.d
/php
263 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/usr
/sbin
264 cp
-fpR
$(PKG_BUILD_DIR
)/php-fastcgi
$(IDIR_PHP4_FASTCGI
)/usr
/sbin
/php
265 $(RSTRIP
) $(IDIR_PHP4_FASTCGI
)
266 $(IPKG_BUILD
) $(IDIR_PHP4_FASTCGI
) $(PACKAGE_DIR
)