Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP1:Update
postgresql-plr
postgresql-plr.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File postgresql-plr.spec of Package postgresql-plr
# # spec file for package postgresql-plr # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %define pgname @BUILD_FLAVOR@ %if "%{pgname}" == "" %define pgname postgresql %endif # Thanks upstream :-) %define sname plr %define sversion REL8_3_0_17 # Make our path like what postgresql packager decide %if 0%{?sles_version} == 11 %define extension shlib=plr.so soname=plr.so %endif %define pgshare %(pg_config --sharedir) %define pkglibs %(pg_config --pkglibdir) %define extensiondir %{pgshare}/extension Summary: PL/R - R Procedural Language for PostgreSQL License: GPL-2.0+ Group: Productivity/Databases/Servers Name: %{pgname}-%{sname} Version: 8.3.0.17 Release: 1.0 Source: https://github.com/postgres-plr/plr/archive/%{sversion}.tar.gz Source1: readme.SUSE Source2: plr-US.pdf Patch0: patch-Makefile-ldflags.patch Url: http://www.joeconway.com/plr/ BuildRequires: %{pgname}-devel BuildRequires: %{pgname}-server BuildRequires: R-base BuildRequires: R-base-devel BuildRequires: pkg-config BuildRequires: post-build-checks Requires: %{pgname}-server Requires: R-base BuildRoot: %{_tmppath}/%{name}-%{version}-build %if "%{pgname}" == "postgresql" ExclusiveArch: do_not_build %endif %description PL/R is a loadable procedural language that enables you to write PostgreSQL functions and triggers in the R programming language. PL/R offers most (if not all) of the capabilities a function writer has in the R language. Commands are available to access the database via the PostgreSQL Server Programming Interface (SPI) and to raise messages via elog() . There is no way to access internals of the database backend. However the user is able to gain OS-level access under the permissions of the PostgreSQL user ID, as with a C function. Thus, any unprivileged database user should not be permitted to use this language. It must be installed as an untrusted procedural language so that only database superusers can create functions in it. The writer of a PL/R function must take care that the function cannot be used to do anything unwanted, since it will be able to do anything that could be done by a user logged in as the database administrator. An implementation restriction is that PL/R procedures cannot be used to create input/output functions for new data types. %package doc Summary: Documentation for PL/R - R Procedural Language for PostgreSQL Group: Productivity/Databases/Servers %description doc PL/R is a loadable procedural language that enables you to write PostgreSQL functions and triggers in the R programming language. PL/R offers most (if not all) of the capabilities a function writer has in the R language. This package contain the associated documentation %prep # plr.so know where R is located %setup -q -n %{sname}-%{sversion} %patch0 -p1 # Need to fix spurious rights in doc and root find ./ -type f -exec chmod 0644 {} \; cp -v %{S:2} doc/ %build export PATH="$PATH:/usr/lib/%{pgname}/bin" # Picked from main obs postgresql export CFLAGS="%optflags $SP" # uncomment the following line to enable the stack protector CFLAGS="$CFLAGS -fstack-protector" #Rpath? LDFLAGS="$LDFLAGS -Wl,-rpath,%_libdir/R/lib" USE_PGXS=1 %__make %{?extension} %{?_smp_mflags}; %install export PATH="$PATH:/usr/lib/%{pgname}/bin" mkdir -p %{buildroot}/etc/ld.so.conf.d/ # okay keep this method until using rpath is completed cat > %{buildroot}/etc/ld.so.conf.d/%{name}.conf <<EOF # postgresql-plr need to find where R is installed %{_libdir}/R %{_libdir}/R/lib EOF # All the right location could be found with pg_config # USE_PGXS=1 make install install -d -m 0755 %{buildroot}/%{pkglibs} install -m 755 %{sname}.so %{buildroot}/%{pkglibs}/%{sname}.so install -d -m 0755 %{buildroot}/%{extensiondir} install -p -m 644 %{sname}*.sql %{buildroot}%{extensiondir}/ install -p -m 644 %{sname}.control %{buildroot}%{extensiondir}/%{sname}.control cp -a %{S:1} . %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(644, root, root, 0755) %doc README.plr %doc readme.SUSE %dir %{extensiondir}/ %{extensiondir}/%{sname}.control %{extensiondir}/%{sname}*.sql %config /etc/ld.so.conf.d/%{name}.conf %defattr(755, root, root, 0755) %dir %{pkglibs} %{pkglibs}/%{sname}.so %files doc %defattr(644, root, root, 0755) %doc doc/* %doc expected/plr.out %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor