diff options
author | Ilya Kozlov <unicast.ru@gmail.com> | 2011-07-28 18:32:02 +0400 |
---|---|---|
committer | Ilya Kozlov <unicast.ru@gmail.com> | 2011-07-28 18:32:02 +0400 |
commit | 848873f437d40ed2db000ede78be884099b7987e (patch) | |
tree | 508b8ac166cfdb7f8cc5c9c07d1ff44ba608d8c8 /rpm | |
parent | 1d6133d4cfc71c555ab4b8551d2818925f7cb444 (diff) |
Added spec-file to build rpm
Diffstat (limited to 'rpm')
-rw-r--r-- | rpm/php-redis.spec | 48 | ||||
-rw-r--r-- | rpm/redis.ini | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/rpm/php-redis.spec b/rpm/php-redis.spec new file mode 100644 index 00000000..b6ff55fd --- /dev/null +++ b/rpm/php-redis.spec @@ -0,0 +1,48 @@ +%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) +%global php_extdir %(php-config --extension-dir 2>/dev/null || echo "undefined") +%global php_version %(php-config --version 2>/dev/null || echo 0) + +Name: php-redis +Version: 2.1.3 +Release: 1%{?dist} +Summary: The phpredis extension provides an API for communicating with the Redis key-value store. + +Group: Development/Languages +License: PHP +URL: https://github.com/nicolasff/phpredis +Source0: https://download.github.com/nicolasff-phpredis-2.1.3-0-g43bc590.tar.gz +Source1: redis.ini +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: php-devel +Requires: php(zend-abi) = %{php_zend_api} +Requires: php(api) = %{php_apiver} + +%description +The phpredis extension provides an API for communicating with the Redis key-value store. + +%prep +%setup -q -n nicolasff-phpredis-43bc590 + +%build +%{_bindir}/phpize +%configure +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install INSTALL_ROOT=$RPM_BUILD_ROOT + +# install configuration +%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/php.d +%{__cp} %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/redis.ini + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc CREDITS +%config(noreplace) %{_sysconfdir}/php.d/redis.ini +%{php_extdir}/redis.so + diff --git a/rpm/redis.ini b/rpm/redis.ini new file mode 100644 index 00000000..6aecae48 --- /dev/null +++ b/rpm/redis.ini @@ -0,0 +1 @@ +extension=redis.so |