• R/O
  • SSH

contrib-spec-files: Commit

日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。


Commit MetaInfo

Revisione03b9872eb2a7da9b6211b28fe77ffe307304d7a (tree)
Time2012-12-15 05:04:39
AuthorFumihisa TONAKA <fumi.ftnk@gmai...>
CommiterFumihisa TONAKA

Log Message

SFEphp53-pgsql90: initial commit

Change Summary

Incremental Difference

diff -r 19c57427f782 -r e03b9872eb2a specs/SFEphp53-pgsql90.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/SFEphp53-pgsql90.spec Sat Dec 15 05:04:39 2012 +0900
@@ -0,0 +1,133 @@
1+#
2+# spec file for package SFEphp53-pgsql90
3+#
4+# This file and all modifications and additions to the pristine
5+# package are under the same license as the package itself.
6+#
7+#
8+%include Solaris.inc
9+
10+%define _prefix /usr
11+%define tarball_version 5.3.14
12+%define tarball_name php
13+
14+Name: SFEphp53-pgsql90
15+IPS_package_name: web/php-53/extension/php-pgsql90
16+Summary: PHP 5.3 module for PostgreSQL
17+Version: 5.3.14
18+License: PHP License
19+Url: http://www.php.net/
20+Source: http://jp1.php.net/distributions/%{tarball_name}-%{tarball_version}.tar.bz2
21+Distribution: OpenSolaris
22+Vendor: OpenSolaris Community
23+SUNW_Basedir: /
24+#SUNW_Copyright: %{name}.copyright
25+BuildRoot: %{_tmppath}/%{name}-%{version}-build
26+
27+BuildRequires: web/php-53
28+BuildRequires: text/gnu-sed
29+BuildRequires: database/postgres-90/library
30+BuildRequires: database/postgres-90/developer
31+BuildRequires: SFEre2c
32+
33+Requires: database/postgres-90/library
34+Requires: web/php-53
35+
36+# OpenSolaris IPS Package Manifest Fields
37+#Meta(info.upstream):
38+Meta(info.maintainer): taki@justplayer.com
39+Meta(info.repository_url): http://svn.php.net/
40+Meta(info.classification): Development/PHP
41+
42+%description
43+The SFEphp53-pgsql90 package includes a dynamic shared object (DSO) that can
44+be compiled in to the Apache Web server to add PostgreSQL-9.0 database
45+support to PHP. PostgreSQL-9.0 is an object-relational database management
46+system that supports almost all SQL constructs. PHP is an
47+HTML-embedded scripting language. If you need back-end support for
48+PostgreSQL-9.0, you should install this package in addition to the main
49+php package.
50+
51+%prep
52+%setup -c -n %name-%version
53+
54+%build
55+
56+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
57+if test "x$CPUS" = "x" -o $CPUS = 0; then
58+ CPUS=1
59+fi
60+export CFLAGS="$RPM_OPT_FLAGS"
61+export LDFLAGS="%_ldflags"
62+export CC=cc
63+pwd
64+cd %{tarball_name}-%{tarball_version}
65+%ifarch sparc
66+%define target sparc-sun-solaris
67+%else
68+%define target i386-sun-solaris
69+%endif
70+
71+pushd ext/pgsql/
72+/usr/php/5.3/bin/phpize
73+./configure \
74+ --prefix=%{_prefix}\
75+ --exec-prefix=%{_prefix}\
76+ --sysconfdir=%{_sysconfdir} \
77+ --libdir=%{_libdir} \
78+ --bindir=%{_bindir} \
79+ --includedir=%{_includedir} \
80+ --with-php-config=/usr/php/5.3/bin/php-config \
81+ --with-pgsql=/usr/postgres/9.0
82+gmake -j$CPUS
83+popd
84+
85+pushd ext/pdo_pgsql/
86+/usr/php/5.3/bin/phpize
87+./configure \
88+ --prefix=%{_prefix}\
89+ --exec-prefix=%{_prefix}\
90+ --sysconfdir=%{_sysconfdir} \
91+ --libdir=%{_libdir} \
92+ --bindir=%{_bindir} \
93+ --includedir=%{_includedir} \
94+ --with-php-config=/usr/php/5.3/bin/php-config \
95+ --with-pdo-pgsql=/usr/postgres/9.0
96+gmake -j$CPUS
97+popd
98+
99+
100+%install
101+
102+cd %{tarball_name}-%{tarball_version}
103+mkdir -p $RPM_BUILD_ROOT/etc/php/5.3/conf.d
104+
105+for mod in pgsql pdo_pgsql; do
106+ pushd ext/${mod}/
107+ make install INSTALL_ROOT=$RPM_BUILD_ROOT PECL_EXTENSION_DIR=%{_prefix}/php/5.3/modules PECL_INCLUDE_DIR=%{_prefix}/php/5.3/include
108+ popd
109+ cat > $RPM_BUILD_ROOT/etc/php/5.3/conf.d/${mod}.ini <<EOF
110+; Enable ${mod} extension module
111+extension=${mod}.so
112+EOF
113+done
114+
115+#mkdir -p $RPM_BUILD_ROOT/%{_prefix}/php/5.3/modules/
116+#mkdir -p $RPM_BUILD_ROOT/etc/php/5.3/conf.d
117+
118+%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
119+
120+%clean
121+rm -rf $RPM_BUILD_ROOT
122+
123+%files
124+%defattr (-, root, bin)
125+%dir %attr(0755, root, sys) %{_prefix}
126+%dir %attr(0755, root, bin) %{_prefix}/php/5.3/modules
127+%{_prefix}/php/5.3/modules/*
128+%dir %attr(0755, root, sys) %{_sysconfdir}
129+%{_sysconfdir}/php/5.3/conf.d/*
130+
131+%changelog
132+* Sat Dec 15 2012 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
133+- initial commit
Show on old repository browser