SHA256
1
0
forked from pool/hare
hare/hare.spec
Soc Virnyl Estela 7f63f93176 - Update specfile
- Update to version 1701471445.901444ae:
  * scripts/genbootstrap: reset platformtags
  * drop build status from readme
  * configs/openbsd.mk remove my local path
  * OpenBSD: add .builds/openbsd.yml
  * OpenBSD: make bootstrap
  * OpenBSD: unix::tty isatty() use fcntl(F_ISATTY)
  * OpenBSD: os::exec update for checkless for loops
  * MAINTAINERS: add Lorenz (xha) <me@xha.li> to OpenBSD
  * OpenBSD: add genbootstrap
  * OpenBSD: add net::unix
  * OpenBSD: add net::udp
  * OpenBSD: add net::tcp
  * OpenBSD: add net::ip
  * OpenBSD: add net
  * OpenBSD: add crypto::random
  * OpenBSD: add format::elf
  * OpenBSD: add unix::resolveconf
  * OpenBSD: add unix::hosts
  * OpenBSD: add unix::poll
  * OpenBSD: add unix::tty
  * OpenBSD: add unix::signal
  * OpenBSD: add unix
  * OpenBSD: add os::exec
  * OpenBSD: add os
  * OpenBSD: add time::chrono
  * OpenBSD: add time
  * OpenBSD: add path
  * OpenBSD: add io

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/hare?expand=0&rev=5
2023-12-02 10:24:55 +00:00

132 lines
2.8 KiB
RPMSpec

#
# spec file for package hare
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: hare
Release: 0
Version: 1699559089.3d06f9d2
Summary: Hare system programming language
Group: Development/Tools/Building
License: MPL-2.0
URL: https://harelang.org
Source0: %{name}-%{version}.tar.zst
BuildRequires: gcc
BuildRequires: harec
BuildRequires: make
BuildRequires: qbe
BuildRequires: binutils
BuildRequires: scdoc
BuildRequires: zstd
Requires: harec
Requires: qbe
%description
Hare is a systems programming language designed
to be simple, stable, and robust. Hare uses a
static type system, manual memory management,
and a minimal runtime. It is well-suited to
writing operating systems, system tools, compilers,
networking software, and other low-level, high
performance tasks
%prep
%setup -q
rm configs/linux.mk
cat > configs/linux.mk <<-SH
## Install configuration
PREFIX = %{_prefix}
BINDIR = %{_bindir}
MANDIR = %{_mandir}
SRCDIR = %{_libdir}
STDLIB = %{_libdir}/%{name}/stdlib
## Build configuration
# variables used during the build
PLATFORM = linux
ARCH = %{_arch}
HAREFLAGS =
HARECFLAGS =
QBEFLAGS =
ASFLAGS =
LDLINKFLAGS = --gc-sections -z noexecstack
# commands used by the build script
HAREC = harec
HAREFLAGS =
QBE = qbe
AS = as
LD = ld
AR = ar
SCDOC = scdoc
# build locations
HARECACHE = .cache
BINOUT = .bin
# variables that will be embedded in the binary with the -D definitions
HAREPATH = %{_libdir}/%{name}/stdlib:%{_libdir}/%{name}/third-party
VERSION = %{version}
# Cross-compiler toolchains
AARCH64_AS=as
AARCH64_AR=ar
AARCH64_CC=cc
AARCH64_LD=ld
RISCV64_AS=as
RISCV64_AR=ar
RISCV64_CC=cc
RISCV64_LD=ld
X86_64_AS=as
X86_64_AR=ar
X86_64_CC=cc
X86_64_LD=ld
SH
%build
export CFLAGS="%optflags"
export PLATFORM="linux"
export ARCH="%{_arch}"
make %{?_smp_mflags}
%install
export CFLAGS="%optflags"
export PLATFORM="linux"
export ARCH="%{_arch}"
make %{?_smp_mflags} DESTDIR="%{buildroot}" install
%check
export CFLAGS="%optflags"
export PLATFORM="linux"
export ARCH="%{_arch}"
make %{?_smp_mflags} check
%files
%license COPYING
%doc README.md
%{_bindir}/%{name}
%{_bindir}/%{name}doc
%{_mandir}/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%changelog