diff options
author | Remi Collet <fedora@famillecollet.com> | 2012-10-31 09:09:56 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2012-10-31 09:09:56 +0100 |
commit | aa3fee9a1d144c7d9a9ddc72bdb1a91be0fab03b (patch) | |
tree | 68457540c90691dffc53545b703a27277b492cba | |
parent | 5c5ec6752536d4d5f8d025681f507304921733eb (diff) |
php-xcache version 3.0.0 (remirepo spec)
-rw-r--r-- | php-xcache-dev.spec | 129 |
1 files changed, 68 insertions, 61 deletions
diff --git a/php-xcache-dev.spec b/php-xcache-dev.spec index 45afcc4..39e3282 100644 --- a/php-xcache-dev.spec +++ b/php-xcache-dev.spec @@ -2,18 +2,17 @@ Summary: Fast, stable PHP opcode cacher Name: php-xcache -Version: 2.0.1 -Release: 3%{?dist} +Version: 3.0.0 +Release: 2%{?dist} License: BSD Group: Development/Languages URL: http://xcache.lighttpd.net/ Source0: http://xcache.lighttpd.net/pub/Releases/%{version}/%{ext_name}-%{version}.tar.gz -Source1: xcache-admin.conf -Source2: xcache-coverager.conf +Source1: xcache-httpd.conf -# Specific RPM extension PATH -Patch0: %{ext_name}-conf.patch +# Relocation of configuration files to /etc/xcache +Patch0: xcache-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: php-devel @@ -22,7 +21,8 @@ Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} # Only one opcode cache -Conflicts: php-pecl-apc, php-eaccelerator +Conflicts: php-pecl-apc +Conflicts: php-eaccelerator # Other third party repo stuff Obsoletes: php53-xcache @@ -55,34 +55,19 @@ Requires: %{name} = %{version}-%{release} %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 BuildArch: noarch %endif -Obsoletes: php-xcache-admin < %{version}-%{release} -Provides: php-xcache-admin = %{version}-%{release} +Obsoletes: php-xcache-admin < 3.0.0 +Obsoletes: php-xcache-coverager < 3.0.0 +Obsoletes: xcache-coverager < 3.0.0 +Provides: xcache-coverager = %{version}-%{release} %description -n xcache-admin This package provides the XCache Administration web application, -with Apache configuration, on http://localhost/xcache-admin +with Apache configuration, on http://localhost/xcache -This requires to configure xcache.admin.user and xcache.admin.pass options -in XCache configuration file (xcache.ini). - - -%package -n xcache-coverager -Summary: XCache PHP Code Coverage Viewer -Group: Development/Languages -Requires: mod_php, httpd -Requires: %{name} = %{version}-%{release} -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -BuildArch: noarch -%endif -Obsoletes: php-xcache-admin < %{version}-%{release} -Provides: php-xcache-admin = %{version}-%{release} - -%description -n xcache-coverager -This package provides the XCache PHP Code Coverage Viewer web application, -with Apache configuration, on http://localhost/xcache-coverager - -This requires to configure xcache.coveragedump_directory option in XCache -configuration file (xcache.ini). +This requires to configure, in XCache configuration file (xcache.ini): +- xcache.admin.user +- xcache.admin.pass +- xcache.coveragedump_directory %prep @@ -91,24 +76,23 @@ configuration file (xcache.ini). # rename source folder mv %{ext_name}-%{version} nts +cd nts +%patch0 -p1 + +# fix version +sed -e '/XCACHE_VERSION/s/-dev//' -i xcache.h + # Sanity check, really often broken -extver=$(sed -n '/define XCACHE_VERSION/{s/.* "//;s/".*$//;p}' nts/xcache.h) +extver=$(sed -n '/define XCACHE_VERSION/{s/.* "//;s/".*$//;p}' xcache.h) if test "x${extver}" != "x%{version}"; then : Error: Upstream extension version is ${extver}, expecting %{version}. exit 1 fi +cd .. # duplicate for ZTS build cp -pr nts zts -cd nts -%patch0 -p0 -b .upstream -sed -e 's:@EXTDIR@:%{php_extdir}:' -i %{ext_name}.ini - -cd ../zts -%patch0 -p0 -b .upstream -sed -e 's:@EXTDIR@:%{php_ztsextdir}:' -i %{ext_name}.ini - %build # Without --enable-xcache-assembler, --enable-xcache-encoder, --enable-xcache-decoder @@ -146,28 +130,47 @@ make -C zts install INSTALL_ROOT=%{buildroot} install -D -m 644 zts/%{ext_name}.ini %{buildroot}%{php_ztsinidir}/%{ext_name}.ini # Install the admin stuff -install -d -m 755 %{buildroot}%{_datadir}/xcache/admin -install -p -m 644 nts/admin/* %{buildroot}%{_datadir}/xcache/admin -install -D -m 644 -p %{SOURCE1} \ - %{buildroot}%{_sysconfdir}/httpd/conf.d/xcache-admin.conf +install -d -m 755 %{buildroot}%{_datadir} +cp -pr nts/htdocs %{buildroot}%{_datadir}/xcache +install -d -m 755 %{buildroot}%{_sysconfdir}/xcache/cacher +install -d -m 755 %{buildroot}%{_sysconfdir}/xcache/coverager +mv %{buildroot}%{_datadir}/xcache/config.example.php \ + %{buildroot}%{_sysconfdir}/xcache +mv %{buildroot}%{_datadir}/xcache/cacher/config.example.php \ + %{buildroot}%{_sysconfdir}/xcache/cacher +mv %{buildroot}%{_datadir}/xcache/coverager/config.example.php \ + %{buildroot}%{_sysconfdir}/xcache/coverager -# Install the coverager stuff -install -d -m 755 %{buildroot}%{_datadir}/xcache/coverager -install -p -m 644 nts/coverager/* %{buildroot}%{_datadir}/xcache/coverager -install -D -m 644 -p %{SOURCE2} \ - %{buildroot}%{_sysconfdir}/httpd/conf.d/xcache-coverager.conf +install -D -m 644 -p %{SOURCE1} \ + %{buildroot}%{_sysconfdir}/httpd/conf.d/xcache.conf %check +cd nts + # simple module load test php --no-php-ini \ - --define zend_extension=%{buildroot}%{php_extdir}/%{ext_name}.so \ + --define extension_dir=%{buildroot}%{php_extdir}/\ + --define extension=%{ext_name}.so \ --modules | grep XCache +# upstream unit tests +TEST_PHP_EXECUTABLE=%{_bindir}/php \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +php run-tests.php -n -c xcache-test.ini tests + +cd ../zts %{__ztsphp} --no-php-ini \ - --define zend_extension=%{buildroot}%{php_ztsextdir}/%{ext_name}.so \ + --define extension_dir=%{buildroot}%{php_ztsextdir}/\ + --define extension=%{ext_name}.so \ --modules | grep XCache +TEST_PHP_EXECUTABLE=%{__ztsphp} \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__ztsphp} run-tests.php -n -c xcache-test.ini tests + %clean rm -rf %{buildroot} @@ -177,24 +180,28 @@ rm -rf %{buildroot} %defattr(-,root,root,-) %doc nts/{AUTHORS,ChangeLog,COPYING,README,THANKS} %config(noreplace) %{_sysconfdir}/php.d/%{ext_name}.ini -%config(noreplace) %{php_ztsinidir}/%{ext_name}.ini %{php_extdir}/%{ext_name}.so +%config(noreplace) %{php_ztsinidir}/%{ext_name}.ini %{php_ztsextdir}/%{ext_name}.so %files -n xcache-admin %defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/httpd/conf.d/xcache-admin.conf -%dir %{_datadir}/xcache -%{_datadir}/xcache/admin - -%files -n xcache-coverager -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/httpd/conf.d/xcache-coverager.conf -%dir %{_datadir}/xcache -%{_datadir}/xcache/coverager +%config(noreplace) %{_sysconfdir}/httpd/conf.d/xcache.conf +%{_datadir}/xcache +# No real configuration files, only sample files +%{_sysconfdir}/xcache %changelog +* Wed Oct 31 2012 Remi Collet <remi@fedoraproject.org> - 3.0.0-2 +- rebuild for remi repo + +* Wed Oct 31 2012 Remi Collet <remi@fedoraproject.org> - 3.0.0-1 +- new major version +- drop xcache-coverager subpackage +- xcache-admin now provides cacher, coverager and diagnosis +- run unit tests provided by upstream + * Sat Oct 27 2012 Remi Collet <remi@fedoraproject.org> - 2.0.1-3 - drop php prefix from sub packages - fix License |