source: freewrt/package/php4/Makefile@ 6fc4520e

freewrt_1_0 freewrt_2_0
Last change on this file since 6fc4520e was c8b93bd, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

major package Makefile cleanup. remove mostly-clean, add licence header, always use RSTRIP varibale for stripping, rename some init scripts, indent

git-svn-id: svn://www.freewrt.org/trunk/freewrt@600 afb5a338-a214-0410-bd46-81f09a774fd1

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