File pointcloud.spec of Package pointcloud

# spec file for package pointcloud
# Copyright (c) 2021 SUSE LLC
# 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

%define         pgname @BUILD_FLAVOR@
%define         sname pointcloud
%define         pg_bindir %(pg_config --bindir)
%define         pg_libdir %(pg_config --pkglibdir)
%define         pg_share %(pg_config --sharedir)
%if 0%{?is_opensuse} && 0%{?suse_version} >= 1500 && ("%{pgname}" == "postgresql11" || "%{pgname}" == "postgresql12" || "%{pgname}" == "postgresql13")
%bcond_without  llvm
%bcond_with     llvm
# double \ as they are escaped in %%() call
%define pg_version %(pg_config --version | sed -e 's/.*[[:space:]]//' -e 's/\\.[0-9]*$//' -e 's/\\.//')
%if "%{pgname}" == "" || "%{pgname}" == "postgresql"
Name:           %{sname}
ExclusiveArch:  do_not_build
Name:           %{pgname}-%{sname}
# Build for Leap 15.2 but not for postgresql13
%if (0%{?is_opensuse} && 0%{?sle_version} == 150200) && ("%{pgname}" == "postgresql13")
ExclusiveArch:  do_not_build
# Build for Leap 15.2 but not for 15.1
%if (0%{?is_opensuse} && 0%{?sle_version} == 150100) && ("%{pgname}" == "postgresql11" || "%{pgname}" == "postgresql12" || "%{pgname}" == "postgresql13")
ExclusiveArch:  do_not_build
%if 0%{?suse_version} < 1315
ExclusiveArch:  do_not_build
Version:        1.2.1
Release:        0
Summary:        A PostgreSQL extension for storing point cloud (LIDAR) data
License:        BSD-2-Clause
Group:          Productivity/Databases/Servers
# UPSTREAM Patches
# PG ignore minor on pg>=10
# GCC 10.1
BuildRequires:  %{pgname}-devel
%if "%{pgname}" == "postgresql11" || "%{pgname}" == "postgresql12" || "%{pgname}" == "postgresql13"
BuildRequires:  %{pgname}-server-devel
%if %{with llvm}
BuildRequires:  clang-devel
BuildRequires:  llvm-devel
BuildRequires:  %{pgname}-llvmjit
BuildRequires:  %{pgname}-server
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  cunit-devel
BuildRequires:  fdupes
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  laszip-devel
BuildRequires:  libght-devel
BuildRequires:  libxml2-devel
BuildRequires:  pkgconfig
%requires_eq    %{pgname}-server
Provides:       %{sname}

pointcloud is an extension for storing point cloud data (LIDAR) into postgresql
Activate the pointcloud extension: CREATE EXTENSION pointcloud

The pointcloud_postgis extension adds functions that allow you to use PostgreSQL
Pointcloud with PostGIS, converting PcPoint and PcPatch to Geometry and doing
spatial filtering on point cloud data. The pointcloud_postgis extension depends
on both the postgis and pointcloud extensions, so they must be installed first:

  CREATE EXTENSION pointcloud;
  CREATE EXTENSION pointcloud_postgis;

See for example and howtos.

%if %{with llvm}
%package llvmjit
Summary:        Just-in-time compilation support for PostgreSQL %{sname} extension
Group:          Productivity/Databases/Servers
Requires:       %{pgname}-%{sname} = %{version}-%{release}
Requires:       %{pgname}-llvmjit
Requires:       %{pgname}-server
Supplements:    packageand(%{pgname}-llvmjit:%{name})

%description llvmjit
This package contains support for just-in-time compiling parts of
PostgreSQL queries. Using LLVM it compiles e.g. expressions and tuple
deforming into native code, with the goal of accelerating analytics

%setup -q -n %{sname}-%{version}
%autopatch -p1

autoreconf -fiv
%configure --without-lazperf
echo "Configure done ... building"
make VERBOSE=1 %{?_smp_mflags}


%fdupes -s %{pg_share}/extension
%fdupes -s %{pg_share}/contrib

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%license COPYRIGHT
%doc NEWS
%exclude %{pg_libdir}/bitcode/*

%if %{with llvm}
%files llvmjit

openSUSE Build Service is sponsored by