Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768611
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/viperserv/init.sls b/roles/viperserv/init.sls
index 934686e..767de52 100644
--- a/roles/viperserv/init.sls
+++ b/roles/viperserv/init.sls
@@ -1,23 +1,24 @@
# -------------------------------------------------------------
# Salt — Deploy eggdrop park
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-11-05
# License: Trivial work, not eligible to copyright
# _ ___ _____
# | | / (_)___ ___ _____/ ___/___ ______ __
# | | / / / __ \/ _ \/ ___/\__ \/ _ \/ ___/ | / /
# | |/ / / /_/ / __/ / ___/ / __/ / | |/ /
# |___/_/ .___/\___/_/ /____/\___/_/ |___/
# /_/
#
# [ 1993 technology for 2017 hackers ]
#
# -------------------------------------------------------------
include:
- .account
- .eggdrop
- .fbsql
- .fantoir
+ - .rabbitmq-tcl
- .wikidata-access-layer
diff --git a/roles/viperserv/rabbitmq-tcl/files/Makefile-FreeBSD.patch b/roles/viperserv/rabbitmq-tcl/files/Makefile-FreeBSD.patch
new file mode 100644
index 0000000..1c8298c
--- /dev/null
+++ b/roles/viperserv/rabbitmq-tcl/files/Makefile-FreeBSD.patch
@@ -0,0 +1,40 @@
+diff --git a/src/Makefile b/src/Makefile
+index f0f0a0b..932876b 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -37,13 +37,13 @@ TCLVERSION=8.6
+
+ # Headers to include
+
+-TCL_INCLUDE=/usr/include/tcl${TCLVERSION}
+-RABBITMQ_INCLUDE=/usr/include
++TCL_INCLUDE=/usr/local/include/tcl$(TCLVERSION)
++RABBITMQ_INCLUDE=/usr/local/include
+ INCLUDES=-I$(TCL_INCLUDE) -I$(RABBITMQ_INCLUDE)
+
+ # Libraries to use
+
+-LIBS=-ltcl${TCLVERSION} -lrabbitmq
++LIBS=-L/usr/local/lib -ltcl$(subst .,,${TCLVERSION}) -lrabbitmq
+
+ # Features
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 758220d..9df280a 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -30,12 +30,11 @@ TCLVERSION=8.6
+
+ # Headers to include
+
+-TCL_INCLUDE=/usr/include/tcl${TCLVERSION}
+-INCLUDES=-I$(TCL_INCLUDE)
++TCL_INCLUDE=/usr/local/include/tcl$(TCLVERSION)
++INCLUDES=-I/usr/local/include -I$(TCL_INCLUDE)
+
+ # Libraries to use
+-
+-LIBS=-lcmocka -ltcl -lrabbitmq
++LIBS=-L/usr/local/lib -lcmocka -ltcl${TCLVERSION:S/.//} -lrabbitmq
+
+ # Commands to use
diff --git a/roles/viperserv/rabbitmq-tcl/init.sls b/roles/viperserv/rabbitmq-tcl/init.sls
new file mode 100644
index 0000000..9db3e18
--- /dev/null
+++ b/roles/viperserv/rabbitmq-tcl/init.sls
@@ -0,0 +1,59 @@
+# -------------------------------------------------------------
+# Salt — Deploy eggdrop park
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-11-17
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import packages with context %}
+
+# -------------------------------------------------------------
+# Build rabbitmq-tcl
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+rabbitmq-tcl_dependencies:
+ pkg.installed:
+ - pkgs:
+ - {{ packages.librabbitmq }}
+
+rabbitmq-tcl_repo:
+ file.directory:
+ - name: /opt/rabbitmq-tcl
+ - user: builder
+ - group: deployment
+ - dir_mode: 755
+ git.latest:
+ - name: https://devcentral.nasqueron.org/source/rabbitmq-tcl.git
+ - target: /opt/rabbitmq-tcl
+ - user: builder
+
+rabbitmq-tcl_build:
+ {% if grains['os'] == 'FreeBSD' %}
+ file.managed:
+ - name: /opt/rabbitmq-tcl/Makefile-FreeBSD.patch
+ - source: salt://roles/viperserv/rabbitmq-tcl/files/Makefile-FreeBSD.patch
+ - user: builder
+ - group: deployment
+ cmd.run:
+ - name: |
+ patch -p1 < Makefile-FreeBSD.patch
+ cd src/
+ gmake
+ {% else %}
+ cmd.run:
+ - name: cd src && make
+ {% endif %}
+ - runas: builder
+ - cwd: /opt/rabbitmq-tcl
+ - creates: /opt/rabbitmq-tcl/build/rabbitmq.so
+
+# -------------------------------------------------------------
+# Install rabbitmq-tcl
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/viperserv/lib/rabbitmq.so:
+ file.symlink:
+ - target: /opt/rabbitmq-tcl/build/rabbitmq.so
+ - user: viperserv
+ - group: nasqueron-irc
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Nov 25, 09:08 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259430
Default Alt Text
(4 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment