File bazel.spec of Package bazel

Name:           bazel
Version:        0.5.3
Release:        0
License:        Apache-2.0
Summary:        Bazel is Google's own build tool
Url:            http://bazel.io
Group:          Development/Tools/Building

Source0:        %name-%version-dist.zip

BuildRequires:  java-devel >= 1.8.0
BuildRequires:  zip, unzip, gcc-c++
Requires:       java-devel >= 1.8.0

%description
Bazel is Google's own build tool, now publicly available in Beta. Bazel has
built-in support for building both client and server software, including
client applications for both Android and iOS platforms. It also provides an
extensible framework that you can use to develop your own build rules.

%prep
# zip file does not create a right directory, so -c switch for setup
%setup -cq

%build
#env EXTRA_BAZEL_ARGS="-c opt" \
    ./compile.sh

%install
# Taken from coccinelle. We need to disable binary stripping because bazel
# has embedded data in the binary, which is (rightly) removed when stripping.
export NO_BRP_STRIP_DEBUG=true
export NO_DEBUGINFO_STRIP_DEBUG=true
%define __debug_install_post %{nil}
: >debugfiles.list
: >debugsources.list

install -m755 -D output/bazel \
    "%buildroot%_bindir/bazel"

install -m644 -D scripts/zsh_completion/_bazel \
    "%buildroot%_datadir/zsh/site-functions/_bazel"

%files
%defattr(-,root,root,-)
%_bindir/bazel
%dir %_datadir/zsh
%dir %_datadir/zsh/site-functions
%_datadir/zsh/site-functions/_bazel

%changelog

openSUSE Build Service is sponsored by