- Update specfile

* Adopt new makefile to new configs

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/harec?expand=0&rev=18
This commit is contained in:
Soc Virnyl Estela 2024-01-20 09:02:03 +00:00 committed by Git OBS Bridge
parent 1ab21d5afe
commit d0c4062446
2 changed files with 29 additions and 15 deletions

View File

@ -10,6 +10,8 @@ Sat Jan 20 07:21:00 UTC 2024 - Soc Virnyl Estela <uncomfy+openbuildservice@uncom
* OpenBSD: fix tests
* replace ./configure with config.mk
* fix confusing wording in parse.c
- Update specfile
* Adopt new makefile to new configs
-------------------------------------------------------------------
Sat Dec 23 08:12:46 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>

View File

@ -36,28 +36,40 @@ POSIX-compatible systems.
%prep
%setup -q
mkdir -p build/
%build
export CFLAGS="%optflags"
cat > config.mk <<-SH
PREFIX = %{_prefix}
BINDIR = %{_bindir}
# Harec does not use autoconf
pushd build/
../configure
make %{?_smp_mflags} VERSION="%{version}"
popd
PLATFORM = linux
ARCH = %{_arch}
HARECFLAGS =
QBEFLAGS =
ASFLAGS =
LDLINKFLAGS = --gc-sections -z noexecstack
CFLAGS = %{optflags}
LDFLAGS = %{build_ldflags}
CC = cc
AS = as
LD = ld
QBE = qbe
HARECACHE = .cache
BINOUT = .bin
DEFAULT_TARGET = %{_arch}
VERSION = %{version}
SH
make
%install
export CFLAGS="%optflags"
pushd build/
make %{?_smp_mflags} VERSION="%{version}" DESTDIR="%{buildroot}" BINDIR="%{_bindir}" install
popd
make DESTDIR=%{buildroot} install
%check
export CFLAGS="%optflags"
cd build
../configure
make %{?_smp_mflags} check
make check
%files
%{_bindir}/%{name}