-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
%global pname md5hash | ||
%global sname md5hash | ||
%global pginstdir /usr/pgsql-%{pgmajorversion} | ||
|
||
%ifarch ppc64 ppc64le s390 s390x armv7hl | ||
%if 0%{?rhel} && 0%{?rhel} == 7 | ||
%{!?llvm:%global llvm 0} | ||
%else | ||
%{!?llvm:%global llvm 1} | ||
%endif | ||
%else | ||
%{!?llvm:%global llvm 1} | ||
%endif | ||
|
||
Name: %{sname}_%{pgmajorversion} | ||
Version: 1.0.1 | ||
Release: 1PIGSTY%{?dist} | ||
Summary: A custom data type for storing MD5 hashes (instead of the native TEXT varlena type). | ||
License: BSD 2-Claus | ||
URL: https://github.com/tvondra/%{sname} | ||
Source0: https://github.com/dftvondra/%{sname}/nosuchdownload/md5hash-1.0.1.tar.gz | ||
|
||
BuildRequires: postgresql%{pgmajorversion}-devel pgdg-srpm-macros >= 1.0.27 | ||
Requires: postgresql%{pgmajorversion}-server | ||
|
||
%description | ||
This extension provides a simple data type storing 128-bit values (e.g. MD5 hashes) in a bit more efficient way - in a fixed-length columns and inline. | ||
|
||
The extension defines the 'md5hash' type itself, casts, operators and an operator class for btree indexes. It's fairly straightforward and simple to add more operators or classes. | ||
|
||
%if %llvm | ||
%package llvmjit | ||
Summary: Just-in-time compilation support for %{sname} | ||
Requires: %{name}%{?_isa} = %{version}-%{release} | ||
%if 0%{?rhel} && 0%{?rhel} == 7 | ||
%ifarch aarch64 | ||
Requires: llvm-toolset-7.0-llvm >= 7.0.1 | ||
%else | ||
Requires: llvm5.0 >= 5.0 | ||
%endif | ||
%endif | ||
%if 0%{?suse_version} >= 1315 && 0%{?suse_version} <= 1499 | ||
BuildRequires: llvm6-devel clang6-devel | ||
Requires: llvm6 | ||
%endif | ||
%if 0%{?suse_version} >= 1500 | ||
BuildRequires: llvm15-devel clang15-devel | ||
Requires: llvm15 | ||
%endif | ||
%if 0%{?fedora} || 0%{?rhel} >= 8 | ||
Requires: llvm => 13.0 | ||
%endif | ||
|
||
%description llvmjit | ||
This packages provides JIT support for %{sname} | ||
%endif | ||
|
||
|
||
%prep | ||
%setup -q -n %{sname}-%{version} | ||
|
||
%build | ||
PATH=%{pginstdir}/bin:$PATH %{__make} %{?_smp_mflags} | ||
|
||
%install | ||
%{__rm} -rf %{buildroot} | ||
PATH=%{pginstdir}/bin:$PATH %{__make} %{?_smp_mflags} install DESTDIR=%{buildroot} | ||
|
||
%files | ||
%doc README.md | ||
%{pginstdir}/lib/%{pname}.so | ||
%{pginstdir}/share/extension/%{pname}.control | ||
%{pginstdir}/share/extension/%{pname}*sql | ||
%if %llvm | ||
%files llvmjit | ||
%{pginstdir}/lib/bitcode/* | ||
%endif | ||
%exclude /usr/lib/.build-id/* | ||
|
||
%changelog | ||
* Sun May 5 2024 Vonng <rh@vonng.com> - 1.0.1 | ||
- Initial RPM release, used by Pigsty <https://pigsty.io> |