0f334addae
so version was wrong OBS-URL: https://build.opensuse.org/request/show/362606 OBS-URL: https://build.opensuse.org/package/show/devel:languages:D/ldc?expand=0&rev=7
147 lines
4.5 KiB
RPMSpec
147 lines
4.5 KiB
RPMSpec
#
|
|
# spec file for package ldc
|
|
#
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
Name: ldc
|
|
Version: 0.17.0
|
|
%define version2 0.17.0
|
|
Release: 0
|
|
Summary: The LLVM D Compiler
|
|
License: BSD-3-Clause and Artistic-1.0
|
|
Group: Development/Languages/Other
|
|
Url: https://github.com/ldc-developers/ldc
|
|
Source0: ldc-%{version2}-src.tar.gz
|
|
Source1: %{name}-rpmlintrc
|
|
# PATCH-FIX-OPENSUSE workaround-buggy-llvm-config.patch bnc#856691
|
|
Patch1: workaround-buggy-llvm-config.patch
|
|
BuildRequires: cmake
|
|
BuildRequires: help2man
|
|
BuildRequires: libconfig++-devel
|
|
BuildRequires: llvm-clang
|
|
BuildRequires: llvm-devel >= 3.5
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: zlib-devel
|
|
# Should be installed, at least runtime
|
|
Recommends: ldc-phobos-devel = %{version}
|
|
Recommends: ldc-runtime-devel = %{version}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%define so_ver 68
|
|
%define lname_runtime libdruntime-%{name}
|
|
%define lname_phobos libphobos2-%{name}
|
|
|
|
%description
|
|
LDC is an LLVM based compiler for the D programming language. It uses the
|
|
frontend of the reference compiler (DMD), thereby supporting the same language
|
|
features, but profits from LLVM's superior optimizing and code generation
|
|
capabilities.
|
|
|
|
%package -n %{lname_runtime}%{so_ver}
|
|
Summary: Minimal D runtime library
|
|
|
|
%description -n %{lname_runtime}%{so_ver}
|
|
The minimal runtime library required to support the D programming language.
|
|
|
|
%package runtime-devel
|
|
Summary: Development files for the D runtime library
|
|
Requires: %{lname_runtime}%{so_ver} = %{version}
|
|
Recommends: ldc-phobos-devel = %{version}
|
|
|
|
%description runtime-devel
|
|
This package contains the druntime development files necessary for developing
|
|
with LDC.
|
|
|
|
%package -n %{lname_phobos}%{so_ver}
|
|
Summary: The D standard library
|
|
|
|
%description -n %{lname_phobos}%{so_ver}
|
|
This package includes ldc's phobos library - The D standard library.
|
|
|
|
%package phobos-devel
|
|
Summary: Development files for the D standard library
|
|
Requires: %{lname_phobos}%{so_ver} = %{version}
|
|
Requires: %{name}-runtime-devel = %{version}
|
|
|
|
%description phobos-devel
|
|
This package contains the Phobos development files necessary for developing
|
|
with LDC.
|
|
|
|
%prep
|
|
%setup -q -n ldc-%{version2}-src
|
|
%patch1 -p1
|
|
|
|
%build
|
|
#Needs to be compiled with clang, but opensuse_rules.cmake forces gcc so disable rule
|
|
touch no-suse-rules
|
|
%cmake \
|
|
-DCMAKE_USER_MAKE_RULES_OVERRIDE=./no-suse-rules \
|
|
-DCMAKE_C_COMPILER="%{_bindir}/clang" \
|
|
-DCMKAE_CXX_COMPILER="%{_bindir}/clang++" \
|
|
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \
|
|
-DCMAKE_CXX_FLAGS="-std=c++11"
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
%cmake_install
|
|
# Build man pages
|
|
help2man %{buildroot}%{_bindir}/ldc2 > ldc2.1 && gzip ldc2.1
|
|
help2man %{buildroot}%{_bindir}/ldmd2 > ldmd2.1 && gzip ldmd2.1
|
|
install -d %{buildroot}%{_mandir}/man1
|
|
install -m 644 -t %{buildroot}%{_mandir}/man1/ ldmd2.1.gz ldc2.1.gz
|
|
|
|
%post -n %{lname_runtime}%{so_ver} -p /sbin/ldconfig
|
|
|
|
%post -n %{lname_phobos}%{so_ver} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lname_runtime}%{so_ver} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lname_phobos}%{so_ver} -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc LICENSE README.md
|
|
%doc %{_mandir}/man1/*.1.gz
|
|
%config %{_sysconfdir}/bash_completion.d/ldc2
|
|
%config %{_sysconfdir}/ldc2.conf
|
|
%{_bindir}/ldc2
|
|
%{_bindir}/ldmd2
|
|
|
|
%files -n %{lname_runtime}%{so_ver}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/%{lname_runtime}.so.*
|
|
%{_libdir}/%{lname_runtime}-debug.so.*
|
|
|
|
%files runtime-devel
|
|
%defattr(-,root,root)
|
|
%{_libdir}/%{lname_runtime}.so
|
|
%{_libdir}/%{lname_runtime}-debug.so
|
|
%dir %{_includedir}/d
|
|
%{_includedir}/d/ldc
|
|
%{_includedir}/d/core
|
|
|
|
%files -n %{lname_phobos}%{so_ver}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/%{lname_phobos}.so.*
|
|
%{_libdir}/%{lname_phobos}-debug.so.*
|
|
|
|
%files phobos-devel
|
|
%defattr(-,root,root)
|
|
%{_libdir}/%{lname_phobos}.so
|
|
%{_libdir}/%{lname_phobos}-debug.so
|
|
%{_includedir}/d/std
|
|
%{_includedir}/d/etc
|
|
|
|
%changelog
|