/[packages]/updates/2/php-apc/current/SPECS/php-apc.spec
ViewVC logotype

Annotation of /updates/2/php-apc/current/SPECS/php-apc.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 343865 - (hide annotations) (download)
Wed Jan 9 16:16:16 2013 UTC (11 years, 10 months ago) by oden
File size: 5544 byte(s)
- revert to 3.1.13 due to regressions in 3.1.14

1 spuhler 17155 %define _disable_ld_no_undefined 1
2    
3     %define realname apc (Alternative PHP Cache)
4     %define modname apc
5     %define dirname %{modname}
6     %define soname %{modname}.so
7     %define inifile 99_%{modname}.ini
8    
9     %define _requires_exceptions pear(
10    
11     Summary: The %{realname} module for PHP
12     Name: php-%{modname}
13 oden 343865 Version: 3.1.13
14     %define subrel 2
15     Release: %mkrel 1
16 spuhler 17155 Group: Development/PHP
17     License: PHP License
18     URL: http://pecl.php.net/package/APC
19     Source0: http://pecl.php.net/get/APC-%{version}.tgz
20     Source1: apc.ini
21     Patch0: APC-3.1.3p1-default_lock_dir.diff
22     BuildRequires: php-devel >= 3:5.2.0
23     Conflicts: php-afterburner php-mmcache php-eaccelerator
24     Epoch: 1
25    
26     %description
27     APC was conceived of to provide a way of boosting the performance of PHP on
28     heavily loaded sites by providing a way for scripts to be cached in a compiled
29     state, so that the overhead of parsing and compiling can be almost completely
30     eliminated. There are commercial products which provide this functionality, but
31     they are neither open-source nor free. Our goal was to level the playing field
32     by providing an implementation that allows greater flexibility and is
33     universally accessible.
34    
35     NOTE!: %{name} has to be loaded last, very important!
36    
37     This package comes with four different flavours of APC (use only one of them):
38    
39     o apc-mmap.so - mmap (fcntl) based locks (default)
40     o apc-sem.so - IPC semamphore based locks
41     o apc-spinlocks.so - Hardware-dependent implementation of spinlocks
42     o apc-pthread.so - NPTL pthread mutex based locks
43 oden 339957 o apc-mmap+mutex.so - mmap (fcntl) and pthread mutex based locks
44 spuhler 17155
45     %package admin
46     Summary: Web admin GUI for %{realname}
47     Group: Development/PHP
48     Requires: apache-mod_php
49     Requires: %{name}
50    
51     %description admin
52     This package contains a Web admin GUI for %{realname}.
53    
54     To access the web GUI please open up your favourite web browser and point to:
55    
56     http://localhost/%{name}/
57    
58     %prep
59    
60     %setup -q -n APC-%{version}
61     [ "../package*.xml" != "/" ] && mv ../package*.xml .
62    
63     %patch0 -p0
64    
65     cp %{SOURCE1} %{inifile}
66    
67     %build
68     %serverbuild
69    
70     phpize
71    
72     mkdir -p build-apc-mmap
73     pushd build-apc-mmap
74     ln -s ../configure .
75     %configure2_5x \
76     --enable-%{modname}=shared,%{_prefix} \
77     --enable-apc-filehits \
78     --disable-apc-pthreadmutex \
79 oden 339957 --disable-apc-pthreadrwlocks \
80 spuhler 17155 --disable-apc-sem \
81     --disable-apc-spinlocks \
82     --enable-apc-mmap \
83     --enable-apc-memprotect
84    
85     %make
86     popd
87    
88     mkdir -p build-apc-sem
89     pushd build-apc-sem
90     ln -s ../configure .
91     %configure2_5x \
92     --enable-%{modname}=shared,%{_prefix} \
93     --enable-apc-filehits \
94     --disable-apc-pthreadmutex \
95 oden 339957 --disable-apc-pthreadrwlocks \
96 spuhler 17155 --disable-apc-mmap \
97     --disable-apc-spinlocks \
98     --enable-apc-sem \
99     --enable-apc-memprotect
100    
101     %make
102     popd
103    
104     mkdir -p build-apc-spinlocks
105     pushd build-apc-spinlocks
106     ln -s ../configure .
107     %configure2_5x \
108     --enable-%{modname}=shared,%{_prefix} \
109     --enable-apc-filehits \
110     --disable-apc-pthreadmutex \
111 oden 339957 --disable-apc-pthreadrwlocks \
112 spuhler 17155 --disable-apc-sem \
113     --disable-apc-mmap \
114     --disable-apc-memprotect \
115     --enable-apc-spinlocks
116    
117     %make
118     popd
119    
120     mkdir -p build-apc-pthread
121     pushd build-apc-pthread
122     ln -s ../configure .
123     %configure2_5x \
124     --enable-%{modname}=shared,%{_prefix} \
125     --enable-apc-filehits \
126 oden 339957 --enable-apc-pthreadrwlocks \
127 spuhler 17155 --disable-apc-spinlocks \
128     --disable-apc-mmap \
129     --disable-apc-sem \
130     --disable-apc-memprotect
131 oden 339957 %make
132     popd
133 spuhler 17155
134 oden 339957 mkdir -p build-apc-mmap+mutex
135     pushd build-apc-mmap+mutex
136     ln -s ../configure .
137     %configure2_5x \
138     --enable-%{modname}=shared,%{_prefix} \
139     --enable-apc-filehits \
140     --enable-apc-mmap \
141     --enable-apc-pthreadmutex
142 spuhler 17155 %make
143     popd
144    
145     %install
146     rm -rf %{buildroot}
147    
148     install -d %{buildroot}%{_libdir}/php/extensions
149     install -d %{buildroot}%{_sysconfdir}/php.d
150     install -d %{buildroot}/var/www/%{name}
151     install -d %{buildroot}/var/lib/php-apc
152    
153     install -m0644 %{inifile} %{buildroot}%{_sysconfdir}/php.d/%{inifile}
154    
155     install -m0755 build-apc-mmap/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-mmap.so
156     install -m0755 build-apc-sem/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-sem.so
157     install -m0755 build-apc-spinlocks/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-spinlocks.so
158     install -m0755 build-apc-pthread/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-pthread.so
159 oden 339957 install -m0755 build-apc-mmap+mutex/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-mmap+mutex.so
160 spuhler 17155
161     install -d -m 755 %{buildroot}%{webappconfdir}
162     cat > %{buildroot}%{webappconfdir}/%{name}.conf << EOF
163     Alias /%{name} /var/www/%{name}
164    
165     <Directory "/var/www/%{name}">
166 oden 339957 %if %{mgaversion} < 3
167 spuhler 17155 Order deny,allow
168     Deny from all
169     Allow from 127.0.0.1
170 oden 339957 %endif
171     %if %{mgaversion} >= 3
172     Require local granted
173     %endif
174 spuhler 17155 ErrorDocument 403 "Access denied per %{webappconfdir}/%{name}.conf"
175     </Directory>
176     EOF
177    
178     install -m0644 apc.php %{buildroot}/var/www/%{name}/index.php
179    
180     %clean
181     rm -rf %{buildroot}
182    
183     %files
184     %defattr(-,root,root)
185     %doc tests CHANGELOG INSTALL LICENSE NOTICE TECHNOTES.txt TODO package*.xml
186     %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
187     %attr(0755,root,root) %{_libdir}/php/extensions/apc-mmap.so
188     %attr(0755,root,root) %{_libdir}/php/extensions/apc-sem.so
189     %attr(0755,root,root) %{_libdir}/php/extensions/apc-spinlocks.so
190     %attr(0755,root,root) %{_libdir}/php/extensions/apc-pthread.so
191 oden 339957 %attr(0755,root,root) %{_libdir}/php/extensions/apc-mmap+mutex.so
192 spuhler 17155 %attr(0755,apache,apache) /var/lib/php-apc
193    
194     %files admin
195     %defattr(-,root,root)
196     %config(noreplace) %{webappconfdir}/%{name}.conf
197     %dir /var/www/%{name}
198     /var/www/%{name}/index.php
199    
200    

  ViewVC Help
Powered by ViewVC 1.1.30