File postgresql-ip4r.spec of Package postgresql-ip4r
#
# 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 https://bugs.opensuse.org/
#
%define pg_name @BUILD_FLAVOR@
%define ext_name ip4r
%{pg_version_from_name}
Name: %{pg_name}-%{ext_name}
Version: 2.4.2+git4.941f6b8
Release: 0
Summary: IPv4 and IPv4 range index types for PostgreSQL
License: BSD-3-Clause
Group: Productivity/Databases/Servers
Url: http://pgfoundry.org/projects/ip4r
Source0: %{ext_name}-%{version}.tar.xz
BuildRequires: %{pg_name}-llvmjit-devel
%pg_server_requires
%if "%{pg_name}" == ""
ExclusiveArch: do_not_build
%endif
%description
ip4 and ip4r are types that contain a single IPv4 address and a range of
IPv4 addresses respectively. They can be used as a more flexible,
indexable version of the cidr type.
%prep
%autosetup -p1 -n %{ext_name}-%{version}
%build
%make_pgxs
%install
%make_install
if [ -e %{buildroot}%{_includedir}/pgsql/server/extension/ip4r/ ] ; then
rm -rf %{buildroot}%{_includedir}/pgsql/server/extension/ip4r/
fi
rm %{buildroot}%{_datadir}/doc/packages/%{pg_name}/extension/README.ip4r
%files
%doc README.ip4r
%{pg_config_sharedir}/extension/%{ext_name}*
%{pg_config_pkglibdir}/%{ext_name}.so
%if %{postgresql_has_llvm}
%{pg_config_pkglibdir}/bitcode/*
%endif
%changelog