summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extra/acf-mdadm/APKBUILD22
-rw-r--r--extra/acf-postgresql/APKBUILD22
-rw-r--r--extra/pgcluster/APKBUILD50
-rw-r--r--extra/pgcluster/pgcluster.confd57
-rw-r--r--extra/pgcluster/pgcluster.initd172
-rw-r--r--testing/luasql-postgres/APKBUILD31
-rw-r--r--testing/luasql-postgres/config.new59
-rw-r--r--unstable/prosody/APKBUILD42
8 files changed, 443 insertions, 12 deletions
diff --git a/extra/acf-mdadm/APKBUILD b/extra/acf-mdadm/APKBUILD
new file mode 100644
index 00000000..5069fa0c
--- /dev/null
+++ b/extra/acf-mdadm/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=acf-mdadm
+pkgver=0.2.0
+pkgrel=0
+pkgdesc="ACF module for mdadm"
+url="http://git.alpinelinux.org/cgit/$pkgname"
+license="GPL-2"
+depends="acf-core lua mdadm"
+makedepends=""
+install=
+subpackages=""
+source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+}
+
+md5sums="3a94b48e2f678bef0dc5aad6ef699ee2 acf-mdadm-0.2.0.tar.bz2"
diff --git a/extra/acf-postgresql/APKBUILD b/extra/acf-postgresql/APKBUILD
new file mode 100644
index 00000000..a86446ca
--- /dev/null
+++ b/extra/acf-postgresql/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=acf-postgresql
+pkgver=0.2.0
+pkgrel=0
+pkgdesc="ACF module for postgresql"
+url="http://git.alpinelinux.org/cgit/$pkgname"
+license="GPL-2"
+depends="acf-core lua postgresql"
+makedepends=""
+install=
+subpackages=""
+source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+}
+
+md5sums="9cef31e42ee80fbf5487835c52cf44b9 acf-postgresql-0.2.0.tar.bz2"
diff --git a/extra/pgcluster/APKBUILD b/extra/pgcluster/APKBUILD
new file mode 100644
index 00000000..02e80c09
--- /dev/null
+++ b/extra/pgcluster/APKBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Cameron Banta <cbanta@gmail.com>
+pkgname=pgcluster
+pkgver=1.9.0rc5
+pkgrel=0
+pkgdesc="PostgreSQL with multi-master cluster/replication patch"
+url="http://pgfoundry.org/projects/pgcluster/"
+license="BSD"
+depends="$pkgname-libpq"
+makedepends="readline-dev openssl-dev zlib-dev"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libpq $pkgname-client"
+source="http://pgfoundry.org/frs/download.php/1705/$pkgname-$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd
+ "
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver || return 1
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-docdir=/usr/share/doc \
+ --with-openssl \
+ || return 1
+
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -D -m755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+ install -D -m644 "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+
+libpq() {
+ depends="uclibc openssl"
+ pkgdesc="PGCluster libraries"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libpq.so* "$subpkgdir"/usr/lib/
+}
+
+client() {
+ depends="uclibc openssl $pkgname-libpq readline"
+ pkgdesc="PGCluster client"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/psql "$subpkgdir"/usr/bin/
+}
+
+
+md5sums="d2fe705e25a01c19c8f8daa1fbcc55d1 pgcluster-1.9.0rc5.tar.gz
+ad21a30c7fd5ce9de1290c317492a0e5 pgcluster.initd
+503f94824fc7a385a831d7e55b74f9a0 pgcluster.confd"
diff --git a/extra/pgcluster/pgcluster.confd b/extra/pgcluster/pgcluster.confd
new file mode 100644
index 00000000..9e1376ee
--- /dev/null
+++ b/extra/pgcluster/pgcluster.confd
@@ -0,0 +1,57 @@
+# PostgreSQL's Database Directory
+PGDATA="/var/lib/postgresql/pgcluster"
+
+# PostgreSQL User
+PGUSER="postgres"
+
+# PostgreSQL Group
+PGGROUP="postgres"
+
+# control what gets started by init script
+PG_START_DB="yes"
+PG_START_REPLICATE="yes"
+PG_START_LB="no"
+
+# Extra options to run postmaster with, e.g.:
+# -N is the maximal number of client connections
+# -B is the number of shared buffers and has to be at least 2x the value for -N
+# Please read the man-page to postmaster for more options. Many of these options
+# can be set directly in the configuration-file.
+#PGOPTS="-N 512 -B 1024"
+
+
+# SERVER SHUTDOWN:
+# The server will receive 3 signals in the worst case:
+# 1. SIGTERM
+# This signals the server to ignore new connections and to
+# wait for all clients to end their transactions before shutting down.
+# Use WAIT_FOR_DISCONNECT to control how much time the clients
+# should have until the next signal is being sent.
+# 2. SIGINT
+# Tell the server to forcefully disconnect all clients.
+# Terminating a client results in a rollback of the open transactions for this client.
+# Use WAIT_FOR_CLEANUP to determine how much time the server has
+# for cleanup.
+# 3. SIGQUIT
+# This will terminate the server immediately and results in a recovery run for the next start.
+
+# Wait for clients to disconnect
+WAIT_FOR_DISCONNECT=30
+
+# Time the server has to clean up
+WAIT_FOR_CLEANUP=60
+
+# Time the server has to quit (with a recover-run on next startup)
+# Set to 0 to deactivate it
+WAIT_FOR_QUIT=60
+
+# Comment this out if you don't want to wait for the server to
+# startup before continuing. For example, if this server is a
+# PITR log shipping based replication standby
+WAIT_FOR_START="-w"
+
+# If you have to export environment variables for the database process,
+# this can be done here.
+#
+# Example:
+# export R_HOME="/usr/lib/R"
diff --git a/extra/pgcluster/pgcluster.initd b/extra/pgcluster/pgcluster.initd
new file mode 100644
index 00000000..fb5cdfdf
--- /dev/null
+++ b/extra/pgcluster/pgcluster.initd
@@ -0,0 +1,172 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-8.3,v 1.4 2008/09/28 22:53:02 caleb Exp $
+
+opts="${opts} reload setup"
+
+depend() {
+ use net
+ provide postgresql
+}
+
+checkconfig() {
+ if [ ! -d "$PGDATA" ] ; then
+ eerror "Directory not found: $PGDATA"
+ eerror "Please make sure that PGDATA points to the right path."
+ eerror "You can run '/etc/init.d/pgcluster setup' to setup a new database cluster."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ #ebegin "Starting PostgreSQL"
+
+ if [ -f "$PGDATA/postmaster.pid" ] ; then
+ rm -f "$PGDATA/postmaster.pid"
+ fi
+
+ local retval
+
+ if [ ${PG_START_DB} == "yes" ]; then
+ ebegin "Starting PGCluster database instance"
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl start ${WAIT_FOR_START} -o '--silent-mode=true ${PGOPTS}'" >/dev/null
+ retval=$?
+ if [ $retval -ne 0 ]; then
+ eend $retval
+ else
+
+ # The following is to catch the case of an already running server
+ # in which pg_ctl doesn't know to which server it connected to and false reports the server as 'up'
+ sleep 2
+ if [ ! -f "$PGDATA/postmaster.pid" ] ; then
+ eerror "The pid-file doesn't exist but pg_ctl reported a running server."
+ eerror "Please check whether there is another server running on the same port or read the log-file."
+ eend 1
+ else
+ local pid=$(grep "^[0-9]\+" "$PGDATA/postmaster.pid")
+ test -d /proc/"${pid}"
+ eend $?
+ fi
+ fi
+ fi
+
+ if [ ${PG_START_REPLICATE} == "yes" ]; then
+ ebegin "Starting PGCluster replicate instance"
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pgreplicate -D ${PGDATA} -l" >/dev/null
+ retval=$?
+ sleep 1
+ if [ ! -f "$PGDATA/pgreplicate.pid" ] ; then
+ eerror "Where's the pid file?"
+ eend 1
+ else
+ local pid=$(grep "^[0-9]\+" "$PGDATA/pgreplicate.pid")
+ test -d /proc/"${pid}"
+ eend $?
+ fi
+ fi
+
+ if [ ${PG_START_LB} == "yes" ]; then
+ ebegin "Starting PGCluster load balancer instance"
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pglb -D ${PGDATA} -l" >/dev/null
+ retval=$?
+ sleep 1
+ if [ ! -f "$PGDATA/pglb.pid" ] ; then
+ eerror "Where's the pid file?"
+ eend 1
+ else
+ local pid=$(grep "^[0-9]\+" "$PGDATA/pglb.pid")
+ test -d /proc/"${pid}"
+ eend $?
+ fi
+ fi
+ return
+}
+
+stop() {
+ local retval
+
+ if [ ${PG_START_LB} == "yes" ]; then
+ ebegin "Stopping PGCluster Load Balancer instance"
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pglb -D ${PGDATA} -l stop" >/dev/null
+ eend $?
+ fi
+ if [ ${PG_START_REPLICATE} == "yes" ]; then
+ ebegin "Stopping PGCluster Replicate instance"
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pgreplicate -D ${PGDATA} -l stop" >/dev/null
+ eend $?
+ fi
+
+
+ if [ ${PG_START_DB} == "yes" ]; then
+ ebegin "Stopping PGCLuster database (this can take up to $(( ${WAIT_FOR_DISCONNECT} + ${WAIT_FOR_CLEANUP} )) seconds)"
+ if [ ! -f "$PGDATA/postmaster.pid" ] ; then
+ ewarn "$PGDATA/postmaster.pid not found. Was it running?"
+ eend 1
+ return 0
+ fi
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl stop -t ${WAIT_FOR_DISCONNECT} -m smart" >/dev/null
+
+ retval=$?
+ [ $retval -eq 0 ] && eend $retval && return $retval
+
+ ewarn "Some clients did not disconnect within ${WAIT_FOR_DISCONNECT} seconds."
+ ewarn "Going to shutdown the server anyway."
+
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl stop -m fast" >/dev/null
+
+ retval=$?
+ [ $retval -eq 0 ] && eend $retval && return $retval
+
+ if [ ${WAIT_FOR_QUIT} -eq 0 ] ; then
+ eerror "Server did not shut down and sending the SIGQUIT has been disabled."
+ eend $retval
+ return $retval
+ fi
+
+ ewarn "Shutting down the server gracefully failed."
+ ewarn "Forcing it to shutdown which leads to a recover-run on next startup."
+
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl stop -m immediate" >/dev/null
+
+ retval=$?
+ [ $retval -eq 0 ] && eend $retval && return $retval
+
+ eerror "Forced shutdown failed!!! Something is wrong with your system, please take care of it manually."
+ eend $?
+ fi
+}
+
+reload() {
+ ebegin "Reloading PostgreSQL configuration"
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl reload" >/dev/null
+ eend $?
+}
+
+setup() {
+ ebegin "Creating a new PGCluster database cluster"
+ if [ -d "${PGDATA}" ] ; then
+ eend 1 "${PGDATA} already exist"
+ return
+ fi
+ mkdir -p "${PGDATA}"
+ chown -Rf postgres:postgres "${PGDATA}"
+ chmod 0700 "${PGDATA}"
+ cd "${PGDATA}" # to avoid the: could not change directory to "/root"
+ su -c "/usr/bin/initdb --pgdata ${PGDATA}" postgres
+ einfo "You can use the '/etc/init.d/pgcluster' script to run PostgreSQL instead"
+ einfo "of 'pg_ctl'."
+ eend $?
+}
+
diff --git a/testing/luasql-postgres/APKBUILD b/testing/luasql-postgres/APKBUILD
new file mode 100644
index 00000000..1e983d06
--- /dev/null
+++ b/testing/luasql-postgres/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=luasql-postgres
+pkgver=2.1.1
+pkgrel=0
+pkgdesc="LuaSQL is a simple interface from Lua to a DBMS"
+url="http://www.keplerproject.org/luasql/"
+license="MIT"
+depends="lua postgresql"
+makedepends="lua-dev postgresql-dev"
+install=
+subpackages=""
+source="http://luaforge.net/frs/download.php/2686/luasql-$pkgver.tar.gz
+ config.new
+ "
+
+build() {
+ cd "$srcdir/luasql-$pkgver"
+ cp "$srcdir/config.new" config
+
+# ./configure --prefix=/usr \
+# --sysconfdir=/etc \
+# --mandir=/usr/share/man \
+# --infodir=/usr/share/info
+ make || return 1
+ mkdir -p $startdir/pkg/usr/lib/lua/5.1/luasql
+ cp src/postgres.so $startdir/pkg/usr/lib/lua/5.1/luasql
+}
+
+md5sums="63bdd57de4b9d1be336ba112d8cb69eb luasql-2.1.1.tar.gz
+6ee28fa90394da6a7e38cf507d56ba80 config.new"
diff --git a/testing/luasql-postgres/config.new b/testing/luasql-postgres/config.new
new file mode 100644
index 00000000..a8650c55
--- /dev/null
+++ b/testing/luasql-postgres/config.new
@@ -0,0 +1,59 @@
+# Driver (leave uncommented ONLY the line with the name of the driver)
+#T= mysql
+#T= oci8
+#T= odbc
+T= postgres
+#T= sqlite
+#T=sqlite3
+
+# Installation directories
+
+# Default prefix
+PREFIX = /usr
+
+# System's libraries directory (where binary libraries are installed)
+LUA_LIBDIR= $(PREFIX)/lib/lua/5.1
+
+# System's lua directory (where Lua libraries are installed)
+LUA_DIR= $(PREFIX)/share/lua/5.1
+
+# Lua includes directory
+LUA_INC= $(PREFIX)/include
+
+# Lua version number (first and second digits of target version)
+LUA_VERSION_NUM= 514
+
+# OS dependent
+LIB_OPTION= -shared #for Linux
+#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
+
+LIBNAME= $T.so
+COMPAT_DIR= ../compat/src
+
+# Compilation parameters
+# Driver specific
+######## MySQL
+#DRIVER_LIBS= -L/usr/local/mysql/lib -lmysqlclient -lz
+#DRIVER_INCS= -I/usr/local/mysql/include
+######## Oracle OCI8
+#DRIVER_LIBS= -L/home/oracle/OraHome1/lib -lz -lclntsh
+#DRIVER_INCS= -I/home/oracle/OraHome1/rdbms/demo -I/home/oracle/OraHome1/rdbms/public
+######## PostgreSQL
+DRIVER_LIBS= -L/usr/pgsql/lib -lpq
+DRIVER_INCS= -I/usr/pgsql/include
+######## SQLite
+#DRIVER_LIBS= -lsqlite
+#DRIVER_INCS=
+######## SQLite3
+#DRIVER_LIBS= -L/opt/local/lib -lsqlite3
+#DRIVER_INCS= -I/opt/local/include
+######## ODBC
+#DRIVER_LIBS= -L/usr/local/lib -lodbc
+#DRIVER_INCS= -DUNIXODBC -I/usr/local/include
+
+WARN= -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic
+INCS= -I$(LUA_INC)
+CFLAGS= -O2 $(WARN) -I$(COMPAT_DIR) $(DRIVER_INCS) $(INCS) $(DEFS)
+CC= gcc
+
+# $Id: config,v 1.8 2007/10/27 22:55:27 carregal Exp $
diff --git a/unstable/prosody/APKBUILD b/unstable/prosody/APKBUILD
index 4cf10b22..60ad4e9c 100644
--- a/unstable/prosody/APKBUILD
+++ b/unstable/prosody/APKBUILD
@@ -1,28 +1,46 @@
-# Contributor: Michael Mason <ms13sp@gmail.com>
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
pkgname=prosody
pkgver=0.4.2
pkgrel=0
pkgdesc="Lua based Jabber/XMPP server"
url="http://prosody.im/"
-license="GPL"
-depends="uclibc lua libidn openssl"
-makedepends="lua-dev libidn-dev lua-dev openssl-dev"
-install=
+license="MIT"
+depends="uclibc lua libidn openssl luasocket luaexpat"
+makedepends="lua-dev libidn-dev openssl-dev"
+install="prosody.pre-install prosody.post-install"
subpackages=""
-source="http://prosody.im/downloads/source/$pkgname-$pkgver.tar.gz"
+source="http://prosody.im/downloads/source/$pkgname-$pkgver.tar.gz
+ $pkgname.cfg.lua
+ $pkgname.initd
+ $install
+ Makefile-0.4.2.patch
+ "
build() {
cd "$srcdir/$pkgname-$pkgver"
- PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
-
+ patch Makefile "$startdir/Makefile-0.4.2.patch" || return 1
+
./configure --prefix=/usr \
- --sysconfdir=/etc
+ --sysconfdir=/etc/prosody \
+ --with-lua=/usr/bin \
+ --with-lua-lib=/usr/lib \
+ --with-lua-include=/usr/include
+
make || return 1
make DESTDIR="$pkgdir" install
- # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -d "$pkgdir/var/log/prosody" || return 1
+ install -d "$pkgdir/var/run/prosody" || return 1
+ install -D -m755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname"
+
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
-md5sums="2669478311b3a67522669acdf03cf85c prosody-0.4.2.tar.gz"
+md5sums="2669478311b3a67522669acdf03cf85c prosody-0.4.2.tar.gz
+f42039e5a342fe62cd7e491546338aaa prosody.cfg.lua
+c161a875295b45241229eb6db65211e8 prosody.initd
+08484f183ba39233337d3fbc92cffadc prosody.pre-install
+8202a40bf6de7cbacbaf76f2985aa220 prosody.post-install
+684d033dac42399a245c061c9a374e1b Makefile-0.4.2.patch"