日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。
Revision | 79d39171181997e79d8a6bfee7eb03e580f7ab5f (tree) |
---|---|
Time | 2012-12-15 14:07:19 |
Author | Fumihisa TONAKA <fumi.ftnk@gmai...> |
Commiter | Fumihisa TONAKA |
SFEphp53-pgsql92: initial commit
@@ -0,0 +1,127 @@ | ||
1 | +# | |
2 | +# spec file for package SFEphp52-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: SFEphp52-pgsql92 | |
15 | +IPS_package_name: web/php-52/extension/php-pgsql92 | |
16 | +Summary: PHP 5.2 module for PostgreSQL 92 | |
17 | +Version: 5.3.14 | |
18 | +License: PHP License | |
19 | +Url: http://www.php.net/ | |
20 | +Source: http://museum.php.net/php5/%{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 | +%description | |
37 | +The SFEphp53-pgsql92 package includes a dynamic shared object (DSO) that can | |
38 | +be compiled in to the Apache Web server to add PostgreSQL-9.2 database | |
39 | +support to PHP. PostgreSQL-9.2 is an object-relational database management | |
40 | +system that supports almost all SQL constructs. PHP is an | |
41 | +HTML-embedded scripting language. If you need back-end support for | |
42 | +PostgreSQL-9.2, you should install this package in addition to the main | |
43 | +php package. | |
44 | + | |
45 | +%prep | |
46 | +%setup -c -n %name-%version | |
47 | + | |
48 | +%build | |
49 | + | |
50 | +CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` | |
51 | +if test "x$CPUS" = "x" -o $CPUS = 0; then | |
52 | + CPUS=1 | |
53 | +fi | |
54 | +export CFLAGS="$RPM_OPT_FLAGS" | |
55 | +export LDFLAGS="%_ldflags" | |
56 | +export CC=cc | |
57 | +pwd | |
58 | +cd %{tarball_name}-%{tarball_version} | |
59 | +%ifarch sparc | |
60 | +%define target sparc-sun-solaris | |
61 | +%else | |
62 | +%define target i386-sun-solaris | |
63 | +%endif | |
64 | + | |
65 | +pushd ext/pgsql/ | |
66 | +/usr/php/5.3/bin/phpize | |
67 | +./configure \ | |
68 | + --prefix=%{_prefix}\ | |
69 | + --exec-prefix=%{_prefix}\ | |
70 | + --sysconfdir=%{_sysconfdir} \ | |
71 | + --libdir=%{_libdir} \ | |
72 | + --bindir=%{_bindir} \ | |
73 | + --includedir=%{_includedir} \ | |
74 | + --with-php-config=/usr/php/5.3/bin/php-config \ | |
75 | + --with-pgsql=/usr/postgres/9.2 | |
76 | +gmake -j$CPUS | |
77 | +popd | |
78 | + | |
79 | +pushd ext/pdo_pgsql/ | |
80 | +/usr/php/5.3/bin/phpize | |
81 | +./configure \ | |
82 | + --prefix=%{_prefix}\ | |
83 | + --exec-prefix=%{_prefix}\ | |
84 | + --sysconfdir=%{_sysconfdir} \ | |
85 | + --libdir=%{_libdir} \ | |
86 | + --bindir=%{_bindir} \ | |
87 | + --includedir=%{_includedir} \ | |
88 | + --with-php-config=/usr/php/5.3/bin/php-config \ | |
89 | + --with-pdo-pgsql=/usr/postgres/9.2 | |
90 | +gmake -j$CPUS | |
91 | +popd | |
92 | + | |
93 | + | |
94 | +%install | |
95 | + | |
96 | +cd %{tarball_name}-%{tarball_version} | |
97 | +mkdir -p $RPM_BUILD_ROOT/etc/php/5.3/conf.d | |
98 | + | |
99 | +for mod in pgsql pdo_pgsql; do | |
100 | + pushd ext/${mod}/ | |
101 | + make install INSTALL_ROOT=$RPM_BUILD_ROOT PECL_EXTENSION_DIR=%{_prefix}/php/5.3/modules PECL_INCLUDE_DIR=%{_prefix}/php/5.3/include | |
102 | + popd | |
103 | + cat > $RPM_BUILD_ROOT/etc/php/5.3/conf.d/${mod}.ini <<EOF | |
104 | +; Enable ${mod} extension module | |
105 | +extension=${mod}.so | |
106 | +EOF | |
107 | +done | |
108 | + | |
109 | +#mkdir -p $RPM_BUILD_ROOT/%{_prefix}/php/5.3/modules/ | |
110 | +#mkdir -p $RPM_BUILD_ROOT/etc/php/5.3/conf.d | |
111 | + | |
112 | +%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} | |
113 | + | |
114 | +%clean | |
115 | +rm -rf $RPM_BUILD_ROOT | |
116 | + | |
117 | +%files | |
118 | +%defattr (-, root, bin) | |
119 | +%dir %attr(0755, root, sys) %{_prefix} | |
120 | +%dir %attr(0755, root, bin) %{_prefix}/php/5.3/modules | |
121 | +%{_prefix}/php/5.3/modules/* | |
122 | +%dir %attr(0755, root, sys) %{_sysconfdir} | |
123 | +%{_sysconfdir}/php/5.3/conf.d/* | |
124 | + | |
125 | +%changelog | |
126 | +* Sat Dec 15 2012 Fumihisa TONAKA <fumi.ftnk@gmail.com> | |
127 | +- initial commit |