3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=fbc67d240812136a9842bc1f2a217b7a
9 PKG_SOURCE_URL
:=http
://fr.php.net
/distributions
/
10 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
13 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
14 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
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
:= \
34 --enable-magic-quotes \
35 --enable-memory-limit \
37 --disable-short-tags \
40 --enable-session
=shared \
41 --enable-sockets
=shared \
43 --with-config-file-path
=/etc \
46 --with-zlib
="$(STAGING_DIR)/usr" \
48 ifneq ($(BR2_PACKAGE_PHP4_MOD_GD
),)
49 PKG_CONFIGURE_OPTS
+= --with-gd
=shared
,"$(STAGING_DIR)/usr" \
50 --enable-gd-native-ttf \
51 --with-png-dir
="$(STAGING_DIR)/usr" \
52 --with-zlib-dir
="$(STAGING_DIR)/usr"
54 PKG_CONFIGURE_OPTS
+= --without-gd
56 ifneq ($(BR2_PACKAGE_PHP4_MOD_LDAP
),)
57 PKG_CONFIGURE_OPTS
+= --with-ldap
=shared
,"$(STAGING_DIR)/usr"
59 PKG_CONFIGURE_OPTS
+= --without-ldap
61 ifneq ($(BR2_PACKAGE_PHP4_MOD_MYSQL
),)
62 PKG_CONFIGURE_OPTS
+= --with-mysql
=shared
,"$(STAGING_DIR)/usr"
64 PKG_CONFIGURE_OPTS
+= --without-mysql
66 ifneq ($(BR2_PACKAGE_PHP4_MOD_OPENSSL
),)
67 PKG_CONFIGURE_OPTS
+= --with-openssl
=shared
,"$(STAGING_DIR)/usr"
69 PKG_CONFIGURE_OPTS
+= --without-openssl
71 ifneq ($(BR2_PACKAGE_PHP4_MOD_PCRE
),)
72 PKG_CONFIGURE_OPTS
+= --with-pcre-regex
=shared
,"$(STAGING_DIR)/usr"
74 PKG_CONFIGURE_OPTS
+= --without-pcre-regex
76 ifneq ($(BR2_PACKAGE_PHP4_MOD_PGSQL
),)
77 PKG_CONFIGURE_OPTS
+= --with-pgsql
=shared
,"$(STAGING_DIR)/usr"
79 PKG_CONFIGURE_OPTS
+= --without-pgsql
81 ifneq ($(BR2_PACKAGE_PHP4_MOD_SQLITE
),)
82 PKG_CONFIGURE_OPTS
+= --with-sqlite
=shared
,"$(STAGING_DIR)/usr"
84 PKG_CONFIGURE_OPTS
+= --without-sqlite
87 $(eval
$(call PKG_template
,PHP4_CLI
,php4-cli
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
88 $(eval
$(call PKG_template
,PHP4_CGI
,php4-cgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
89 $(eval
$(call PKG_template
,PHP4_FASTCGI
,php4-fastcgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
91 $(eval
$(call PKG_template
,PHP4_MOD_FTP
,php4-mod-ftp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
92 $(eval
$(call PKG_template
,PHP4_MOD_GD
,php4-mod-gd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
93 $(eval
$(call PKG_template
,PHP4_MOD_LDAP
,php4-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
94 $(eval
$(call PKG_template
,PHP4_MOD_MYSQL
,php4-mod-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
95 $(eval
$(call PKG_template
,PHP4_MOD_OPENSSL
,php4-mod-openssl
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
96 $(eval
$(call PKG_template
,PHP4_MOD_PCRE
,php4-mod-pcre
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
97 $(eval
$(call PKG_template
,PHP4_MOD_PGSQL
,php4-mod-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
98 $(eval
$(call PKG_template
,PHP4_MOD_SESSION
,php4-mod-session
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
99 $(eval
$(call PKG_template
,PHP4_MOD_SOCKETS
,php4-mod-sockets
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
100 $(eval
$(call PKG_template
,PHP4_MOD_SQLITE
,php4-mod-sqlite
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
101 $(eval
$(call PKG_template
,PHP4_MOD_XML
,php4-mod-xml
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
103 $(eval
$(call PKG_mod_template
,PHP4_MOD_FTP
,ftp
))
104 $(eval
$(call PKG_mod_template
,PHP4_MOD_GD
,gd
))
105 $(eval
$(call PKG_mod_template
,PHP4_MOD_LDAP
,ldap
))
106 $(eval
$(call PKG_mod_template
,PHP4_MOD_MYSQL
,mysql
))
107 $(eval
$(call PKG_mod_template
,PHP4_MOD_OPENSSL
,openssl
))
108 $(eval
$(call PKG_mod_template
,PHP4_MOD_PCRE
,pcre
))
109 $(eval
$(call PKG_mod_template
,PHP4_MOD_PGSQL
,pgsql
))
110 $(eval
$(call PKG_mod_template
,PHP4_MOD_SESSION
,session
))
111 $(eval
$(call PKG_mod_template
,PHP4_MOD_SOCKETS
,sockets
))
112 $(eval
$(call PKG_mod_template
,PHP4_MOD_SQLITE
,sqlite
))
113 $(eval
$(call PKG_mod_template
,PHP4_MOD_XML
,xml
))
116 $(PKG_BUILD_DIR
)/.configured
:
119 $(PKG_BUILD_DIR
)/.built
:
120 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
121 $(TARGET_CONFIGURE_OPTS
) \
122 CFLAGS
="$(TARGET_CFLAGS)" \
123 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
124 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
126 --target
=$(GNU_TARGET_NAME
) \
127 --host
=$(GNU_TARGET_NAME
) \
128 --build
=$(GNU_HOST_NAME
) \
129 --program-prefix
="" \
130 --program-suffix
="" \
134 --datadir=/usr
/share \
135 --includedir=/usr
/include \
136 --infodir=/usr
/share
/info \
138 --libexecdir
=/usr
/lib \
139 --localstatedir
=/var \
140 --mandir=/usr
/share
/man \
141 --sbindir
=/usr
/sbin \
143 $(DISABLE_LARGEFILE
) \
145 $(PKG_CONFIGURE_OPTS
) \
149 --enable-force-cgi-redirect \
150 --enable-discard-path \
152 $(MAKE
) -C
$(PKG_BUILD_DIR
)
153 mv
$(PKG_BUILD_DIR
)/sapi
/cli
/php
$(PKG_BUILD_DIR
)/php-cli
154 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
155 $(TARGET_CONFIGURE_OPTS
) \
156 CFLAGS
="$(TARGET_CFLAGS)" \
157 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
158 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
160 --target
=$(GNU_TARGET_NAME
) \
161 --host
=$(GNU_TARGET_NAME
) \
162 --build
=$(GNU_HOST_NAME
) \
163 --program-prefix
="" \
164 --program-suffix
="" \
168 --datadir=/usr
/share \
169 --includedir=/usr
/include \
170 --infodir=/usr
/share
/info \
172 --libexecdir
=/usr
/lib \
173 --localstatedir
=/var \
174 --mandir=/usr
/share
/man \
175 --sbindir
=/usr
/sbin \
177 $(DISABLE_LARGEFILE
) \
179 $(PKG_CONFIGURE_OPTS
) \
183 --enable-force-cgi-redirect \
184 --enable-discard-path \
186 $(MAKE
) -C
$(PKG_BUILD_DIR
)
187 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-cgi
188 $(MAKE
) -C
$(PKG_BUILD_DIR
) clean
189 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
190 $(TARGET_CONFIGURE_OPTS
) \
191 CFLAGS
="$(TARGET_CFLAGS)" \
192 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
193 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
195 --target
=$(GNU_TARGET_NAME
) \
196 --host
=$(GNU_TARGET_NAME
) \
197 --build
=$(GNU_HOST_NAME
) \
198 --program-prefix
="" \
199 --program-suffix
="" \
203 --datadir=/usr
/share \
204 --includedir=/usr
/include \
205 --infodir=/usr
/share
/info \
207 --libexecdir
=/usr
/lib \
208 --localstatedir
=/var \
209 --mandir=/usr
/share
/man \
210 --sbindir
=/usr
/sbin \
212 $(DISABLE_LARGEFILE
) \
214 $(PKG_CONFIGURE_OPTS
) \
218 --enable-force-cgi-redirect \
219 --enable-discard-path \
221 $(MAKE
) -C
$(PKG_BUILD_DIR
)
222 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-fastcgi
226 install -m0755
-d
$(IDIR_PHP4_CLI
)/etc
227 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_CLI
)/etc
/
228 install -m0755
-d
$(IDIR_PHP4_CLI
)/usr
/sbin
229 cp
-fpR
$(PKG_BUILD_DIR
)/php-cli
$(IDIR_PHP4_CLI
)/usr
/sbin
/php
230 $(RSTRIP
) $(IDIR_PHP4_CLI
)
231 $(IPKG_BUILD
) $(IDIR_PHP4_CLI
) $(PACKAGE_DIR
)
234 install -m0755
-d
$(IDIR_PHP4_CGI
)/etc
235 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_CGI
)/etc
/
236 install -m0755
-d
$(IDIR_PHP4_CGI
)/usr
/sbin
237 cp
-fpR
$(PKG_BUILD_DIR
)/php-cgi
$(IDIR_PHP4_CGI
)/usr
/sbin
/php
238 $(RSTRIP
) $(IDIR_PHP4_CGI
)
239 $(IPKG_BUILD
) $(IDIR_PHP4_CGI
) $(PACKAGE_DIR
)
241 $(IPKG_PHP4_FASTCGI
):
242 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/etc
243 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_FASTCGI
)/etc
/
244 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/etc
/init.d
245 install -m0755 .
/files
/php.init
$(IDIR_PHP4_FASTCGI
)/etc
/init.d
/php
246 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/usr
/sbin
247 cp
-fpR
$(PKG_BUILD_DIR
)/php-fastcgi
$(IDIR_PHP4_FASTCGI
)/usr
/sbin
/php
248 $(RSTRIP
) $(IDIR_PHP4_FASTCGI
)
249 $(IPKG_BUILD
) $(IDIR_PHP4_FASTCGI
) $(PACKAGE_DIR
)