File oxfuse-gdc.spec of Package oxfuse-gdc

%define MAJOR_VERSION 0
Name:           oxfuse-gdc
Version:        0.5.1
Summary:        High-level binding to libfuse3 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/oxfuse

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

%description
The library provides an object-oriented API for implementing file systems in userspace.
This version is for the compiler gdc.

%global debug_package %{nil}

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

%description -n lib%{name}-%{MAJOR_VERSION}
High-level binding to libfuse3 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}


%package devel
Summary:        Development files of the OXFuse 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/oxfuse
%{_prefix}/lib64/gcc/*-linux/*/include/d/oxfuse/*
%else
%{_prefix}/lib/gcc/*-linux/*/include/d/oxfuse/*
%endif
%_libdir/lib%{name}.so
%_libdir/lib%{name}.a
%config %_libdir/pkgconfig/%{name}.pc
%config %_libdir/pkgconfig/%{name}-static.pc

%description devel
High-level binding to libfuse3 for the D programming language, version for gdc.
This package provides static library and files for importing.
Built by the gdc compiler.


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