File premake5.spec of Package premake5

#
# spec file for package premake5
#
# Copyright (c) 2017 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/
#

%define numver 5.0.0
%define betanum 3

%define fullverstr %{numver}-beta%{betanum}

%define config release
Name:           premake5
Version:        %{numver}~beta%{betanum}
Release:        0
Summary:        Powerfully simple build configuration
License:        BSD-3-Clause
Group:          Development/Tools/Building
Url:            http://industriousone.com/premake
Source:         https://github.com/premake/premake-core/releases/download/v%{fullverstr}/premake-%{fullverstr}-src.zip
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(uuid)
BuildRequires:  unzip
BuildRequires:  dos2unix
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(uuid)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Premake is a command line utility which reads a scripted definition of a software project and, most commonly, uses it to generate project files for toolsets like Visual Studio, Xcode, or GNU Make.

%prep
%setup -q -n premake-%{fullverstr}-src
sed -i s,/etc/ssl/cert.pem,/etc/ssl/ca-bundle.pem, contrib/curl/premake5.lua

%build
pushd build/gmake2.unix
make \
  Premake5 \
  config=%{config} \
  CFLAGS="\$(CPPFLAGS) \$(ARCH) \$(RPM_OPT_FLAGS)" \
  LDFLAGS="-rdynamic" verbose=1 %{?_smp_mflags}
popd

dos2unix CHANGES.txt
dos2unix LICENSE.txt
dos2unix README.md

%install
install -D -m 0755 bin/%{config}/premake5 %{buildroot}%{_bindir}/%{name}

%files
%defattr(-,root,root)
%doc CHANGES.txt LICENSE.txt README.md
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by