-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from asiminiceanu/master
Add spec file for RPM build
- Loading branch information
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Define version and release number | ||
%define version @PACKAGE_VERSION@ | ||
%define release 1 | ||
%define php_version 53 | ||
|
||
Name: libphonenumber-for-php | ||
Version: %{version} | ||
Release: %{release}.php%{php_version}%{?dist} | ||
Summary: libphonenumber for PHP | ||
# See https://github.com/giggsey/libphonenumber-for-php/blob/master/LICENSE | ||
License: Apache 2.0 | ||
Group: Development/Libraries | ||
URL: https://github.com/giggsey/libphonenumber-for-php | ||
# Get the source files from https://github.com/giggsey/libphonenumber-for-php/tags | ||
Source: %{name}-%{version}.tar.gz | ||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
|
||
%description | ||
A PHP library for parsing, formatting, storing and validating international phone numbers. | ||
This library is based on Google's libphonenumber and forked from a version by Davide Mendolia. | ||
|
||
%prep | ||
%setup -q | ||
%build | ||
|
||
# Clean the buildroot so that it does not contain any stuff from previous builds | ||
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} | ||
|
||
# Install the extension | ||
install -d %{buildroot} | ||
|
||
# Prepare files | ||
mkdir -p %{buildroot}/usr/share/php | ||
cp -a src/libphonenumber/ %{buildroot}/usr/share/php | ||
|
||
%clean | ||
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} | ||
|
||
%files | ||
%defattr(-,root,root,-) | ||
/usr/share/php/libphonenumber | ||
|
||
%changelog | ||
* Wed Apr 16 2014 Adrian Siminiceanu <adrian.siminiceanu@gmail.com> | ||
- Initial spec file |