Skip to content

Instantly share code, notes, and snippets.

@toshihirock
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save toshihirock/44d37226aafed7fc1174 to your computer and use it in GitHub Desktop.

Select an option

Save toshihirock/44d37226aafed7fc1174 to your computer and use it in GitHub Desktop.
$yum install rpm-build
# not su user
$cd
$mkdir rpmbuild
$mkdir rpmbuild/BUILD
$mkdir rpmbuild/BUILDROOT
$mkdir rpmbuild/RPMS
$mkdir rpmbuild/SOURCES
$mkdir rpmbuild/SPECS
$mkdir rpmbuild/SRPMS
# get source
$cd /tmp
$git clone https://github.com/phpredis/phpredis.git
$cp phpredis/rpm/redis.ini ~/rpmbuild/SOURCES
$cp phpredis/rpm/php-redis.spec ~/rpmbuild/SPECS
$wget https://github.com/phpredis/phpredis/archive/2.2.7.tar.gz
$cp 2.2.7.tar.gz ~/rpmbuild/SOURCES
#modify spec
$cd ~/rpmbuild/SPECS
$diff php-redis.spec php-redis.spec.original
13c13
< Source0: 2.2.7.tar.gz
---
> Source0: https://github.com/nicolasff/phpredis/tarball/master
25c25
< %setup -q -n phpredis-2.2.7
---
> %setup -q -n nicolasff-phpredis-43bc590
# execute build
$rpmbuild -bb php-redis.spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment