File amalthea-gdc.spec of Package amalthea-gdc

%define MAJOR_VERSION 1
Name:           amalthea-gdc
Version:        1.11.5
Summary:        Small general-purpose library for the D programming language, version for gdc
%if 0%{?suse_version}
License:        BSL-1.0 or LGPL-3.0+
%else
License:        Boost or LGPLv3+
%endif
URL:            https://gitlab.com/os-18/amalthea

Release:        1%{?dist}
Source0:        %{name}-%{version}.tar.xz
%if 0%{?suse_version}
BuildRequires:  bash chrpath findutils gcc-d openSUSE-release lsb-release glib2-devel
%else
BuildRequires:  bash chrpath findutils gcc-d generic-release redhat-lsb util-linux glib2-devel
%endif

%description
The library provides some useful features.
This version is for the compiler gdc.

%global debug_package %{nil}

%package -n lib%{name}-%{MAJOR_VERSION}
Summary:        Shared library of the Amalthea project
Provides:       %{name} = %{version}-%{release}

%description -n lib%{name}-%{MAJOR_VERSION}
Small general-purpose library for the D programming language, version for gdc.
This package provides shared library for the gdc compiler.


%prep
%autosetup

%build
%make_build DC=gdc

%install
%make_install PREFIX=usr DC=gdc

%files -n lib%{name}-%{MAJOR_VERSION}
%_libdir/lib%{name}.so.%{MAJOR_VERSION}
%_libdir/lib%{name}.so.%{version}
/etc/amalthea-gdc/fileformats.json
%config /etc/amalthea-gdc/fileformats.json
%dir /etc/amalthea-gdc/

%package devel
Summary:        Development files of the Amalthea library
Requires:       lib%{name}-%{MAJOR_VERSION} = %{version} pkg-config

%post -n lib%{name}-%{MAJOR_VERSION} -p /sbin/ldconfig
%postun -n lib%{name}-%{MAJOR_VERSION} -p /sbin/ldconfig

%files devel
%if 0%{?suse_version}
%{_prefix}/lib64/gcc/
%{_prefix}/lib64/gcc/*
%{_prefix}/lib64/gcc/*/*
%{_prefix}/lib64/gcc/*/*/include/
%{_prefix}/lib64/gcc/*/*/include/d
%{_prefix}/lib64/gcc/*/*/include/d/amalthea
%{_prefix}/lib64/gcc/*-linux/*/include/d/amalthea/*
%else
%{_prefix}/lib/gcc/*-linux/*/include/d/amalthea/*
%endif
%_libdir/lib%{name}.so
%_libdir/lib%{name}.a
%config %_libdir/pkgconfig/%{name}.pc
%config %_libdir/pkgconfig/%{name}-static.pc

%description devel
Small general-purpose library for the D programming language, version for gdc.
This package provides static library and files for importing.
Built by the gdc compiler.


%changelog
* Fri Oct 24 2025 Eugene 'Vindex' Stulin <tech.vindex@gmail.com> 1.11.5
- new upstream release.
openSUSE Build Service is sponsored by