%define git_short_version_hash 8f8e02d %define git_full_version_hash 8f8e02d47569dce5f035383d8bcbf7a08481e839 Summary: A collection of PHP utility classes Name: libphutil Version: 0.0 Release: 3.20160806.git%{git_short_version_hash}%{?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 # Document what's in the phabricator subpackage, so that RPM will # be able to build the actual subpackage. Source999: README.phabricator Patch0001: 0001-Parse-From-lines-in-the-format-user-domain.com-user-.patch Patch0002: 0002-Unvendorize-jsonlint.patch Patch0003: 0003-Remove-xhprof-dependency.patch Patch0004: 0004-Remove-php-mysql-From-Library-Map.patch BuildArch: noarch # Virtual provides to silence rpmlint on requiring an explicit # library for arcanist and phabricator. Provides: arcanist(libphutil) = %{version}-%{release} Requires: php(language) >= 5 Requires: php-curl Requires: php-date Requires: php-fileinfo Requires: php-jsonlint Requires: php-mbstring Requires: php-xml %description A collection of PHP utility classes used with phabricator %package phabricator Summary: A collection of dependencies optimized for Phabricator Requires: php-gd Requires: php-ldap Requires: php-mysqli Requires: php-opcache Requires: php-pecl(APC) # Virtual provides to silence rpmlint on requiring an explicit # library for arcanist and phabricator. Provides: phabricator(libphutil) = %{version}-%{release} %description phabricator A meta-package to pull in optimization and server-side dependencies for Phabricator. %prep %setup -q -n libphutil-%{git_full_version_hash} # this uses php-mysql which is not available in Fedora anymore rm src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php %patch0001 -p1 -b .email-format %patch0002 -p1 -b .unven-jsonlint %patch0003 -p1 -b .remove-xhprof %patch0004 -p1 -b .remove-php-mysql cp -a %{SOURCE999} . %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 %files phabricator %doc README.phabricator %changelog * Fri Sep 23 2016 Tim Flink - 0.0-3.20160806.git8f8e02d - Change version and release so that they adhere to packaging guidelines * Tue Sep 13 2016 Tim Flink - 20160806.git8f8e02d-2 - Changing requires to php-mysqli, removing code that uses/references php-mysql * Wed Aug 10 2016 Jeroen van Meeuwen (Kolab Systems) - 20160806.git8f8e02d-1 - Correct NEVRA * Tue Aug 9 2016 Jeroen van Meeuwen (Kolab Systems) - 20160727.git8f8e02d-2 - Adjust dependency on php-opcache - Adjust dependency on php-pecl-apcu - Remove dependency on XHProf (strip references to it as well) - 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