File wcc.spec of Package wcc

#
# spec file for package wcc
#
# 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:           wcc
Version:        0.0.2
Release:        0
Summary:        The Witchcraft Compiler Collection
License:        MIT
Group:          Development/Tools/Debuggers
Url:            https://github.com/endrazine/wcc
Source0:        https://github.com/endrazine/wcc/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE wcc-0.0.2-flags.patch # PIE still not ok with wcc exe, perhaps bfd's fault?
Patch0:         wcc-0.0.2-flags.patch
# PATCH_FIX-OPENSUSE wcc-0.0.2-use_system_libs.patch
Patch1:         wcc-0.0.2-use_system_libs.patch
# PATCH_FIX-OPENSUSE wcc-0.0.2-paths.patch
Patch2:         wcc-0.0.2-paths.patch
BuildRequires:  binutils-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(capstone)
BuildRequires:  pkgconfig(libelf)
BuildRequires:  pkgconfig(linenoise)
BuildRequires:  pkgconfig(lua) >= 5.3
BuildRequires:  pkgconfig(openlibm)
BuildRequires:  pkgconfig(zlib)
ExclusiveArch:  x86_64

%description
WCC is a collection of compilation tools to perform binary black magic
on the GNU/Linux and other POSIX platforms.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
### temp
rm -r src/wsh/lua src/wsh/include/lua*.h
###
# remove executable bit
###chmod -x src/wsh/scripts/debug src/wsh/scripts/md5.wsh src/wsh/scripts/read.wsh

%build
make %{?_smp_mflags}

%install
make %{?_smp_mflags} install DESTDIR=%{buildroot}

%files
%doc README.md
%license LICENSE
%{_bindir}/wcc
%{_bindir}/wcch
%{_bindir}/wld
%{_bindir}/wldd
%{_bindir}/wsh
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by