%bcond_without debug %bcond_without check %{!?crystal_arches: %global crystal_arches x86_64 aarch64} %global shard_name pg Name: crystal-pg Version: 0.30.0 Release: 1%{?dist} Summary: A native, non-blocking Postgres driver for Crystal License: BSD-3-Clause URL: https://github.com/will/crystal-pg Source0: https://github.com/will/crystal-pg/archive/v0.30.0/crystal-pg-0.30.0.tar.gz ExclusiveArch: %{crystal_arches} noarch BuildArch: noarch BuildRequires: crystal-rpm-macros BuildRequires: crystal >= 1.0.0 BuildRequires: crystal < 2.0.0 BuildRequires: shards BuildRequires: crystal-shard(db) BuildRequires: gmp-devel BuildRequires: openssl-devel BuildRequires: zlib-devel %if %{with check} BuildRequires: postgresql-server BuildRequires: postgresql-contrib %endif Provides: crystal-shard(%{shard_name}) = %{version} %description A native, non-blocking Postgres driver for Crystal. This package provides the %{shard_name} library for Crystal. %prep %crystal_setup -n %{name}-%{version} %build # Library package; sources are installed for dependent shards and applications %install %crystal_install_lib %check %if %{with check} PGDATA=$(mktemp -d /tmp/pgdata.XXXXXX) initdb -D "$PGDATA" --no-sync -U postgres > /dev/null pg_ctl -D "$PGDATA" -l "$PGDATA/pg.log" -o "-k /tmp -h ''" start > /dev/null export DATABASE_URL="postgres://postgres@/postgres" %crystal_check pg_ctl -D "$PGDATA" -m immediate stop > /dev/null 2>&1 || : rm -rf "$PGDATA" /tmp/.s.PGSQL.* %endif %files %license LICENSE %doc CHANGELOG README.md %crystal_files %changelog * Sat Sep 05 2026 Rénich Bon Ćirić - 0.30.0-1 - Initial package generated by cr2rpm