summaryrefslogtreecommitdiff
path: root/databases/mysql-udf-sys
diff options
context:
space:
mode:
Diffstat (limited to 'databases/mysql-udf-sys')
-rw-r--r--databases/mysql-udf-sys/Makefile32
-rw-r--r--databases/mysql-udf-sys/distinfo2
-rw-r--r--databases/mysql-udf-sys/files/patch-Makefile22
-rw-r--r--databases/mysql-udf-sys/pkg-descr13
-rw-r--r--databases/mysql-udf-sys/pkg-message24
5 files changed, 93 insertions, 0 deletions
diff --git a/databases/mysql-udf-sys/Makefile b/databases/mysql-udf-sys/Makefile
new file mode 100644
index 000000000000..20a91cc6a703
--- /dev/null
+++ b/databases/mysql-udf-sys/Makefile
@@ -0,0 +1,32 @@
+# New ports collection makefile for: mysql-udf-sys
+# Date created: December 2011
+# Whom: David Cornejo <dave@dogwood.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= mysql-udf-sys
+PORTVERSION= 0.0.3
+CATEGORIES= databases
+MASTER_SITES= http://www.mysqludf.org/lib_mysqludf_sys/
+DISTNAME= lib_mysqludf_sys_${PORTVERSION}
+
+MAINTAINER= dave@dogwood.com
+COMMENT= System access UDFs
+
+USE_MYSQL= yes
+USE_LDCONFIG= yes
+
+WRKSRC= ${WRKDIR}
+
+PLIST_FILES= lib/mysql/plugin/lib_mysqludf_sys.so
+PLIST_DIRS= lib/mysql/plugin
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|; s|%%LOCALBASE%%|${LOCALBASE}|' \
+ ${WRKSRC}/Makefile
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/databases/mysql-udf-sys/distinfo b/databases/mysql-udf-sys/distinfo
new file mode 100644
index 000000000000..75fe3a6a00f0
--- /dev/null
+++ b/databases/mysql-udf-sys/distinfo
@@ -0,0 +1,2 @@
+SHA256 (lib_mysqludf_sys_0.0.3.tar.gz) = 174f43d1df5372c84d98981031f02a2b9e090954ac473f543bff79f9a87c2c4d
+SIZE (lib_mysqludf_sys_0.0.3.tar.gz) = 9136
diff --git a/databases/mysql-udf-sys/files/patch-Makefile b/databases/mysql-udf-sys/files/patch-Makefile
new file mode 100644
index 000000000000..07286a216082
--- /dev/null
+++ b/databases/mysql-udf-sys/files/patch-Makefile
@@ -0,0 +1,22 @@
+--- Makefile.orig 2009-01-18 23:11:00.000000000 -1000
++++ Makefile 2011-12-12 13:16:07.000000000 -1000
+@@ -1,4 +1,16 @@
+-LIBDIR=/usr/lib
++
++LIBDIR= %%PREFIX%%/lib/mysql/plugin
++INCDIR= %%LOCALBASE%%/include/mysql
++PROG= lib_mysqludf_sys.so
++
++all: lib_mysql_udf.so
++
++lib_mysql_udf.so:
++ $(CC) -fPIC -Wall -I$(INCDIR) -I. -shared lib_mysqludf_sys.c -o $(PROG)
+
+ install:
+- gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so
++ mkdir -p $(LIBDIR)
++ install -o root -g wheel -m 0755 $(PROG) $(LIBDIR)
++
++clean:
++ rm -f $(PROG)
++
diff --git a/databases/mysql-udf-sys/pkg-descr b/databases/mysql-udf-sys/pkg-descr
new file mode 100644
index 000000000000..609798869cc7
--- /dev/null
+++ b/databases/mysql-udf-sys/pkg-descr
@@ -0,0 +1,13 @@
+This package contains a number of functions that allows one to interact
+with the operating system from MySQL:
+
+ sys_eval - executes an arbitrary command, and returns it's output.
+ sys_exec - executes an arbitrary command, and returns it's exit code.
+ sys_get - gets the value of an environment variable.
+ sys_set - create an environment variable, or update the value of an
+ existing environment variable.
+
+Use lib_mysqludf_sys_info() to obtain information about the currently
+installed version of lib_mysqludf_sys.
+
+WWW: http://www.mysqludf.org/lib_mysqludf_sys
diff --git a/databases/mysql-udf-sys/pkg-message b/databases/mysql-udf-sys/pkg-message
new file mode 100644
index 000000000000..69644f9c73b0
--- /dev/null
+++ b/databases/mysql-udf-sys/pkg-message
@@ -0,0 +1,24 @@
+
+To add the custom functions to your MySQL server use the following SQL:
+(These function can be dangerous, you should install only the functions
+you need):
+
+USE mysql;
+
+CREATE FUNCTION
+ lib_mysqludf_sys_info RETURNS string SONAME 'lib_mysqludf_sys.so';
+CREATE FUNCTION sys_get RETURNS string SONAME 'lib_mysqludf_sys.so';
+CREATE FUNCTION sys_set RETURNS int SONAME 'lib_mysqludf_sys.so';
+CREATE FUNCTION sys_exec RETURNS int SONAME 'lib_mysqludf_sys.so';
+CREATE FUNCTION sys_eval RETURNS string SONAME 'lib_mysqludf_sys.so';
+
+To deinstall:
+
+DROP FUNCTION IF EXISTS lib_mysqludf_sys_info;
+DROP FUNCTION IF EXISTS sys_get;
+DROP FUNCTION IF EXISTS sys_set;
+DROP FUNCTION IF EXISTS sys_exec;
+DROP FUNCTION IF EXISTS sys_eval;
+
+For function descriptions, see the following webpage:
+http://www.mysqludf.org/lib_mysqludf_sys