Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
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) 2012 SUSE LINUX Products 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 sname plr # 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: postgresql-%{sname} Version: 8.3.0.13 Release: 1.0 Source0: %{sname}-%{version}.tar.gz Source1: readme.SUSE Patch0: patch-Makefile-ldflags.patch Url: http://www.joeconway.com/plr/ BuildRequires: R-base BuildRequires: R-base-devel BuildRequires: pkg-config BuildRequires: post-build-checks BuildRequires: postgresql-devel >= 8.3 Requires: R-base Requires: postgresql-server >= 8.3 BuildRoot: %{_tmppath}/%{name}-%{version}-build %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} %patch0 # Need to fix spurious rights in doc and root find ./ -type f -exec chmod 0644 {} \; %build # 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 %{__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 #%%{_sbindir}/ldconfig /sbin/ldconfig %postun #%%{_sbindir}/ldconfig /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