## START: Set by rpmautospec ## (rpmautospec version 0.7.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 %global debug_package %{nil} %define lib_name vibe-d %define lib_ver 0.9.8 %define lib_gitver 0.9.8 %define lib_semver 0.9.8 %define lib_dist 0 %define lib_commit 0000000 %define lib_short 0000000 %if 0%{lib_dist} > 0 %define lib_suffix ^%{lib_dist}.git%{lib_short} %endif Name: zdub-%{lib_name} Version: %{lib_ver}%{?lib_suffix:} Release: %autorelease Summary: %{lib_name} library for D Group: Development/Libraries License: MIT URL: https://github.com/vibe-d/vibe.d Source0: https://code.dlang.org/packages/%{lib_name}/%{lib_gitver}.zip BuildRequires: git BuildRequires: ldc BuildRequires: dub BuildRequires: jq BuildRequires: zdub-diet-ng-static BuildRequires: zdub-mir-linux-kernel-static BuildRequires: zdub-openssl-static BuildRequires: zdub-vibe-container-static BuildRequires: zdub-vibe-core-static %description An actual description of %{lib_name} #FIXME: generate an actual description %package devel Provides: %{name}-static = %{version}-%{release} Summary: Support to use %{lib_name} for developing D applications Group: Development/Libraries Requires: zdub-dub-settings-hack Requires: zdub-diet-ng-static Requires: zdub-mir-linux-kernel-static Requires: zdub-openssl-static Requires: zdub-vibe-container-static Requires: zdub-vibe-core-static %description devel Sources to use the %{lib_name} library on dub using the zdub-dub-settings-hack method. %prep %autosetup -n vibe.d-%{lib_gitver} -p1 [ -f dub.sdl ] && dub convert -f json mv -f dub.json dub.json.base jq '. += {"version": "0.9.8"}' dub.json.base > dub.json.ver jq 'walk(if type == "object" then with_entries(select(.key | test("preBuildCommands*") | not)) else . end)' dub.json.ver > dub.json pushd tls dub convert -f json mv dub.json dub.json.static jq 'walk(if type == "object" then with_entries(select(.key | test("openssl-static") | not)) else . end)' dub.json.static > dub.json popd mv LICENSE.txt LICENSE rm -rf lib %check dub build \ --cache=local --temp-build \ --skip-registry=all \ --compiler=ldc2 \ --deep dub clean %install mkdir -p %{buildroot}%{_datadir}/dub/%{lib_name}/%{lib_gitver} cp -r . %{buildroot}%{_datadir}/dub/%{lib_name}/%{lib_gitver}/%{lib_name} %files devel %license LICENSE %{_datadir}/dub/%{lib_name}/%{lib_gitver}/%{lib_name}/ %changelog ## START: Generated by rpmautospec * Mon Sep 02 2024 John Doe - 0.9.8-1 - Uncommitted changes ## END: Generated by rpmautospec