aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/ccnet/APKBUILD56
-rw-r--r--unmaintained/libsearpc/APKBUILD55
-rw-r--r--unmaintained/seafile/APKBUILD109
-rw-r--r--unmaintained/seafile/seafile-controller.patch37
-rw-r--r--unmaintained/seafile/seafile-scripts.patch103
-rw-r--r--unmaintained/seafile/seafile-server.post-install9
-rw-r--r--unmaintained/seafile/seafile-server.pre-install8
-rw-r--r--unmaintained/seafile/seafile.confd4
-rw-r--r--unmaintained/seafile/seafile.initd16
9 files changed, 397 insertions, 0 deletions
diff --git a/unmaintained/ccnet/APKBUILD b/unmaintained/ccnet/APKBUILD
new file mode 100644
index 0000000000..3ad85e7718
--- /dev/null
+++ b/unmaintained/ccnet/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: <xmingske@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=ccnet
+pkgver=5.0.7
+pkgrel=0
+pkgdesc="framework for writing networked applications in C"
+url="https://github.com/haiwen/ccnet/"
+arch="all"
+license="GPL3"
+makedepends="autoconf automake bash glib-dev jansson-dev openssl-dev libevent-dev
+ libsearpc-dev libtool libzdb-dev python-dev sqlite-dev util-linux-dev vala"
+source="$pkgname-$pkgver.tar.gz::https://github.com/haiwen/ccnet/archive/v${pkgver}.tar.gz"
+subpackages="$pkgname-dev py-$pkgname:py $pkgname-libs"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+
+prepare() {
+ local pf
+ cd "${_builddir}"
+ for pf in $source; do
+ case $pf in
+ *.patch) msg $pf; patch -p1 -i "$srcdir"/${pf} || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "${_builddir}"
+ ./autogen.sh
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-python \
+ --enable-server
+ make || return 1
+}
+
+package() {
+ cd "${_builddir}"
+ make DESTDIR="${pkgdir}" install || return 1
+ rm "${pkgdir}"/usr/lib/libccnet.la
+}
+
+py() {
+ arch="noarch"
+ cd "$_builddir"
+ pkgdesc="$pkgname python bindings"
+ install -d "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
+}
+
+md5sums="14f2cc30c2655aadaddeaec48a5d0a36 ccnet-5.0.7.tar.gz"
+sha256sums="1e1c670a85619b174328a15925a050c7a8b323fecd13434992332f5c15e05de1 ccnet-5.0.7.tar.gz"
+sha512sums="31b980cf0e5187f6769c05c97ede77e4d6ad798ec3ea0fc2c7679e8ef92982683b772811db5435b0be2686b19e8b7dc8f8c8a8f15e5d89ae1de44842e2000954 ccnet-5.0.7.tar.gz"
diff --git a/unmaintained/libsearpc/APKBUILD b/unmaintained/libsearpc/APKBUILD
new file mode 100644
index 0000000000..c5ff291be4
--- /dev/null
+++ b/unmaintained/libsearpc/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: <xmingske@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libsearpc
+pkgver=3.0.7
+pkgrel=0
+pkgdesc="A simple and easy-to-use C language RPC framework"
+url="https://github.com/haiwen/libsearpc/"
+arch="all"
+license="LGPL2.1"
+makedepends="autoconf automake bash glib-dev jansson-dev libtool python-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/haiwen/libsearpc/archive/v3.0-latest.tar.gz"
+subpackages="$pkgname-dev py-$pkgname:py"
+
+_builddir="${srcdir}"/${pkgname}-3.0-latest
+
+prepare() {
+ local pf
+ cd "${_builddir}"
+ for pf in $source; do
+ case $pf in
+ *.patch) msg $pf; patch -p1 -i "$srcdir"/${pf} || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "${_builddir}"
+ ./autogen.sh
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "${_builddir}"
+ make DESTDIR="${pkgdir}" install || return 1
+ rm "${pkgdir}"/usr/lib/libsearpc.la
+ echo ${pkgdir}/usr/lib/pkgconfig/libsearpc.pc
+ sed -i -e 's/(DESTDIR)//' "${pkgdir}"/usr/lib/pkgconfig/libsearpc.pc
+ sed -i -e 's/prefix=.*/prefix=\/usr/' "${pkgdir}"/usr/lib/pkgconfig/libsearpc.pc
+}
+
+py() {
+ arch="noarch"
+ cd "$_builddir"
+ pkgdesc="$pkgname python bindings"
+ install -d "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
+}
+md5sums="32a6eaafe16d8c0c0e320b4a08a4d8f6 libsearpc-3.0.7.tar.gz"
+sha256sums="56313771e0ad7dc075c4590b6a75daeb3939937b21716d82c91be2612133b8cd libsearpc-3.0.7.tar.gz"
+sha512sums="f5706d5490eb6abd05a25963ae204b358e7ebdcf153ab4bfe76819fd4538f1a957d7eaf84d8e60e076d978f9c1605adb2e6ec7ded55950c551304eb7665b15e8 libsearpc-3.0.7.tar.gz"
diff --git a/unmaintained/seafile/APKBUILD b/unmaintained/seafile/APKBUILD
new file mode 100644
index 0000000000..1631503e75
--- /dev/null
+++ b/unmaintained/seafile/APKBUILD
@@ -0,0 +1,109 @@
+# Contributor: <xmingske@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=seafile
+pkgver=4.2.6
+pkgrel=3
+pkgdesc="Cloud storage system with advanced support for file syncing, privacy protection and teamwork"
+url="https://github.com/haiwen/seafile/"
+arch="all"
+license="GPL3"
+makedepends="autoconf automake bash ccnet-dev curl-dev fuse-dev glib-dev
+ intltool jansson-dev libarchive-dev libevent-dev libevhtp-dev
+ libsearpc-dev libtool libzdb-dev openssl-dev sqlite-dev util-linux-dev
+ vala bsd-compat-headers libevhtp-dev"
+depends="bash ${pkgname}-common"
+pkgusers="seafile"
+pkggroups="seafile"
+source="$pkgname-$pkgver.tar.gz::https://github.com/haiwen/seafile/archive/v${pkgver}.tar.gz
+ seafile-controller.patch seafile-scripts.patch seafile.initd seafile.confd"
+subpackages="$pkgname-dev $pkgname-doc py-$pkgname:py $pkgname-server
+ $pkgname-common"
+install="seafile-server.pre-install seafile-server.post-install"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+
+prepare() {
+ local pf
+ cd "${_builddir}" || return 1
+ for pf in $source; do
+ case $pf in
+ *.patch) msg $pf; patch -p1 -i "$srcdir"/${pf} || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "${_builddir}"
+ ./autogen.sh
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-server \
+ --enable-python \
+ --enable-fuse \
+ --enable-client \
+ --enable-console
+ make CFLAGS="$CFLAGS $(pkgconf --cflags evhtp)" || return 1
+}
+
+package() {
+ cd "${_builddir}"
+ make DESTDIR="${pkgdir}" install || return 1
+ rm "${pkgdir}"/usr/lib/libseafile.la || return 1
+}
+
+py() {
+ arch="noarch"
+ cd "$_builddir"
+ pkgdesc="$pkgname python bindings"
+ install -d "$subpkgdir"/usr/lib || return 1
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ || return 1
+}
+
+common() {
+ mkdir -p "${subpkgdir}"/usr/bin || return 1
+ mkdir -p "${subpkgdir}"/usr/lib || return 1
+ mv "${pkgdir}"/usr/bin/seafile "${subpkgdir}"/usr/bin
+ mv "${pkgdir}"/usr/lib/libseafile.so.0* "${subpkgdir}"/usr/lib
+}
+
+server() {
+ mkdir -p "${subpkgdir}"/usr/bin
+ for b in "${pkgdir}"/usr/bin/*; do
+ if [[ "$b" != "${pkgdir}/usr/bin/seaf-cli" ]] && \
+ [[ "$b" != "${pkgdir}/usr/bin/seaf-daemon" ]] && \
+ [[ "$b" != "${pkgdir}/usr/bin/seafile" ]]; then
+ mv "$b" "${subpkgdir}/usr/bin" || return 1
+ fi
+ done
+ mkdir -m 755 -p "${subpkgdir}"/usr/share/seafile || return 1
+ cp -ar "${_builddir}"/scripts "${subpkgdir}"/usr/share/seafile || return 1
+ install -D -m0644 "${srcdir}"/seafile.confd "${subpkgdir}"/etc/conf.d/seafile \
+ || return 1
+ install -D -m0755 "${srcdir}"/seafile.initd "${subpkgdir}"/etc/init.d/seafile \
+ || return 1
+
+ #make dirs for default instance
+ SEAFILE_HOME="${subpkgdir}"/var/lib/seafile
+ SEAFILE_DEFAULT=$SEAFILE_HOME/default
+ mkdir -m 755 -p $SEAFILE_DEFAULT 2>/dev/null
+ chown seafile:seafile $SEAFILE_DEFAULT
+
+}
+md5sums="d05600bf1187e0354ee8e85f3074a786 seafile-4.2.6.tar.gz
+3f2b5457441871a4922d873e2b386711 seafile-controller.patch
+5d5217a4616ba9d57b56f0b61797b419 seafile-scripts.patch
+d2319373c376bff87a3005057d887193 seafile.initd
+cc33cc3ef3b04415a7b1d160e6b64e2b seafile.confd"
+sha256sums="a4a51dbdd5b2c49a8b1cb16ffacea92a0f52b5a0050c0de20057893f183d9e40 seafile-4.2.6.tar.gz
+03fa3d43bcaed4bf720e7cbec5ea0fe9e1d8d90987bc8b69a045dafe10e1c27a seafile-controller.patch
+42fc1ed64c0a3cac0c5f74f2c269d96eba80e8b7a9dbff6332726342b576edf6 seafile-scripts.patch
+aaf173e5df205fc4b152f6d75c5b3b7ec738bb1acbbe413ea6fce268b1d830c1 seafile.initd
+a78183173ce054a245878d309dda9bff7981193d2b0594d299030e403e857952 seafile.confd"
+sha512sums="83d55c0cd6ac6fdca5b6dde50c0d3f402894621271bf9b2c5e24106672ac091c23c7ba8e124d88f5142d2eed4373f078f45793699402bf7732804762f1928cfa seafile-4.2.6.tar.gz
+6b70df847d2d3f1fbd856f220dd5686d04c1ee4810c60d3bb28c80e85f508d3b448a0e6cfb9a83a43876285968ec917867838ef31c00cfb431a8e1e953241246 seafile-controller.patch
+9af26dbbc62c2e135d1ecb29243de658524d3cdbcfdfbaafcb30e137d0230792a7466b7b01a449a113ddf87f89acdceaf8c06192dd2ee28b3bbd18e9973a7b0d seafile-scripts.patch
+66b84519ab66e7435da13a2ed1869bac3ead1f7b46ed4b0a5ecda6dfcea056c5e0af8abcf1eba00fc2e68b8df7e07e3951968c385850f01ecf46f08dfdbe7083 seafile.initd
+051ccc065a3b7abc7c802e00e364da1c3f689e133c4ba37385dbff97cfe8ad4b490cf53778344d129213fb0238258690a47f5e737387bce1368db59d22ee8504 seafile.confd"
diff --git a/unmaintained/seafile/seafile-controller.patch b/unmaintained/seafile/seafile-controller.patch
new file mode 100644
index 0000000000..438064d5f3
--- /dev/null
+++ b/unmaintained/seafile/seafile-controller.patch
@@ -0,0 +1,37 @@
+--- a/controller/seafile-controller.c 2014-01-16 19:56:24.183523103 +0100
++++ b/controller/seafile-controller.c 2014-01-16 19:55:57.123523652 +0100
+@@ -281,7 +281,7 @@
+ tmp = g_path_get_dirname (bin_dir);
+ installpath = g_path_get_dirname (tmp);
+
+- topdir = g_path_get_dirname (installpath);
++ // topdir = g_path_get_dirname (installpath);
+
+ g_free (exectuble);
+ g_free (tmp);
+@@ -643,6 +643,7 @@
+ return -1;
+ }
+
++ topdir = g_path_get_dirname(config_dir);
+ ctl->client = ccnet_client_new ();
+ ctl->sync_client = ccnet_client_new ();
+
+@@ -657,14 +658,14 @@
+ }
+
+ if (logdir == NULL) {
+- char *topdir = g_path_get_dirname(config_dir);
++ //char *topdir = g_path_get_dirname(config_dir);
+ logdir = g_build_filename (topdir, "logs", NULL);
+ if (checkdir_with_mkdir(logdir) < 0) {
+ fprintf (stderr, "failed to create log folder \"%s\": %s\n",
+ logdir, strerror(errno));
+ return -1;
+ }
+- g_free (topdir);
++ //g_free (topdir);
+ }
+
+ ctl->config_dir = config_dir;
+
diff --git a/unmaintained/seafile/seafile-scripts.patch b/unmaintained/seafile/seafile-scripts.patch
new file mode 100644
index 0000000000..f6e8978bb5
--- /dev/null
+++ b/unmaintained/seafile/seafile-scripts.patch
@@ -0,0 +1,103 @@
+diff --git a/scripts/seaf-fuse.sh b/scripts/seaf-fuse.sh
+index 463002e..92ef285 100755
+--- a/scripts/seaf-fuse.sh
++++ b/scripts/seaf-fuse.sh
+@@ -6,10 +6,7 @@ SCRIPT=$(readlink -f "$0")
+ INSTALLPATH=$(dirname "${SCRIPT}")
+ TOPDIR=$(dirname "${INSTALLPATH}")
+ default_ccnet_conf_dir=${TOPDIR}/ccnet
+-seaf_fuse=${INSTALLPATH}/seafile/bin/seaf-fuse
+-
+-export PATH=${INSTALLPATH}/seafile/bin:$PATH
+-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
++seaf_fuse=/usr/bin/seaf-fuse
+
+ script_name=$0
+ function usage () {
+diff --git a/scripts/seaf-gc.sh b/scripts/seaf-gc.sh
+index 489961a..605fabd 100755
+--- a/scripts/seaf-gc.sh
++++ b/scripts/seaf-gc.sh
+@@ -6,12 +6,9 @@ SCRIPT=$(readlink -f "$0")
+ INSTALLPATH=$(dirname "${SCRIPT}")
+ TOPDIR=$(dirname "${INSTALLPATH}")
+ default_ccnet_conf_dir=${TOPDIR}/ccnet
+-seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc
++seaf_gc=/usr/bin/seafserv-gc
+ seaf_gc_opts=""
+
+-export PATH=${INSTALLPATH}/seafile/bin:$PATH
+-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
+-
+ script_name=$0
+ function usage () {
+ echo "usage : "
+diff --git a/scripts/seafile.sh b/scripts/seafile.sh
+index e04d65f..9ca171c 100755
+--- a/scripts/seafile.sh
++++ b/scripts/seafile.sh
+@@ -17,12 +17,7 @@ INSTALLPATH=$(dirname "${SCRIPT}")
+ TOPDIR=$(dirname "${INSTALLPATH}")
+ default_ccnet_conf_dir=${TOPDIR}/ccnet
+ ccnet_pidfile=${INSTALLPATH}/runtime/ccnet.pid
+-seaf_controller="${INSTALLPATH}/seafile/bin/seafile-controller"
+-
+-
+-export PATH=${INSTALLPATH}/seafile/bin:$PATH
+-export ORIG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
++seaf_controller="/usr/bin/seafile-controller"
+
+ script_name=$0
+ function usage () {
+@@ -102,7 +97,7 @@ function start_seafile_server () {
+
+ echo "Starting seafile server, please wait ..."
+
+- LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_controller} -c "${default_ccnet_conf_dir}" -d "${seafile_data_dir}"
++ ${seaf_controller} -c "${default_ccnet_conf_dir}" -d "${seafile_data_dir}"
+
+ sleep 3
+
+diff --git a/scripts/setup-seafile.sh b/scripts/setup-seafile.sh
+index f7c181c..e88fbce 100755
+--- a/scripts/setup-seafile.sh
++++ b/scripts/setup-seafile.sh
+@@ -8,8 +8,6 @@ default_seafile_data_dir=${TOPDIR}/seafile-data
+ default_seahub_db=${TOPDIR}/seahub.db
+ default_conf_dir=${TOPDIR}/conf
+
+-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
+-
+ use_existing_ccnet="false"
+ use_existing_seafile="false"
+
+@@ -395,8 +393,8 @@ echo
+ echo "If you are OK with the configuration, press [ENTER] to continue."
+ read dummy
+
+-ccnet_init=${INSTALLPATH}/seafile/bin/ccnet-init
+-seaf_server_init=${INSTALLPATH}/seafile/bin/seaf-server-init
++ccnet_init=/usr/bin/ccnet-init
++seaf_server_init=/usr/bin/seaf-server-init
+
+ # -------------------------------------------
+ # Create ccnet conf
+@@ -404,7 +402,7 @@ seaf_server_init=${INSTALLPATH}/seafile/bin/seaf-server-init
+ if [[ "${use_existing_ccnet}" != "true" ]]; then
+ echo "Generating ccnet configuration in ${default_ccnet_conf_dir}..."
+ echo
+- if ! LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH "${ccnet_init}" -c "${default_ccnet_conf_dir}" --name "${server_name}" --port "${server_port}" --host "${ip_or_domain}"; then
++ if ! "${ccnet_init}" -c "${default_ccnet_conf_dir}" --name "${server_name}" --port "${server_port}" --host "${ip_or_domain}"; then
+ err_and_quit;
+ fi
+
+@@ -419,7 +417,7 @@ sleep 0.5
+ if [[ "${use_existing_seafile}" != "true" ]]; then
+ echo "Generating seafile configuration in ${seafile_data_dir} ..."
+ echo
+- if ! LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_server_init} --seafile-dir "${seafile_data_dir}" \
++ if ! ${seaf_server_init} --seafile-dir "${seafile_data_dir}" \
+ --port ${seafile_server_port} --fileserver-port ${fileserver_port}; then
+
+ echo "Failed to generate seafile configuration"
diff --git a/unmaintained/seafile/seafile-server.post-install b/unmaintained/seafile/seafile-server.post-install
new file mode 100644
index 0000000000..4e46bd8da5
--- /dev/null
+++ b/unmaintained/seafile/seafile-server.post-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+SEAFILE_HOME=/var/lib/seafile
+SEAFILE_DEFAULT=$SEAFILE_HOME/default
+
+if [[ ! -d $SEAFILE_DEFAULT/scripts ]]; then
+ cd $SEAFILE_DEFAULT
+ cp -ar /usr/share/seafile/scripts .
+fi \ No newline at end of file
diff --git a/unmaintained/seafile/seafile-server.pre-install b/unmaintained/seafile/seafile-server.pre-install
new file mode 100644
index 0000000000..7e3df0b5ef
--- /dev/null
+++ b/unmaintained/seafile/seafile-server.pre-install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+SEAFILE_HOME=/var/lib/seafile
+
+addgroup -S -g 800 seafile 2>/dev/null
+adduser -S -u 800 -D -h $SEAFILE_HOME -s /bin/sh -G seafile -g seafile seafile 2>/dev/null
+
+exit 0
diff --git a/unmaintained/seafile/seafile.confd b/unmaintained/seafile/seafile.confd
new file mode 100644
index 0000000000..b169b0e55f
--- /dev/null
+++ b/unmaintained/seafile/seafile.confd
@@ -0,0 +1,4 @@
+instance="default"
+
+seafile_user="seafile"
+seafile_group="seafile"
diff --git a/unmaintained/seafile/seafile.initd b/unmaintained/seafile/seafile.initd
new file mode 100644
index 0000000000..b92a7653ad
--- /dev/null
+++ b/unmaintained/seafile/seafile.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Seafile $instance instance"
+ start-stop-daemon --chdir /var/lib/seafile/$instance --user $seafile_user \
+ --group $seafile_group /usr/bin/seafile-admin start $seafile_opts
+}
+
+stop() {
+ ebegin "Stopping Seafile $instance instance"
+ start-stop-daemon --chdir /var/lib/seafile/$instance /usr/bin/seafile-admin stop
+}