%global debug_package %{nil} %define build_timestamp %{lua: print(os.date("%Y.%m.%d"))} %global appname dub # DMD is available only on x86*. Use LDC otherwise. %ifarch %{ix86} x86_64 %bcond_without dcompiler_dmd %else %bcond_with dcompiler_dmd %endif Name: %{appname}-git Version: %{build_timestamp} Release: 1%{?dist} Summary: Package manager and meta build tool for the D programming language License: MIT URL: https://code.dlang.org #Source: BuildRequires: gcc git pkgconfig libcurl-devel %if %{with dcompiler_dmd} BuildRequires: dmd-git %else BuildRequires: ldc-git %endif %description Package Manager for the D Programming language. DUB emerged as a more general replacement for vibe.d's package manager. It does not imply a dependecy to vibe.d for packages and was extended to not only directly build projects, but also to generate project files (currently VisualD). Mono-D also support the use of dub.json (dub's package description) as project file. %prep git clone --depth=1 https://github.com/dlang/dub . %build %if %{with dcompiler_dmd} dmd -run build.d %else ldmd2 -run build.d %endif # Build man pages #./bin/dub scripts/man/gen_man.d %install install -pDm755 bin/dub %{buildroot}%{_bindir}/%{appname} install -pDm644 scripts/bash-completion/dub.bash %{buildroot}%{_datadir}/bash-completion/completions/%{appname} install -pDm644 scripts/zsh-completion/_dub %{buildroot}%{_datadir}/zsh/site-functions/_%{appname} install -pDm644 scripts/fish-completion/dub.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{appname}.fish %files %{_bindir}/%{appname} %{_datadir}/bash-completion/completions/%{appname} %{_datadir}/zsh/site-functions/_%{appname} %{_datadir}/fish/vendor_completions.d/%{appname}.fish %changelog