File platformsh-cli.spec of Package platformsh-cli

# spec file for package platformsh-cli
# Copyright (c) 2021 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           platformsh-cli
Version:        3.65.2
Release:        0
Summary:        Tool for managing services from the command line
# See licenses.txt for dependency licenses.
License:        MIT
Group:          Productivity/Networking/Web/Servers
Source0:        %{name}-%{version}.tar.xz
Source1:        %{name}-vendor.tar.xz
Source10:       extensions.php
Source11:       extensions.txt
Source12:       licenses.txt
BuildRequires:  xz
Requires:       php >= 5.5.9
Suggests:       php-curl
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

The CLI is the official command-line interface for
Use this tool to interact with projects, and to build them
locally for development purposes.

# -a 1: unpack Source1 vendor tarball
%setup -q -a 1

find . -name ".travis.yml" -delete
sed -i 's/@version-placeholder@/%{version}/' config.yaml

# install drush source
install -d -m 0755 . %{buildroot}%{_datadir}/%{name}
cp -r * %{buildroot}%{_datadir}/%{name}

# link to executable in bindir
mkdir -p %{buildroot}%{_bindir}
ln -s %{_datadir}/%{name}/bin/platform %{buildroot}%{_bindir}/platform

# link to bash complete script
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
ln -s %{_datadir}/%{name}/shell-config.rc %{buildroot}%{_sysconfdir}/bash_completion.d/


openSUSE Build Service is sponsored by