## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %undefine _auto_set_build_flags %global __local_generator_provides %{S:3} %{version}-%{release} %global __local_generator_path ^%{hare_stdlib}$ # XXX: Dynamic linking on aarch64 currently leads to this error: # # relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `environ@@GLIBC_2.17' # which may bind externally can not be used when making a shared object; # recompile with -fPIC # # This package is not trying to build a shared object, and this problem does # not occur for dynamic builds on x86_64, or aarch64 cross compilation on an # x86_64 host with the aarch64-linux-gnu cross tool chain. It appears to be a # problem in the default linker, because lld succeeds. %dnl %%global _distro_extra_ldflags -fuse-ld=lld Summary: The Hare programming language Name: hare License: GPL-3.0-only Version: 0.25.2%{?preview:~%preview} Release: %autorelease URL: https://harelang.org/ Source0: https://git.sr.ht/~sircmpwn/%{name}/archive/%{version}%{?preview:-%preview}.tar.gz Source1: macros.%{name} Source2: %{name}.attr Source3: %{name}.prov Source4: %{name}.req %{load:%{S:1}} BuildRequires: binutils BuildRequires: gcc BuildRequires: harec BuildRequires: lld BuildRequires: make BuildRequires: qbe BuildRequires: rpm-local-generator-support BuildRequires: scdoc BuildRequires: tzdata Requires: %{name}-rpm-macros = %{version}-%{release} Requires: %{name}-stdlib = %{version}-%{release} Requires: binutils Requires: harec Requires: qbe Requires: tzdata # See cross tool chain in config.mk below Recommends: gcc %{lua: for arch in string.gmatch(macros.hare_arches, '%S+') do if arch ~= macros._arch then print("Recommends: gcc-"..arch.."-linux-gnu\n") end end} ExclusiveArch: %{hare_arches} %description Hare is a systems programming language. %package stdlib Summary: The Hare standard library License: MPL-2.0 BuildArch: noarch Requires: tzdata %description stdlib The standard library for the Hare programming language. %package rpm-macros Summary: Macros for hare packages License: MIT BuildArch: noarch %description rpm-macros RPM macros for packages shipping hare modules. %prep %autosetup -p1 -n %{name}-%{version}%{?preview:-%preview} %conf tee config.mk <<'EOF' PREFIX = %{_prefix} BINDIR = %{_bindir} MANDIR = %{_mandir} SRCDIR = %{_usrsrc} LIBEXECDIR = %{_libexecdir} TOOLDIR = %{hare_tooldir} STDLIB = %{hare_stdlib} HAREPATH = %{hare_stdlib}:%{hare_moddir} VERSION = %{version}-%{release} PLATFORM = %{_host_os} ARCH = %{_arch} HAREFLAGS = %{build_hareflags} HAREC = harec HARECFLAGS = QBE = qbe QBEFLAGS = LDFLAGS = %{build_ldflags} LDLINKFLAGS = %{hare_ldlinkflags} SCDOC = scdoc HARECACHE = .cache BINOUT = .bin %{lua: for arch in string.gmatch(macros.hare_arches, '%S+') do local host = arch.."-linux-gnu-" if arch == macros._arch then host = "" end print(string.upper(arch).."_AS = "..host.."as\n") print(string.upper(arch).."_AR = "..host.."ar\n") print(string.upper(arch).."_CC = "..host.."gcc\n") print(string.upper(arch).."_LD = "..host.."ld\n") end} EOF %build %make_build %install %make_install install -d -m 755 %{buildroot}%{hare_moddir} install -D -m 644 -p -t %{buildroot}/%{_rpmmacrodir} %{S:1} install -D -m 644 -p -t %{buildroot}/%{_fileattrsdir} %{S:2} install -D -m 755 -p -t %{buildroot}/%{_rpmconfigdir} %{S:3} install -D -m 755 -p -t %{buildroot}/%{_rpmconfigdir} %{S:4} %check %make_build check # XXX: HARETEST_INCLUDE=slow %files %doc README.md %license cmd/COPYING %{_bindir}/%{name}* %{_mandir}/man1/%{name}* %{_mandir}/man5/%{name}* %dir %{hare_srcdir} %dir %{hare_moddir} %files stdlib %doc README %license COPYING %{hare_stdlib} %files rpm-macros %{_fileattrsdir}/%{name}.attr %{_rpmmacrodir}/macros.%{name} %{_rpmconfigdir}/%{name}.* %changelog ## START: Generated by rpmautospec * Fri Jul 11 2025 Dridi Boukelmoune - 0.25.2-1 - Uncommitted changes * Thu Jun 26 2025 Dridi Boukelmoune - 0.24.2-17 - Don't ship stdlib dir in main package * Thu Jan 02 2025 Dridi Boukelmoune - 0.24.2-16 - Absolute paths for buildrequires generator * Thu Jan 02 2025 Dridi Boukelmoune - 0.24.2-15 - Add patches for buildrequires * Fri Dec 27 2024 Dridi Boukelmoune - 0.24.2-14 - New macro for dynamic BuildRequires * Fri Dec 27 2024 Dridi Boukelmoune - 0.24.2-13 - Pass tags to dependency generators * Fri Dec 27 2024 Dridi Boukelmoune - 0.24.2-12 - Define a macro to set up build tags * Fri Dec 27 2024 Dridi Boukelmoune - 0.24.2-11 - Collect direct module dependencies * Fri Dec 27 2024 Dridi Boukelmoune - 0.24.2-10 - Fail the build on generators errors * Thu Dec 26 2024 Dridi Boukelmoune - 0.24.2-9 - Also own the stdlib directory in hare * Mon Dec 23 2024 Dridi Boukelmoune - 0.24.2-8 - Dynamic linking with lld * Mon Dec 23 2024 Dridi Boukelmoune - 0.24.2-7 - Turn %%ldlinkflags into a hare-specific macro * Mon Dec 23 2024 Dridi Boukelmoune - 0.24.2-6 - Patch provenance * Mon Dec 23 2024 Dridi Boukelmoune - 0.24.2-5 - Polish generators * Sat Dec 21 2024 Dridi Boukelmoune - 0.24.2-4 - Ignore rpmlint false-positives * Fri Dec 20 2024 Dridi Boukelmoune - 0.24.2-3 - Mock sources * Fri Dec 20 2024 Dridi Boukelmoune - 0.24.2-2 - Update patches * Fri Dec 20 2024 Dridi Boukelmoune - 0.24.2-1 - Initial import ## END: Generated by rpmautospec