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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 344753 by oden, Wed Jan 9 16:16:16 2013 UTC revision 344754 by oden, Thu Jan 10 15:42:00 2013 UTC
# Line 11  Line 11 
11  Summary:        The %{realname} module for PHP  Summary:        The %{realname} module for PHP
12  Name:           php-%{modname}  Name:           php-%{modname}
13  Version:        3.1.13  Version:        3.1.13
14  %define subrel 2  %define subrel 3
15  Release:        %mkrel 1  Release:        %mkrel 1
16  Group:          Development/PHP  Group:          Development/PHP
17  License:        PHP License  License:        PHP License
18  URL:            http://pecl.php.net/package/APC  URL:            http://pecl.php.net/package/APC
19  Source0:        http://pecl.php.net/get/APC-%{version}.tgz  Source0:        http://pecl.php.net/get/APC-%{version}.tgz
20  Source1:        apc.ini  Source1:        apc.ini
21    Source2:        php-apc.config.php
22  Patch0:         APC-3.1.3p1-default_lock_dir.diff  Patch0:         APC-3.1.3p1-default_lock_dir.diff
23    Patch1:         APC-3.1.13-default_config.diff
24  BuildRequires:  php-devel >= 3:5.2.0  BuildRequires:  php-devel >= 3:5.2.0
25  Conflicts:      php-afterburner php-mmcache php-eaccelerator  Conflicts:      php-afterburner php-mmcache php-eaccelerator
26  Epoch:          1  Epoch:          1
# Line 61  http://localhost/%{name}/ Line 63  http://localhost/%{name}/
63  [ "../package*.xml" != "/" ] && mv ../package*.xml .  [ "../package*.xml" != "/" ] && mv ../package*.xml .
64    
65  %patch0 -p0  %patch0 -p0
66    %patch1 -p0
67    
68  cp %{SOURCE1} %{inifile}  cp %{SOURCE1} %{inifile}
69    cp %{SOURCE2} php-apc.config.php
70    
71  %build  %build
72  %serverbuild  %serverbuild
# Line 146  popd Line 150  popd
150  rm -rf %{buildroot}  rm -rf %{buildroot}
151    
152  install -d %{buildroot}%{_libdir}/php/extensions  install -d %{buildroot}%{_libdir}/php/extensions
153    install -d %{buildroot}%{_sysconfdir}/%{name}
154  install -d %{buildroot}%{_sysconfdir}/php.d  install -d %{buildroot}%{_sysconfdir}/php.d
155  install -d %{buildroot}/var/www/%{name}  install -d %{buildroot}%{_datadir}/%{name}
156  install -d %{buildroot}/var/lib/php-apc  install -d %{buildroot}/var/lib/php-apc
157    
158  install -m0644 %{inifile} %{buildroot}%{_sysconfdir}/php.d/%{inifile}  install -m0644 %{inifile} %{buildroot}%{_sysconfdir}/php.d/%{inifile}
# Line 160  install -m0755 build-apc-mmap+mutex/modu Line 165  install -m0755 build-apc-mmap+mutex/modu
165    
166  install -d -m 755 %{buildroot}%{webappconfdir}  install -d -m 755 %{buildroot}%{webappconfdir}
167  cat > %{buildroot}%{webappconfdir}/%{name}.conf << EOF  cat > %{buildroot}%{webappconfdir}/%{name}.conf << EOF
168  Alias /%{name} /var/www/%{name}  Alias /%{name} %{_datadir}/%{name}
169    
170  <Directory "/var/www/%{name}">  <Directory "%{_datadir}/%{name}">
171  %if %{mgaversion} < 3  %if %{mgaversion} < 3
172      Order deny,allow      Order deny,allow
173      Deny from all      Deny from all
# Line 175  Alias /%{name} /var/www/%{name} Line 180  Alias /%{name} /var/www/%{name}
180  </Directory>  </Directory>
181  EOF  EOF
182    
183  install -m0644 apc.php %{buildroot}/var/www/%{name}/index.php  install -m0644 apc.php %{buildroot}%{_datadir}/%{name}/index.php
184    install -m0644 php-apc.config.php %{buildroot}%{_sysconfdir}/%{name}/config.php
185    
186    cat > README.urpmi << EOF
187    The actual configuration file is /etc/php-apc/config.php.
188    EOF
189    
190    %post admin
191    # generate random secret
192    secret=%_get_password 46
193    
194    # blowfish secret
195    perl -pi -e "s|_PASSWORD_|$secret|g" %{_sysconfdir}/%{name}/config.php
196    
197  %clean  %clean
198  rm -rf %{buildroot}  rm -rf %{buildroot}
# Line 193  rm -rf %{buildroot} Line 210  rm -rf %{buildroot}
210    
211  %files admin  %files admin
212  %defattr(-,root,root)  %defattr(-,root,root)
213    %doc README.urpmi
214  %config(noreplace) %{webappconfdir}/%{name}.conf  %config(noreplace) %{webappconfdir}/%{name}.conf
215  %dir /var/www/%{name}  %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.php
216  /var/www/%{name}/index.php  %dir %{_datadir}/%{name}
217    %{_datadir}/%{name}/index.php
   

Legend:
Removed from v.344753  
changed lines
  Added in v.344754

  ViewVC Help
Powered by ViewVC 1.1.30