%define git_short_version_hash 8f8e02d %define git_full_version_hash 8f8e02d47569dce5f035383d8bcbf7a08481e839 Summary: A collection of PHP utility classes Name: libphutil Version: 20160727.git%{git_short_version_hash} Release: 1%{?dist} License: ASL 2.0 URL: http://www.phabricator.com/docs/libphutil/ Source0: https://github.com/phacility/libphutil/archive/%{git_full_version_hash}.tar.gz#/libphutil-%{git_full_version_hash}.tar.gz Patch0001: 0001-Parse-From-lines-in-the-format-user-domain.com-user-.patch Patch0002: 0002-Unvendorize-jsonlint.patch BuildArch: noarch # Virtual provides to silence rpmlint on requiring an explicit # library for arcanist and phabricator. Provides: phabricator(libphutil) = %{version}-%{release} Requires: php(language) >= 5 Requires: php-curl Requires: php-date Requires: php-fileinfo Requires: php-gd Requires: php-jsonlint Requires: php-ldap Requires: php-mbstring Requires: php-mysqli Requires: php-pecl-apcu Requires: php-pecl-xhprof Requires: php-pecl-zendopcache Requires: php-xml %description A collection of PHP utility classes used with phabricator %prep %setup -q -n libphutil-%{git_full_version_hash} %patch0001 -p1 -b .email-format %patch0002 -p1 -b .unven-jsonlint %build %install # copy libphutil to the buildroot mkdir -p %{buildroot}%{_datadir}/%{name} cp -a scripts/ src/ %{buildroot}%{_datadir}/%{name}/. find %{buildroot}%{_datadir}/%{name}/ -type d -name test -exec rm -rvf {} \; 2>/dev/null || : find %{buildroot}%{_datadir}/%{name}/ -type d -name __tests__ -exec rm -rvf {} \; 2>/dev/null || : # Fix shebangs find %{buildroot}%{_datadir}/%{name}/ -type f -exec sed -i -r -e 's"^#!(.*)/usr/bin/env php"#!%{_bindir}/php"' {} \; %files %{!?_licensedir:%global license %doc} %license LICENSE %doc README.md %doc NOTICE %dir %{_datadir}/%{name} %{_datadir}/%{name}/scripts %{_datadir}/%{name}/src %changelog * Tue Aug 9 2016 Jeroen van Meeuwen (Kolab Systems) - 20160727.git8f8e02d-1 - Taking in some of the packaging review recommendations * Wed Feb 25 2015 Tim Flink - 20150211.git9e0ea2c-2 - un-removing bundled jsonlint because the bundled version isn't compatible with upstream * Wed Feb 11 2015 Tim Flink - 20150211.git9e0ea2c-1 - Updating to latest upstream git * Sat Jan 17 2015 Vladimir Rusinov - 20141204.git549aa1b-2 - remove bundled jsonlint * Thu Dec 04 2014 Tim Flink - 20141204.git549aa1b-1 - updating to latest upstream git * Tue Sep 02 2014 Tim Flink - 20140902.git2de6440-1 - updating to latest upstream git * Mon Jul 21 2014 Tim Flink - 20140721.gitefc2cc5-1 - updating to latest upstream git * Sun May 18 2014 Tim Flink - 20140518.git1add454-1 - updating to latest upstream git * Thu Jan 23 2014 Tim Flink - 20140123.git86d651f-1 - updating to latest git * Tue Dec 10 2013 Tim Flink - 20131210.git69490c5-1 - updating to latest git * Wed Oct 30 2013 Tim Flink - 20131030.gitba9c942-1 - Initial package