Browse Source

new package

master
parent
commit
5e8e37b13a
  1. 54
      postgresql-amqp/postgresql-amqp.patch
  2. 80
      postgresql-amqp/postgresql-amqp.spec

54
postgresql-amqp/postgresql-amqp.patch

@ -0,0 +1,54 @@
Index: src/librabbitmq/amqp.h
--- src/librabbitmq/amqp.h.orig 2016-03-15 21:19:54.000000000 +0100
+++ src/librabbitmq/amqp.h 2018-01-26 10:43:46.667270000 +0100
@@ -5,6 +5,9 @@
extern "C" {
#endif
+#include <sys/types.h>
+#include <sys/time.h>
+
typedef int amqp_boolean_t;
typedef uint32_t amqp_method_number_t;
typedef uint32_t amqp_flags_t;
Index: src/pg_amqp.c
--- src/pg_amqp.c.orig 2016-03-15 21:19:54.000000000 +0100
+++ src/pg_amqp.c 2018-01-26 10:42:41.149323000 +0100
@@ -129,6 +129,10 @@
/* nothin' */
return;
break;
+ default:
+ /* nothin' */
+ return;
+ break;
}
}
@@ -137,7 +141,7 @@
}
static struct brokerstate *
-local_amqp_get_a_bs(broker_id) {
+local_amqp_get_a_bs(int broker_id) {
struct brokerstate *bs;
for(bs = HEAD_BS; bs; bs = bs->next) {
if(bs->broker_id == broker_id) return bs;
@@ -149,7 +153,7 @@
return bs;
}
static struct brokerstate *
-local_amqp_get_bs(broker_id) {
+local_amqp_get_bs(int broker_id) {
char sql[1024];
char host_copy[300] = "";
int tries = 0;
@@ -236,7 +240,7 @@
return bs;
}
static void
-local_amqp_disconnect(broker_id) {
+local_amqp_disconnect(int broker_id) {
struct brokerstate *bs = local_amqp_get_a_bs(broker_id);
local_amqp_disconnect_bs(bs);
}

80
postgresql-amqp/postgresql-amqp.spec

@ -0,0 +1,80 @@
##
## postgresql-amqp.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2018 OpenPKG Project <http://openpkg.org/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package information
Name: postgresql-amqp
Summary: PostgreSQL Extension: AMQP Message Publishing
URL: https://github.com/omniti-labs/pg_amqp
Vendor: OmniTI
Packager: OpenPKG Project
Distribution: OpenPKG Community
Class: EVAL
Group: Database
License: BSD
Version: 0.4.1
Release: 20180126
# list of sources
Source0: https://github.com/omniti-labs/pg_amqp/archive/v%{version}.tar.gz
Patch0: postgresql-amqp.patch
# build information
BuildPreReq: OpenPKG, openpkg >= 20160101
PreReq: OpenPKG, openpkg >= 20160101
BuildPreReq: postgresql
PreReq: postgresql
%description
This is a PostgreSQL extension which provides the ability for
PostgreSQL statements to directly publish messages to an AMQP
broker.
%track
prog postgresql-amqp = {
version = %{version}
url = https://github.com/omniti-labs/pg_amqp/releases
regex = v(__VER__)\.tar\.gz
}
%prep
%setup -q -n pg_amqp-%{version}
%patch -p0
%build
%{l_make} %{l_mflags} \
USE_PGXS=1 \
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags}" \
LDFLAGS="%{l_ldflags}" \
pg_amqp.so
%install
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
%files -f files
%clean
Loading…
Cancel
Save