pkubat / rpms / plv8

Forked from rpms/plv8 5 years ago
Clone

Blame plv8.spec

fbb11f0
%global sname plv8
fbb11f0
481b1cb
%bcond_without check
481b1cb
73e417e
%{?!v8_arches:%global v8_arches %arm %ix86 x86_64}
fbb11f0
fbb11f0
Summary:	V8 Engine Javascript Procedural Language add-on for PostgreSQL
fbb11f0
Name:		%{sname}
73e417e
Version:	2.1.0
789282f
Release:	7%{?dist}
fbb11f0
License:	BSD
3929641
Source0:	https://github.com/%{sname}/%{sname}/archive/v%{version}/%{name}-%{version}.tar.gz
73e417e
9d681f8
# Please self-document the patches inside ('git am' format for backports)
9d681f8
# -----------------------------------------------------------------------
9d681f8
# Ensure build system respects Fedora's CXXFLAGS for hardening.
3929641
Patch0:		plv8-2.1.0-make-respects-CXXFLAGS.patch
9d681f8
# Support RPM_HACK_LDFLAGS to work-around rhzb#1517657 below.
3929641
Patch1:		plv8-2.1.0-make-bug-1517657.patch
9d681f8
# Support for 'make test' in %%check section.
3929641
Patch2:		plv8-2.1.0-make-test.patch
73e417e
fbb11f0
URL:		https://github.com/plv8/plv8
fbb11f0
73e417e
BuildRequires:	postgresql-devel
73e417e
BuildRequires:	v8-devel
73e417e
BuildRequires:	gcc-c++
73e417e
BuildRequires:	perl-interpreter
481b1cb
%if %{with check}
481b1cb
BuildRequires:	postgresql-server
481b1cb
%endif
73e417e
73e417e
Requires:	postgresql-server
b182aef
%{?postgresql_module_requires}
73e417e
Requires:	v8
73e417e
ExclusiveArch:	%v8_arches
73e417e
fbb11f0
fbb11f0
%description
fbb11f0
plv8 is a shared library that provides a PostgreSQL procedural language
fbb11f0
powered by V8 JavaScript Engine. With this program you can write in JavaScript
fbb11f0
your function that is callable from SQL.
fbb11f0
73e417e
fbb11f0
%prep
73e417e
%autosetup -p1
73e417e
fbb11f0
fbb11f0
%build
73e417e
# Setup CFLAGS, etc. by hacked %%configure
73e417e
%define _configure :
73e417e
%configure
73e417e
c9531fb
# rhbz#1517657
c9531fb
ln -s %{_libdir}/libv8_libplatform.so.? libv8_libplatform.so
c9531fb
export LDFLAGS="$LDFLAGS -L$PWD"
c9531fb
c9531fb
%make_build RPM_HACK_LDFLAGS="-L$PWD"
fbb11f0
73e417e
481b1cb
%if %{with check}
481b1cb
%check
481b1cb
make test || {
481b1cb
    find -name '*.diffs' -exec cat {} +
3929641
# Known to fail on armv7hl architecture, reported in pull request #247.
3929641
%ifnarch %arm
481b1cb
    false
3929641
%endif
481b1cb
}
481b1cb
%endif
481b1cb
481b1cb
fbb11f0
%install
8eb3fb2
%make_install
fbb11f0
fbb11f0
fbb11f0
%files
73e417e
%license COPYRIGHT
73e417e
%doc README.md Changes doc/%{sname}.md
73e417e
%{_libdir}/pgsql/%{sname}.so
73e417e
%dir %{_datadir}/pgsql/extension
73e417e
%{_datadir}/pgsql/extension/plcoffee--%{version}.sql
73e417e
%{_datadir}/pgsql/extension/plcoffee.control
73e417e
%{_datadir}/pgsql/extension/plls--%{version}.sql
73e417e
%{_datadir}/pgsql/extension/plls.control
73e417e
%{_datadir}/pgsql/extension/%{sname}--%{version}.sql
73e417e
%{_datadir}/pgsql/extension/%{sname}.control
73e417e
fbb11f0
fbb11f0
%changelog
789282f
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-7
789282f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
789282f
9b5ff9c
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-6
9b5ff9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9b5ff9c
9d681f8
* Tue Dec 19 2017 Pavel Raiskup <praiskup@redhat.com> - 2.1.0-5
9d681f8
- review requirement - in-spec docs for patches (rhbz#1036130)
9d681f8
3929641
* Tue Dec 19 2017 Pavel Raiskup <praiskup@redhat.com> - 2.1.0-4
3929641
- review fixes - per Robert-André Mauchin notes - better github source url,
3929641
  drop Group tag, better format of patches (rhbz#1036130)
3929641
- ignore test failure on %%arm (reported upstream in PR#247)
3929641
481b1cb
* Mon Dec 18 2017 Pavel Raiskup <praiskup@redhat.com> - 2.1.0-3
481b1cb
- enable testsuite
481b1cb
8eb3fb2
* Sat Dec 16 2017 Pavel Raiskup <praiskup@redhat.com> - 2.1.0-2
8eb3fb2
- fixes per pre-review by Robert-André Mauchin (rhbz#1036130)
b182aef
- require proper postgresql-server version
c9531fb
- hack for missing libv8_libplatform.so in v8-devel (rhbz#1517657)
8eb3fb2
73e417e
* Fri Dec 15 2017 Pavel Raiskup <praiskup@redhat.com> - 2.1.0-1
73e417e
- rebase to 2.1.0
73e417e
- cleanup spec, fix {cxx,ld}flags
73e417e
fbb11f0
* Tue Nov 10 2015 Pavel Kajaba <pkajaba@redhat.com> 1.4.4-1
fbb11f0
- Made changes to work under Fedora repos
fbb11f0
fbb11f0
* Wed Jul 9 2014 Devrim Gündüz <devrim@gunduz.org> 1.4.2-1
fbb11f0
- Update to 1.4.2
fbb11f0
fbb11f0
* Thu Dec 12 2013 Devrim Gündüz <devrim@gunduz.org> 1.4.1-1
fbb11f0
- Initial spec file, per RH #1036130, after doing modifications
fbb11f0
  to suit community RPM layout. Original work is by David
fbb11f0
  Wheeler and Mikko Tiihonen