1 |
commit: d27c6cbeee1abb654b6304c8c4c5e253fd45166e |
2 |
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 14 19:28:52 2017 +0000 |
4 |
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 28 20:56:08 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d27c6cbe |
7 |
|
8 |
dev-db/plr: new package |
9 |
|
10 |
Finally decided to add this to the gentoo repo. PL/R is a |
11 |
postgresql server extension that allows R scripts (dev-lang/R) |
12 |
to be used directly in postgresql queries and functions. |
13 |
|
14 |
Bug: http://bugs.gentoo.org/272610 |
15 |
Package-Manager: Portage-2.3.13, Repoman-2.3.3 |
16 |
|
17 |
dev-db/plr/Manifest | 1 + |
18 |
dev-db/plr/metadata.xml | 24 +++++++++++++++ |
19 |
dev-db/plr/plr-8.3.0.17.ebuild | 69 ++++++++++++++++++++++++++++++++++++++++++ |
20 |
3 files changed, 94 insertions(+) |
21 |
|
22 |
diff --git a/dev-db/plr/Manifest b/dev-db/plr/Manifest |
23 |
new file mode 100644 |
24 |
index 00000000000..afd497d93f1 |
25 |
--- /dev/null |
26 |
+++ b/dev-db/plr/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST plr-8.3.0.17.tar.gz 74017 BLAKE2B 314b4cfa2c3ca8ed31e80a72233a6dc8cdb9f3811dad6e9f3eb5147c17cdf5a039436598b0fc2b30c6702b02dd3cb2da33543764aee3199c6864aae22be875ce SHA512 d7080c62349d1dcdd17008a7be3643b54678e0f66bf721068df73057394496d025c4fe01e52945c3acf9cc21eb90241512667772ef3fe519a3c9081efe92dd40 |
29 |
|
30 |
diff --git a/dev-db/plr/metadata.xml b/dev-db/plr/metadata.xml |
31 |
new file mode 100644 |
32 |
index 00000000000..7eb0ae4794b |
33 |
--- /dev/null |
34 |
+++ b/dev-db/plr/metadata.xml |
35 |
@@ -0,0 +1,24 @@ |
36 |
+<?xml version="1.0" encoding="UTF-8"?> |
37 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
38 |
+<!-- |
39 |
+This is the example metadata file. |
40 |
+The root element of this file is <pkgmetadata>. Within this element a |
41 |
+number of subelements are allowed, the most common being maintainer. |
42 |
+ |
43 |
+For a full description look at: |
44 |
+https://devmanual.gentoo.org/ebuild-writing/misc-files/metadata/ |
45 |
+ |
46 |
+Before committing, please remove the comments from this file. They are |
47 |
+not relevant for general metadata.xml files. |
48 |
+--> |
49 |
+<pkgmetadata> |
50 |
+<maintainer type="person"> |
51 |
+ <email>axs@g.o</email> |
52 |
+ <name>Ian Stakenvicius</name> |
53 |
+ <description>Primary maintainer</description> |
54 |
+</maintainer> |
55 |
+<longdescription> |
56 |
+An extension for postgresql databases to allow direct usage of <pkg>dev-lang/R</pkg> |
57 |
+in SQL queries and database functions |
58 |
+</longdescription> |
59 |
+</pkgmetadata> |
60 |
|
61 |
diff --git a/dev-db/plr/plr-8.3.0.17.ebuild b/dev-db/plr/plr-8.3.0.17.ebuild |
62 |
new file mode 100644 |
63 |
index 00000000000..53ecfa0ff06 |
64 |
--- /dev/null |
65 |
+++ b/dev-db/plr/plr-8.3.0.17.ebuild |
66 |
@@ -0,0 +1,69 @@ |
67 |
+# Copyright 1999-2017 Gentoo Foundation |
68 |
+# Distributed under the terms of the GNU General Public License v2 |
69 |
+ |
70 |
+EAPI=6 |
71 |
+ |
72 |
+POSTGRES_COMPAT=( 9.{1..6} 10 ) |
73 |
+POSTGRES_USEDEP="server" |
74 |
+ |
75 |
+inherit postgres-multi |
76 |
+ |
77 |
+DESCRIPTION="R language extension for postgresql database" |
78 |
+HOMEPAGE="http://www.joeconway.com/plr/" |
79 |
+SRC_URI="https://github.com/postgres-plr/plr/archive/REL${PV//./_}.tar.gz -> ${P}.tar.gz" |
80 |
+ |
81 |
+LICENSE="GPL-2" |
82 |
+SLOT="0" |
83 |
+KEYWORDS="~amd64" |
84 |
+ |
85 |
+RDEPEND="dev-lang/R |
86 |
+ ${POSTGRES_DEP}" |
87 |
+DEPEND="${RDEPEND} |
88 |
+ virtual/pkgconfig" |
89 |
+ |
90 |
+REQUIRED_USE="${POSTGRES_REQ_USE}" |
91 |
+ |
92 |
+S=${WORKDIR}/contrib/${PN} |
93 |
+ |
94 |
+src_unpack() { |
95 |
+ unpack ${A} |
96 |
+ # the build system wants 'contrib' to be part of the path |
97 |
+ mkdir -p "${WORKDIR}/contrib" |
98 |
+ mv "${WORKDIR}/${PN}-REL${PV//./_}" "${S}" |
99 |
+} |
100 |
+ |
101 |
+src_prepare() { |
102 |
+ local BUILD_DIR="${S}" |
103 |
+ postgres-multi_src_prepare |
104 |
+} |
105 |
+ |
106 |
+src_compile() { |
107 |
+ pg_src_compile() { |
108 |
+ cd "${BUILD_DIR}" |
109 |
+ PG_CONFIG="${SYSROOT}${EPREFIX}/usr/$(get_libdir)/postgresql-${MULTIBUILD_ID}/bin/pg_config" \ |
110 |
+ USE_PGXS=1 \ |
111 |
+ emake -j1 |
112 |
+ } |
113 |
+ postgres-multi_foreach pg_src_compile |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ pg_src_install() { |
118 |
+ cd "${BUILD_DIR}" |
119 |
+ PG_CONFIG="${SYSROOT}${EPREFIX}/usr/$(get_libdir)/postgresql-${MULTIBUILD_ID}/bin/pg_config" \ |
120 |
+ USE_PGXS=1 \ |
121 |
+ emake -j1 DESTDIR="${D}" install |
122 |
+ } |
123 |
+ postgres-multi_foreach pg_src_install |
124 |
+} |
125 |
+ |
126 |
+pkg_postinst() { |
127 |
+ elog "The plr extension needs to be explicitly added (or 'created') on each database" |
128 |
+ elog "you wish to use it with. As of postgresql-9.1 the easiest way to do this is" |
129 |
+ elog "with the proprietary SQL statement:" |
130 |
+ elog |
131 |
+ elog "\tCREATE EXTENSION plr;" |
132 |
+ elog |
133 |
+ elog "For more info on how to add PL/R to your postgresql database(s), please visit" |
134 |
+ elog "http://www.joeconway.com/doc/plr-install.html" |
135 |
+} |