Skip to content

Instantly share code, notes, and snippets.

@AliceWonderMiscreations
Created December 21, 2015 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliceWonderMiscreations/1e763d0ca078fa85012a to your computer and use it in GitHub Desktop.
Save AliceWonderMiscreations/1e763d0ca078fa85012a to your computer and use it in GitHub Desktop.
spec file for secp256k1-php
%define gitdate 2015.12.21
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
Name: php-secp256k1
Version: 0.0.%{gitdate}
Release: 1%{?dist}
Summary: PHP bindings for bitcoin/secp256k1
Group: Development/Languages
License: Unlicense Public Domain
URL: https://github.com/Bit-Wasp/secp256k1-php
Source0: secp256k1-php-master.zip
BuildRequires: secp256k1-devel
BuildRequires: php-devel
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
%description
PHP bindings for secp256k1 library. Please note that this PHP module may not
be stable and probably should not be used on production systems.
It is packaged here to allow software developers to experiment with the
functions it provides, and they are fast.
%prep
%setup -q -n secp256k1-php-master
%build
cd secp256k1
phpize
%configure --with-secp256k1
make %{?_smp_mflags}
%install
cd secp256k1
make install INSTALL_ROOT=%{buildroot}
install -d %{buildroot}%{php_inidir}
cat <<EOF > %{buildroot}%{php_inidir}/secp256k1.ini
; Enable secp256k1 extension module
extension=secp256k1.so
EOF
%check
export TEST_PHP_ARGS="-q"
cd secp256k1
make test
%files
%doc LICENCE README.md
%attr(0755,root,root) %{_libdir}/php/modules/secp256k1.so
%attr(0644,root,root) %config(noreplace) %{php_inidir}/secp256k1.ini
%changelog
* Mon Dec 21 2015 Alice Wonder <buildmaster@librelamp.com> - 0.0.2015.12.21-1
- Initial RPM spec file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment