%global git_rev 20230204.d87d5f0e %global git_hash d87d5f0e02e21bcd26f9bdfde84b5adf13b44050 Summary: A command line interface to Phabricator Name: arcanist # copr isn't purging older builds, even though they are deleted Epoch: 1 Version: 0.%{git_rev} Release: 1%{?dist} License: ASL 2.0 URL: https://secure.phabricator.com/book/phabricator/article/arcanist/ Source0: https://github.com/phacility/%{name}/archive/%{git_hash}.tar.gz#/%{name}-%{git_hash}.tar.gz BuildArch: noarch BuildRequires: php-cli >= 5.5 BuildRequires: php-json Requires: bash-completion Requires: php-json Requires: php-jsonlint Obsoletes: libphutil %description A command line interface to Phabricator %prep %setup -q -n arcanist-%{git_hash} rm -f bin/*.bat %build bin/arc shell-complete --generate %install BCDIR=%{buildroot}%{_datadir}/bash-completion/completions/ DATADIR=%{buildroot}%{_datadir}/%{name} # copy arcanist to the buildroot mkdir -p $DATADIR cp -a bin/ scripts/ src/ support/ $DATADIR/ rm -rf $DATADIR/support/shell find $DATADIR/ -type d -name __tests__ -exec rm -rf {} + mkdir -p $BCDIR cp -a support/shell/rules/bash-rules.sh $BCDIR/arc ln -s arc $BCDIR/phage # symlink the bin mkdir -p %{buildroot}%{_bindir} ln -s %{_datadir}/%{name}/bin/arc %{buildroot}%{_bindir}/ # Fix shebangs find $DATADIR/ -type f -exec sed -i -r -e 's,^#!(.*)/env (php|bash),#!%{_bindir}/\2,' {} \; %files %{!?_licensedir:%global license %doc} %license LICENSE %doc README.md %doc NOTICE %{_datadir}/bash-completion/completions/* %{_datadir}/%{name} %{_bindir}/arc