日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。
Revision | e170d2a430820ad2be87d49c2c96a021c34acf9e (tree) |
---|---|
Time | 2013-08-01 15:25:19 |
Author | Fumihisa TONAKA <fumi.ftnk@gmai...> |
Commiter | Fumihisa TONAKA |
SFEphp54-memcache: initial commit
@@ -0,0 +1,94 @@ | ||
1 | +# | |
2 | +# spec file for package eblib | |
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 | +%include packagenamemacros.inc | |
10 | + | |
11 | +%define _prefix /usr | |
12 | +%define php_version 5.4 | |
13 | +%define tarball_version 2.2.7 | |
14 | +%define tarball_name memcache | |
15 | + | |
16 | +Name: SFEphp54-memcache | |
17 | +IPS_package_name: web/php-54/extension/php-memcache | |
18 | +Summary: PHP 5.4 module for MEMCACHE | |
19 | +Version: 2.2.7 | |
20 | +License: PHP License | |
21 | +Url: http://pecl.php.net/package/%{tarball_name} | |
22 | +Source: http://pecl.php.net/get/%{tarball_name}-%{tarball_version}.tgz | |
23 | +Source1: %{name}.ini | |
24 | +Distribution: OpenSolaris | |
25 | +Vendor: OpenSolaris Community | |
26 | +SUNW_Basedir: / | |
27 | +# SUNW_Copyright: %{name}.copyright | |
28 | +BuildRoot: %{_tmppath}/%{name}-%{version}-build | |
29 | + | |
30 | +BuildRequires: web/php-54 | |
31 | +Requires: web/php-54 | |
32 | + | |
33 | +%prep | |
34 | +%setup -c -n %tarball_name-%tarball_version | |
35 | + | |
36 | +%build | |
37 | + | |
38 | +CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` | |
39 | +if test "x$CPUS" = "x" -o $CPUS = 0; then | |
40 | + CPUS=1 | |
41 | +fi | |
42 | +export CFLAGS="$RPM_OPT_FLAGS" | |
43 | +export LDFLAGS="%_ldflags" | |
44 | +export CC=cc | |
45 | + | |
46 | +cd %{tarball_name}-%{tarball_version} | |
47 | +%ifarch sparc | |
48 | +%define target sparc-sun-solaris | |
49 | +%else | |
50 | +%define target i386-sun-solaris | |
51 | +%endif | |
52 | + | |
53 | +/usr/php/%{php_version}/bin/phpize | |
54 | +./configure \ | |
55 | + --prefix=%{_prefix}\ | |
56 | + --exec-prefix=%{_prefix}\ | |
57 | + --sysconfdir=%{_sysconfdir} \ | |
58 | + --libdir=%{_libdir} \ | |
59 | + --bindir=%{_bindir} \ | |
60 | + --includedir=%{_includedir} \ | |
61 | + --mandir=%{_mandir} \ | |
62 | + --with-php-config=/usr/php/%{php_version}/bin/php-config | |
63 | + | |
64 | + | |
65 | +gmake -j$CPUS CFLAGS="$CFLAGS" | |
66 | +echo no | gmake test | |
67 | + | |
68 | +%install | |
69 | + | |
70 | +cd %{tarball_name}-%{tarball_version} | |
71 | +# mkdir -p $RPM_BUILD_ROOT/%{_prefix}/php/%{php_version}/modules/ | |
72 | +mkdir -p $RPM_BUILD_ROOT/%{_prefix}/php/%{php_version}/lib/extensions/no-debug-non-zts-20100525/ | |
73 | +cp modules/memcache.so $RPM_BUILD_ROOT/%{_prefix}/php/%{php_version}/lib/extensions/no-debug-non-zts-20100525/ | |
74 | +mkdir -p $RPM_BUILD_ROOT/etc/php/%{php_version}/conf.d | |
75 | +cp %{SOURCE1} $RPM_BUILD_ROOT/etc/php/%{php_version}/conf.d/%{tarball_name}.ini | |
76 | + | |
77 | +%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} | |
78 | + | |
79 | +%clean | |
80 | +rm -rf $RPM_BUILD_ROOT | |
81 | + | |
82 | +%files | |
83 | +%defattr (-, root, bin) | |
84 | +%dir %attr(0755, root, sys) %{_prefix} | |
85 | +%dir %attr(0755, root, bin) %{_prefix}/php/%{php_version}/lib | |
86 | +%dir %attr(0755, root, bin) %{_prefix}/php/%{php_version}/lib/extensions | |
87 | +%dir %attr(0755, root, bin) %{_prefix}/php/%{php_version}/lib/extensions/no-debug-non-zts-20100525/ | |
88 | +%attr(0444, root, bin) %{_prefix}/php/%{php_version}/lib/extensions/no-debug-non-zts-20100525/memcache.so | |
89 | +%dir %attr(0755, root, sys) %{_sysconfdir} | |
90 | +%{_sysconfdir}/php/%{php_version}/conf.d/* | |
91 | + | |
92 | +%changelog | |
93 | +* Thu Aug 01 JST 2013 Fumihisa TONAKA <fumi.ftnk@gmail.com> | |
94 | +- initial commit |
@@ -0,0 +1,13 @@ | ||
1 | +extension=memcache.so | |
2 | + | |
3 | +;For detailed Memcache configurations, please visit | |
4 | +;http://www.php.net/manual/en/memcache.ini.php | |
5 | + | |
6 | +;Use memcache as a session handler by setting this value to memcache. | |
7 | +;session.save_handler="memcache" | |
8 | + | |
9 | +;Use a comma separated list of server urls to use for storage: | |
10 | +;session.save_path="udp://127.0.0.1:11211 | |
11 | + | |
12 | +;Controls which strategy to use when mapping keys to servers. | |
13 | +;memcache.hash_strategy="consistent" |