]> git.pld-linux.org Git - SPECS.git/blob - php-libphutil.spec
SPECS updated Sun 1 Aug 15:50:02 CEST 2021
[SPECS.git] / php-libphutil.spec
1 %define         pkgname libphutil
2 %define         php_min_version 5.2.3
3 Summary:        Collection of utility classes and functions for PHP
4 Name:           php-%{pkgname}
5 Version:        0.0.1
6 Release:        0.1
7 License:        Apache v2.0
8 Group:          Applications/WWW
9 Source0:        https://github.com/facebook/libphutil/archive/master/libphutil.tar.gz
10 # Source0-md5:  276ec0faafabc48ca08ecab54e504b19
11 URL:            http://www.phabricator.com/docs/libphutil/
12 BuildRequires:  rpmbuild(macros) >= 1.268
13 BuildRequires:  sed >= 4.0
14 Requires:       php(core) >= %{php_min_version}
15 Requires:       php(date)
16 Requires:       php(hash)
17 Requires:       php(json)
18 Requires:       php(mbstring)
19 Requires:       php(pcre)
20 Suggests:       php(gd)
21 Suggests:       php(mysql)
22 Suggests:       php(mysqli)
23 Suggests:       php(openssl)
24 Suggests:       php(simplexml)
25 Suggests:       php(spl)
26 Suggests:       php(xml)
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 libphutil (pronounced as "lib-futile", like the English word futile)
32 is a collection of PHP utility classes and functions which provide
33 powerful extensions to the standard library.
34
35 This code was originally developed at Facebook and parts of it appear
36 in the core libraries for <http://www.facebook.com/>.
37
38 libphutil is principally the shared library for Arcanist and
39 Phabricator (see http://www.phabricator.org/), but is suitable for
40 inclusion in other projects. In particular, some of the classes
41 provided in this library vastly improve the state of common operations
42 in PHP, like executing system commands.
43
44 %prep
45 %setup -qc -n %{pkgname}-%{version}
46 mv libphutil-*/{.??*,*} .
47
48 grep -rlE '/usr/local/bin|bin/env' . | xargs sed -i -e ' 1 {
49         s,/usr/local/bin/php,/usr/bin/php,
50         s,/usr/bin/env .*php,/usr/bin/php,
51 }'
52
53 # cleanup backups after patching
54 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT%{php_data_dir}/%{pkgname}
59 cp -a resources scripts src support $RPM_BUILD_ROOT%{php_data_dir}/%{pkgname}
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(644,root,root,755)
66 %doc README NOTICE
67 %{php_data_dir}/libphutil
This page took 0.227279 seconds and 3 git commands to generate.