Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6bb2966

Browse files
committed
Update rpm packer for phpredis
1 parent 43efc8a commit 6bb2966

4 files changed

Lines changed: 21 additions & 6 deletions

File tree

rpm/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM centos:8
2+
3+
RUN dnf module enable -y php:7.3
4+
RUN dnf install -y php php-devel gcc rpm-build rpm-devel rpmlint make bash diffutils patch rpmdevtools
5+
RUN rpmdev-setuptree
6+
7+
CMD cd /data;./indocker.sh
8+

rpm/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#/bin/bash
2+
docker build -t rpmbuilder ./
3+
docker run -v $(pwd):/data rpmbuilder

rpm/indocker.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#/bin/bash
2+
spectool -g -R ./php-redis.spec
3+
rpmbuild -ba php-redis.spec
4+
cp -r /root/rpmbuild/RPMS/* /data/

rpm/php-redis.spec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
%global php_extdir %(php-config --extension-dir 2>/dev/null || echo "undefined")
33
%global php_version %(php-config --version 2>/dev/null || echo 0)
44

5-
Name: php-redis
6-
Version: 2.2.5
5+
Name: phpredis
6+
Version: 5.3.2
77
Release: 1%{?dist}
88
Summary: The phpredis extension provides an API for communicating with the Redis key-value store.
99

1010
Group: Development/Languages
1111
License: PHP
12-
URL: https://github.com/nicolasff/phpredis
13-
Source0: https://github.com/nicolasff/phpredis/tarball/master
14-
Source1: redis.ini
12+
URL: https://github.com/phpredis/phpredis
13+
Source0: https://github.com/phpredis/phpredis/archive/%{version}.tar.gz
14+
Source1: https://raw.githubusercontent.com/phpredis/phpredis/develop/rpm/redis.ini
1515
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1616

1717
BuildRequires: php-devel
@@ -22,7 +22,7 @@ Requires: php(api) = %{php_apiver}
2222
The phpredis extension provides an API for communicating with the Redis key-value store.
2323

2424
%prep
25-
%setup -q -n nicolasff-phpredis-43bc590
25+
%setup -q
2626

2727
%build
2828
%{_bindir}/phpize

0 commit comments

Comments
 (0)