Contents of /branches/magellan-next/include/php5.sminc
Parent Directory | Revision Log
Revision 2 -
(show annotations)
(download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
Original Path: trunk/core/include/php5.sminc
File size: 1442 byte(s)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
Original Path: trunk/core/include/php5.sminc
File size: 1442 byte(s)
import repo
1 | # $Header: /magellan-cvs/smage/include/php5.sminc,v 1.2 2007-07-11 17:51:45 niro Exp $ |
2 | |
3 | # default includes |
4 | sminclude mtools |
5 | |
6 | # default extension name if not already given |
7 | : ${PHP5_EXTENSION="${PNAME/#php5-/}"} |
8 | |
9 | # some sane default dependencies |
10 | DEPEND=">= dev-lang/php5-5.2" |
11 | |
12 | SDEPEND=">= sys-dev/m4-1.4 |
13 | >= sys-dev/libtool-1.5" |
14 | |
15 | # default SRCFILE SRCDIR and SRC_URI |
16 | : ${SRCFILE="${PNAME/#php5-/}-${PVER}.tar.bz2"} |
17 | : ${SRCDIR="${BUILDDIR}/${PNAME/#php5-/}-${PVER}"} |
18 | : ${SRC_URI=( mirror://${PNAME}/${SRCFILE} )} |
19 | |
20 | php5_src_prepare() |
21 | { |
22 | munpack ${SRCFILE} || die |
23 | } |
24 | |
25 | php5_src_configure() |
26 | { |
27 | local configure_opts="$@" |
28 | |
29 | # generate configure |
30 | phpize || die |
31 | |
32 | mconfigure \ |
33 | --with-php-config=/usr/bin/php-config \ |
34 | ${configure_opts} \ |
35 | || die |
36 | } |
37 | |
38 | php5_src_compile() |
39 | { |
40 | cd ${SRCDIR} |
41 | php5_src_configure || die |
42 | mmake || die |
43 | } |
44 | |
45 | php5_src_install() |
46 | { |
47 | cd ${SRCDIR} |
48 | |
49 | # needed directories |
50 | minstalldir /etc/php5/conf.d || die |
51 | minstalldir $(php-config --extension-dir) || die |
52 | |
53 | # install extensions and the config ini |
54 | minstallexec modules/${PHP5_EXTENSION}.so $(php-config --extension-dir) || die |
55 | echo "extension=${PHP5_EXTENSION}.so" \ |
56 | > ${BINDIR}/etc/php5/conf.d/${PHP5_EXTENSION}.ini || die |
57 | |
58 | # install docs |
59 | local i |
60 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
61 | FAQ LICENSE NEWS README TODO |
62 | do |
63 | if [ -f ${SRCDIR}/${i} ] |
64 | then |
65 | minstalldocs ${i} || die |
66 | fi |
67 | done |
68 | } |
69 | |
70 | export_inherits php5 src_prepare src_compile src_install |