Skip to content

Commit 9e1d068

Browse files
committed
Merge pull request phpredis#34 from unicast/master
Added RPM spec-file.
2 parents 1d6133d + 848873f commit 9e1d068

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

rpm/php-redis.spec

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
2+
%global php_extdir %(php-config --extension-dir 2>/dev/null || echo "undefined")
3+
%global php_version %(php-config --version 2>/dev/null || echo 0)
4+
5+
Name: php-redis
6+
Version: 2.1.3
7+
Release: 1%{?dist}
8+
Summary: The phpredis extension provides an API for communicating with the Redis key-value store.
9+
10+
Group: Development/Languages
11+
License: PHP
12+
URL: https://github.com/nicolasff/phpredis
13+
Source0: https://download.github.com/nicolasff-phpredis-2.1.3-0-g43bc590.tar.gz
14+
Source1: redis.ini
15+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16+
17+
BuildRequires: php-devel
18+
Requires: php(zend-abi) = %{php_zend_api}
19+
Requires: php(api) = %{php_apiver}
20+
21+
%description
22+
The phpredis extension provides an API for communicating with the Redis key-value store.
23+
24+
%prep
25+
%setup -q -n nicolasff-phpredis-43bc590
26+
27+
%build
28+
%{_bindir}/phpize
29+
%configure
30+
make %{?_smp_mflags}
31+
32+
%install
33+
rm -rf $RPM_BUILD_ROOT
34+
make install INSTALL_ROOT=$RPM_BUILD_ROOT
35+
36+
# install configuration
37+
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/php.d
38+
%{__cp} %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/redis.ini
39+
40+
%clean
41+
rm -rf $RPM_BUILD_ROOT
42+
43+
%files
44+
%defattr(-,root,root,-)
45+
%doc CREDITS
46+
%config(noreplace) %{_sysconfdir}/php.d/redis.ini
47+
%{php_extdir}/redis.so
48+

rpm/redis.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extension=redis.so

0 commit comments

Comments
 (0)