# debug info seem not works with D compiler %global debug_package %{nil} %global major_version 2 %global minor_version 77 %global patch_version 2 #%%global pre beta.7 Name: stdx-allocator Version: %{major_version}.%{minor_version}.%{patch_version} Release: 2%{?pre:.%{pre}}%{?dist} Summary: High-level interface for allocators for D Summary(fr): Interface haut niveau pour les allocateurs du langage D License: Boost URL: https://github.com/dlang-community/stdx-allocator Source0: https://github.com/dlang-community/stdx-allocator/archive/v%{version}%{?pre:-%{pre}}/%{name}-%{version}%{?pre:-%{pre}}.tar.gz ExclusiveArch: %{ldc_arches} BuildRequires: ldc meson %description High-level interface for allocators for D, extracted from Phobos. %description -l fr Interface haut niveau pour les allocateurs du langage D. Cette interface a été extraite de la bibliothèque standard Phobos. %package devel Summary: Development files for %{name} Summary(fr): Fichiers de développement pour %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel stdx-allocator-devel package contains header files for developing D applications that use stdx-allocator. %description devel -l fr Le paquet stdx-allocator contient les fichiers d'entêtes pour développer des applications en D utilisant stdx-allocator. %package geany-tags Summary: Support for enable auto-completion in geany Summary(fr): Support pour activer l'auto-complétion dans geany Requires: %{name} = %{version}-%{release} BuildArch: noarch BuildRequires: geany Requires: geany %description geany-tags Enable auto-completion for msgpack-d library in geany (IDE) %description -l fr geany-tags Active l'auto-complétion pour pour la bibliothèque msgpack-d dans geany (IDE) %prep %autosetup -n %{name}-%{version}%{?pre:-%{pre}} # temp geany config directory for allow geany to generate tags mkdir geany_config # https://github.com/dlang-community/stdx-allocator/issues/2 sed -i "s|_payload.ptr + _payload.length|cast(ulong*)(_payload.ptr + _payload.length)|" source/stdx/allocator/building_blocks/bitmapped_block.d %build export DFLAGS='-w -release -g -O2' LDFLAGS='-Wl,-z,relro -Wl,-z,now' %meson %meson_build # generate doc src_dir='source' sources=$(find "${src_dir}" -name '*.d') for f in ${sources[@]}; do d_path=$(dirname ${f}); d_file=$(basename ${f}); doc_file=html/${d_path/${src_dir}}/${d_file/.d/.html} ldc2 -I "${src_dir}" -o- -c $f -Df ${doc_file}; done # generate geany tags headers=$(find source -name '*.d') geany -c geany_config -g %{name}.d.tags ${headers[@]} %install %meson_install # geany tags install -d %{buildroot}/%{_datadir}/geany/tags/ install -m0644 %{name}.d.tags %{buildroot}/%{_datadir}/geany/tags/ %ldconfig_scriptlets %files %{_libdir}/lib%{name}.so.%{version} %{_libdir}/lib%{name}.so.0 %files devel %doc html %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/d/%{name} %{_libdir}/lib%{name}.so %files geany-tags %{_datadir}/geany/tags/%{name}.d.tags %changelog * Wed Aug 08 2018 MERCIER Jonathan - 2.77.2-2 - Use meson as build system - Remove Rpath - Change Source0 * Wed Aug 1 2018 MERCIER Jonathan - 2.77.2-1 - Initial release