- 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 * OpenBSD: fix tests
* replace ./configure with config.mk * replace ./configure with config.mk
* fix confusing wording in parse.c * 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> 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 %prep
%setup -q %setup -q
mkdir -p build/
%build %build
export CFLAGS="%optflags" cat > config.mk <<-SH
PREFIX = %{_prefix}
BINDIR = %{_bindir}
# Harec does not use autoconf PLATFORM = linux
pushd build/ ARCH = %{_arch}
../configure HARECFLAGS =
make %{?_smp_mflags} VERSION="%{version}" QBEFLAGS =
popd 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 %install
export CFLAGS="%optflags" make DESTDIR=%{buildroot} install
pushd build/
make %{?_smp_mflags} VERSION="%{version}" DESTDIR="%{buildroot}" BINDIR="%{_bindir}" install
popd
%check %check
export CFLAGS="%optflags" make check
cd build
../configure
make %{?_smp_mflags} check
%files %files
%{_bindir}/%{name} %{_bindir}/%{name}