diff --git a/llvm16.spec b/llvm16.spec index a82e12f..203462d 100644 --- a/llvm16.spec +++ b/llvm16.spec @@ -2,7 +2,7 @@ %define majver %(echo %version | cut -d. -f1-2) Name: llvm16 Version: 16.0.6 -Release: 3mamba +Release: 4mamba Summary: The Low Level Virtual Machine Group: Development/Languages Vendor: openmamba @@ -26,10 +26,6 @@ BuildRequires: libstdc++6-devel BuildRequires: libxml2-devel BuildRequires: libz-devel BuildRequires: libzstd-devel -BuildRequires: ocaml-bigarray-compat-devel -BuildRequires: ocaml-ctypes-devel -BuildRequires: ocaml-integers -BuildRequires: ocaml-runtime ## AUTOBUILDREQ-END BuildRequires: glibc-devel BuildRequires: ocaml >= 4.14.1 @@ -102,10 +98,14 @@ This package includes the LLVM ocaml API documentation. %debug_package +# Don't clean build at the end +%global __spec_rmbuild_cmd /bin/true + +%define _prefix /usr/%{_lib}/llvm16 + %prep %setup -q -c -a0 -a1 -a2 -#% setup -q -#-D -T +#% setup -q -D -T #:<< _EOF mv cmake-%{version}.src cmake mv third-party-%{version}.src third-party @@ -186,12 +186,21 @@ cp %{SOURCE6} %{buildroot}%{_includedir}/llvm/Config/llvm-config.h rm -f %{buildroot}%{_datadir}/doc/clang/html/.buildinfo rm -f %{buildroot}%{_datadir}/doc/llvm/html/.buildinfo +# Legacy package, remove ocaml +rm -rf %{buildroot}/usr/%{_lib}/ocaml +rm -rf %{buildroot}/usr/%{_lib}/%{name}/share/doc/LLVM/llvm/ocaml-html + +# Create ld.so.conf.d entry +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d +cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF +/usr/%{_lib}/%{name}/%{_lib} +EOF + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%post -n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig %files %defattr(-,root,root) @@ -229,6 +238,7 @@ rm -f %{buildroot}%{_datadir}/doc/llvm/html/.buildinfo %files -n lib%{name} %defattr(-,root,root) +%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/libLLVM-*.so %{_libdir}/libLTO.so.* %{_libdir}/libRemarks.so.* @@ -252,27 +262,30 @@ rm -f %{buildroot}%{_datadir}/doc/llvm/html/.buildinfo #%dir %{_datadir}/doc/llvm/html/ #%{_datadir}/doc/llvm/html/* -%files ocaml -%defattr(-,root,root) -%{_libdir}/ocaml/llvm/*.cma -%{_libdir}/ocaml/llvm/*.cmi -%{_libdir}/ocaml/llvm/*.cmt -%{_libdir}/ocaml/llvm/*.cmti -%{_libdir}/ocaml/llvm/*.mli -%{_libdir}/ocaml/META.llvm* +#%files ocaml +#%defattr(-,root,root) +#%{_libdir}/ocaml/llvm/*.cma +#%{_libdir}/ocaml/llvm/*.cmi +#%{_libdir}/ocaml/llvm/*.cmt +#%{_libdir}/ocaml/llvm/*.cmti +#%{_libdir}/ocaml/llvm/*.mli +#%{_libdir}/ocaml/META.llvm* -%files ocaml-devel -%defattr(-,root,root) -%{_libdir}/ocaml/llvm/*.a -%{_libdir}/ocaml/llvm/*.cmx* +#%files ocaml-devel +#%defattr(-,root,root) +#%{_libdir}/ocaml/llvm/*.a +#%{_libdir}/ocaml/llvm/*.cmx* -%files ocaml-apidocs -%defattr(-,root,root) -%dir %{_datadir}/doc/LLVM/llvm/ocaml-html -%{_datadir}/doc/LLVM/llvm/ocaml-html/* +#%files ocaml-apidocs +#%defattr(-,root,root) +#%dir %{_datadir}/doc/LLVM/llvm/ocaml-html +#%{_datadir}/doc/LLVM/llvm/ocaml-html/* %changelog +* Sat Nov 04 2023 Silvan Calarco 16.0.6-4mamba +- rebuilt with prefix %{_libdir}/llvm16 + * Sat Oct 21 2023 Silvan Calarco 16.0.6-3mamba - legacy package