diff --git a/perl-pgsql_perl5.spec b/perl-pgsql_perl5.spec new file mode 100644 index 0000000000000000000000000000000000000000..a39c27d4ec320272fbeb8a873fc6753cc86061c1 --- /dev/null +++ b/perl-pgsql_perl5.spec @@ -0,0 +1,61 @@ +%define anolis_release 1 + +Name: perl-pgsql_perl5 +Version: 1.9.0 +Release: %{anolis_release}%{?dist} +Summary: Pg – Perl5 extension for PostgreSQL + +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/release/pgsql_perl5 +Source0: https://cpan.metacpan.org/modules/by-module/Pg/pgsql_perl5-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: libpq-devel + + +%description +The Pg module permits you to access all functions of the Libpq interface of +PostgreSQL. Libpq is the programmer’s interface to PostgreSQL. For examples of +how to use this module, look at the file test.pl. + + +%prep +%autosetup -n pgsql_perl5-%{version} + +# Fix shebangs and permissions on examples and tests +sed -r -i 's|^#!/usr/local/bin/perl\b|#!%{_bindir}/perl|' eg/*.pl test.pl +chmod -v a+x eg/*.pl test.pl + + +%build +export POSTGRES_INCLUDE='%{_includedir}' +export POSTGRES_LIB='%{_libdir}' +perl Makefile.PL \ + INSTALLDIRS=vendor \ + NO_PACKLIST=1 \ + NO_PERLLOCAL=1 \ + OPTIMIZE="${RPM_OPT_FLAGS}" +%make_build + + +%install +# Based on %%make_install, but with pure_install as the target +make pure_install DESTDIR='%{buildroot}' INSTALL='install -p' + +find %{buildroot} -type f -name '*.bs' -size 0 -delete +%{_fixperms} %{buildroot}/* + + +%files +%{perl_vendorarch}/auto/Pg/ +%{perl_vendorarch}/Pg.pm +%{_mandir}/man3/Pg.3pm* + +%changelog +* Mon Sep 18 2023 Funda Wang - 1.9.0-1 +- Import package diff --git a/pgsql_perl5-1.9.0.tar.gz b/pgsql_perl5-1.9.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d964dce6473b72a545df142d732792583c1053c6 Binary files /dev/null and b/pgsql_perl5-1.9.0.tar.gz differ