File yarn.spec of Package yarn-1.9.2

#
# spec file for non-build buildpack dependencies
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           yarn-1.9.2
Version:        1.9.2
Release:        1
License:        BSD-2-Clause
Group:          Cloud/Platform/scf
Summary:        Automatic build of yarn for the use in buildpacks in SCF
Url:            https://yarnpkg.com
Source:         https://yarnpkg.com/downloads/1.9.2/yarn-v1.9.2.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

# BEGIN shared macros for all dependency packages
BuildRequires: aaa_stack_build_requires

%if 0%{?is_opensuse}
%define stack opensuse42
%else
%define stack sle12
%endif

%define otherdir %{_topdir}/OTHER
%define prefix_path /app/vendor/%{name}
%define destdir /tmp/%{name}/
%define dependencydir %{destdir}/%{prefix_path}
# END shared macros


%description

%prep

%build

%install
TARBALL=%{otherdir}/%{name}.tgz
cp %{SOURCE0} ${TARBALL}

CHECKSUM=`sha256sum ${TARBALL}`
NEW_TARBALL=%{otherdir}/$(basename $TARBALL)-%{stack}-${CHECKSUM:0:8}.tgz
mv ${TARBALL} ${NEW_TARBALL}

echo `sha256sum ${NEW_TARBALL}` > %{otherdir}/$(basename ${NEW_TARBALL}).sha256

%post
%postun

%files
%defattr(-,root,root)

%changelog

openSUSE Build Service is sponsored by