Add packages for libzdb, libsearpc, ccnet, seafile-shared, and seafile-client

This commit is contained in:
Moritz Maxeiner 2014-02-04 20:02:46 +01:00
parent e1b206b4a9
commit 99ba14ee7a
10 changed files with 393 additions and 0 deletions

View File

@ -0,0 +1,38 @@
{stdenv, fetchurl, writeScript, pkgconfig, cmake, qt4, seafileShared, ccnet, makeWrapper}:
stdenv.mkDerivation rec
{
version = "2.1.1";
name = "seafile-client-${version}";
src = fetchurl
{
url = "https://github.com/haiwen/seafile-client/archive/v${version}.tar.gz";
sha256 = "d98515ea229df702cbe973d85ec0bd5cf3f5282ef1022ba0157d5301b521c8e0";
};
buildInputs = [ pkgconfig cmake qt4 seafileShared makeWrapper ];
builder = writeScript "${name}-builder.sh" ''
source $stdenv/setup
tar xvfz $src
cd seafile-client-*
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_PREFIX="$out" .
make -j1
make install
wrapProgram $out/bin/seafile-applet \
--suffix PATH : ${ccnet}/bin:${seafileShared}/bin
'';
meta =
{
homepage = "https://github.com/haiwen/seafile-clients";
description = "Desktop client for Seafile, the Next-generation Open Source Cloud Storage";
license = stdenv.lib.licenses.asl20;
maintainers = [ stdenv.lib.maintainers.calrama ];
};
}

View File

@ -0,0 +1,31 @@
{stdenv, fetchurl, automake, autoconf, pkgconfig, libtool, python, pythonPackages, glib, jansson}:
stdenv.mkDerivation rec
{
version = "1.2.1";
seafileVersion = "2.1.1";
name = "libsearpc-${version}";
src = fetchurl
{
url = "https://github.com/haiwen/libsearpc/archive/v${seafileVersion}.tar.gz";
sha256 = "c0e7cc812c642ebb1339c3701570e78ff5b8c8aa2a521e5a505e28d9666e89ec";
};
patches = [ ./libsearpc.pc.patch ];
buildInputs = [ automake autoconf pkgconfig libtool python pythonPackages.simplejson ];
propagatedBuildInputs = [ glib jansson ];
preConfigure = "./autogen.sh";
buildPhase = "make -j1";
meta =
{
homepage = "https://github.com/haiwen/libsearpc";
description = "A simple and easy-to-use C language RPC framework (including both server side & client side) based on GObject System.";
license = stdenv.lib.licenses.lgpl3;
maintainers = [ stdenv.lib.maintainers.calrama ];
};
}

View File

@ -0,0 +1,10 @@
From: Aaron Lindsay <aaron@aclindsay.com>
--- a/libsearpc.pc.in 2013-01-10 01:35:24.000000000 -0500
+++ b/libsearpc.pc.in 2013-01-19 11:31:50.479301798 -0500
@@ -1,4 +1,4 @@
-prefix=(DESTDIR)@prefix@
+prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

View File

@ -0,0 +1,23 @@
{stdenv, fetchurl, sqlite}:
stdenv.mkDerivation rec
{
version = "3.0";
name = "libzdb-${version}";
src = fetchurl
{
url = "http://www.tildeslash.com/libzdb/dist/libzdb-${version}.tar.gz";
sha256 = "e334bcb9ca1410e863634a164e3b1b5784018eb6e90b6c2b527780fc29a123c8";
};
buildInputs = [ sqlite ];
meta =
{
homepage = "http://www.tildeslash.com/libzdb/";
description = "A small, easy to use Open Source Database Connection Pool Library.";
license = stdenv.lib.licenses.gpl3;
maintainers = [ stdenv.lib.maintainers.calrama ];
};
}

View File

@ -0,0 +1,121 @@
diff -r -u a/app/Makefile.am b/app/Makefile.am
--- a/app/Makefile.am 2014-01-10 11:38:46.000000000 +0100
+++ b/app/Makefile.am 2014-01-16 14:22:24.584094619 +0100
@@ -21,7 +21,7 @@
seafile_LDADD = @CCNET_LIBS@ \
$(top_builddir)/lib/libseafile.la \
$(top_builddir)/lib/libseafile_common.la \
- @SEARPC_LIBS@ \
+ @SEARPC_LIBS@ @JANSSON_LIBS@ \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3
seafile_LDFALGS = @STATIC_COMPILE@ @CONSOLE@
@@ -29,7 +29,7 @@
if COMPILE_SERVER
seafserv_tool_SOURCES = seafserv-tool.c
seafserv_tool_LDADD = @CCNET_LIBS@ \
- $(top_builddir)/lib/libseafile.la @SEARPC_LIBS@ \
+ $(top_builddir)/lib/libseafile.la @SEARPC_LIBS@ @JANSSON_LIBS@ \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3
seafserv_tool_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@ @SERVER_PKG_RPATH@
diff -r -u a/configure.ac b/configure.ac
--- a/configure.ac 2014-01-10 11:38:46.000000000 +0100
+++ b/configure.ac 2014-01-16 14:22:24.584094619 +0100
@@ -233,6 +233,7 @@
GLIB_REQUIRED=2.16.0
CCNET_REQUIRED=0.9.3
SEARPC_REQUIRED=1.0
+JANSSON_REQUIRED=2.2.1
ZDB_REQUIRED=2.10
#LIBNAUTILUS_EXTENSION_REQUIRED=2.30.1
CURL_REQUIRED=7.17
@@ -254,6 +255,11 @@
AC_SUBST(SEARPC_CFLAGS)
AC_SUBST(SEARPC_LIBS)
+PKG_CHECK_MODULES(JANSSON, [jansson >= $JANSSON_REQUIRED])
+AC_SUBST(JANSSON_CFLAGS)
+AC_SUBST(JANSSON_LIBS)
+
+
PKG_CHECK_MODULES(LIBEVENT, [libevent >= $LIBEVENT_REQUIRED])
AC_SUBST(LIBEVENT_CFLAGS)
AC_SUBST(LIBEVENT_LIBS)
diff -r -u a/daemon/Makefile.am b/daemon/Makefile.am
--- a/daemon/Makefile.am 2014-01-10 11:38:46.000000000 +0100
+++ b/daemon/Makefile.am 2014-01-16 14:22:24.587427993 +0100
@@ -139,7 +139,7 @@
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 -levent \
$(top_builddir)/common/cdc/libcdc.la \
$(top_builddir)/common/index/libindex.la ${LIB_WS32} \
- @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@
+ @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@
seaf_daemon_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@
diff -r -u a/server/gc/Makefile.am b/server/gc/Makefile.am
--- a/server/gc/Makefile.am 2014-01-10 11:38:46.000000000 +0100
+++ b/server/gc/Makefile.am 2014-01-16 14:23:20.991449822 +0100
@@ -50,7 +50,7 @@
$(top_builddir)/common/cdc/libcdc.la \
$(top_builddir)/lib/libseafile_common.la \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 -levent \
- @SEARPC_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ ${LIB_WS32}
+ @SEARPC_LIBS@ @JANSSON_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ ${LIB_WS32}
seafserv_gc_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@
@@ -63,6 +63,6 @@
$(top_builddir)/common/cdc/libcdc.la \
$(top_builddir)/lib/libseafile_common.la \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 -levent \
- @SEARPC_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ ${LIB_WS32}
+ @SEARPC_LIBS@ @JANSSON_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ ${LIB_WS32}
seaf_fsck_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@
diff -r -u a/server/Makefile.am b/server/Makefile.am
--- a/server/Makefile.am 2014-01-10 11:38:46.000000000 +0100
+++ b/server/Makefile.am 2014-01-16 14:23:40.498354610 +0100
@@ -99,6 +99,6 @@
$(top_builddir)/common/index/libindex.la \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 -levent \
$(top_builddir)/common/cdc/libcdc.la \
- @SEARPC_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ ${LIB_WS32}
+ @SEARPC_LIBS@ @JANSSON_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ ${LIB_WS32}
seaf_server_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@
diff -r -u a/httpserver/Makefile.am b/httpserver/Makefile.am
--- a/httpserver/Makefile.am 2014-01-10 11:38:46.000000000 +0100
+++ b/httpserver/Makefile.am 2014-01-16 14:26:48.673985279 +0100
@@ -50,7 +50,7 @@
@CCNET_LIBS@ \
$(top_builddir)/lib/libseafile.la \
$(top_builddir)/common/cdc/libcdc.la \
- @SEARPC_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ \
+ @SEARPC_LIBS@ @JANSSON_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ \
@LIBARCHIVE_LIBS@ ${LIB_WS32}
httpserver_LDFLAGS = @STATIC_COMPILE@
diff -r -u a/controller/Makefile.am b/controller/Makefile.am
--- a/controller/Makefile.am 2014-01-10 11:38:46.000000000 +0100
+++ b/controller/Makefile.am 2014-01-16 14:29:42.076102675 +0100
@@ -18,6 +18,6 @@
seafile_controller_LDADD = @CCNET_LIBS@ \
$(top_builddir)/lib/libseafile_common.la \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -levent \
- @SEARPC_LIBS@
+ @SEARPC_LIBS@ @JANSSON_LIBS@
seafile_controller_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@
diff -r -u a/fuse/Makefile.am b/fuse/Makefile.am
--- a/fuse/Makefile.am 2014-01-10 11:38:46.000000000 +0100
+++ b/fuse/Makefile.am 2014-01-16 14:31:44.764267711 +0100
@@ -43,6 +43,6 @@
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ \
-lsqlite3 -levent \
$(top_builddir)/common/cdc/libcdc.la \
- @SEARPC_LIBS@ @ZDB_LIBS@ @FUSE_LIBS@
+ @SEARPC_LIBS@ @JANSSON_LIBS@ @ZDB_LIBS@ @FUSE_LIBS@
seaf_fuse_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@

View File

@ -0,0 +1,42 @@
{stdenv, fetchurl, which, automake, autoconf, pkgconfig, libtool, vala, python, intltool, fuse, ccnet}:
stdenv.mkDerivation rec
{
version = "2.1.1";
name = "seafile-shared-${version}";
src = fetchurl
{
url = "https://github.com/haiwen/seafile/archive/v${version}.tar.gz";
sha256 = "f07b09ab1eb1cb33f92cee74e499d0350941624396910a4c1a7d79abb45acaa6";
};
patches = [ ./0003-Add-autoconfiguration-for-libjansson.patch ];
buildInputs = [ which automake autoconf pkgconfig libtool vala python intltool fuse ];
propagatedBuildInputs = [ ccnet ];
preConfigure = ''
sed -ie 's|/bin/bash|/bin/sh|g' ./autogen.sh
./autogen.sh
'';
configureFlags = "--disable-server --disable-console";
buildPhase = "make -j1";
postInstall = ''
# Remove seafile binary
rm -rf "$out/bin/seafile"
# Remove cli client binary
rm -rf "$out/bin/seaf-cli"
'';
meta =
{
homepage = "https://github.com/haiwen/seafile";
description = "Shared components of Seafile: seafile-daemon, libseafile, libseafile python bindings, manuals, and icons";
license = stdenv.lib.licenses.gpl3;
maintainers = [ stdenv.lib.maintainers.calrama ];
};
}

View File

@ -0,0 +1,72 @@
From f730ba82d641029dd262d05e8533fc7643f4c4b9 Mon Sep 17 00:00:00 2001
From: Aaron Lindsay <aaron@aclindsay.com>
Date: Wed, 15 Jan 2014 13:49:40 -0500
Subject: [PATCH] Add autoconfiguration for libjansson
---
configure.ac | 5 +++++
net/daemon/Makefile.am | 4 ++--
net/server/Makefile.am | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 64e74b5..0911671 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,6 +248,7 @@ SEARPC_REQUIRED=1.0
ZDB_REQUIRED=2.10
LIBNAUTILUS_EXTENSION_REQUIRED=2.30.1
SEARPC_REQUIRED=1.0
+JANSSON_REQUIRED=2.2.1
CURL_REQUIRED=7.17
PKG_CHECK_MODULES(GLIB2, [glib-2.0 >= $GLIB_REQUIRED])
@@ -262,6 +263,10 @@ PKG_CHECK_MODULES(SEARPC, [libsearpc >= $SEARPC_REQUIRED])
AC_SUBST(SEARPC_CFLAGS)
AC_SUBST(SEARPC_LIBS)
+PKG_CHECK_MODULES(JANSSON, [jansson >= $JANSSON_REQUIRED])
+AC_SUBST(JANSSON_CFLAGS)
+AC_SUBST(JANSSON_LIBS)
+
if test x${compile_python} = xyes; then
AM_PATH_PYTHON([2.6])
diff --git a/net/daemon/Makefile.am b/net/daemon/Makefile.am
index 35d1a3c..0e28c6a 100644
--- a/net/daemon/Makefile.am
+++ b/net/daemon/Makefile.am
@@ -95,7 +95,7 @@ ccnet_SOURCES = ccnet-daemon.c \
ccnet_LDADD = -levent $(top_builddir)/lib/libccnetd.la \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 \
- @LIB_WS32@ @LIB_INTL@ @LIB_IPHLPAPI@ @SEARPC_LIBS@
+ @LIB_WS32@ @LIB_INTL@ @LIB_IPHLPAPI@ @SEARPC_LIBS@ @JANSSON_LIBS@
ccnet_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@ @SERVER_PKG_RPATH@ -no-undefined
@@ -106,7 +106,7 @@ ccnet_test_SOURCES = ccnet-test.c daemon-session.c $(common_srcs)
ccnet_test_LDADD = -levent $(top_builddir)/lib/libccnetd.la \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 \
- @LIB_WS32@ @LIB_INTL@ @LIB_IPHLPAPI@ @SEARPC_LIBS@
+ @LIB_WS32@ @LIB_INTL@ @LIB_IPHLPAPI@ @SEARPC_LIBS@ @JANSSON_LIBS@
ccnet_test_LDFLAGS = @STATIC_COMPILE@ -no-undefined @CONSOLE@
diff --git a/net/server/Makefile.am b/net/server/Makefile.am
index d587f48..b048936 100644
--- a/net/server/Makefile.am
+++ b/net/server/Makefile.am
@@ -103,7 +103,7 @@ ccnet_server_LDADD = -levent $(top_builddir)/lib/libccnetd.la \
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 \
-lpthread \
@LIB_WS32@ @LIB_INTL@ @LIB_IPHLPAPI@ @SEARPC_LIBS@ @ZDB_LIBS@ \
- @LDAP_LIBS@
+ @LDAP_LIBS@ @JANSSON_LIBS@
ccnet_server_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@ @SERVER_PKG_RPATH@ -no-undefined
--
1.8.5.2

View File

@ -0,0 +1,36 @@
{stdenv, fetchurl, which, automake, autoconf, pkgconfig, libtool, vala, python, libsearpc, libzdb, libuuid, libevent, sqlite, openssl}:
stdenv.mkDerivation rec
{
version = "1.4.0";
seafileVersion = "2.1.1";
name = "ccnet-${version}";
src = fetchurl
{
url = "https://github.com/haiwen/ccnet/archive/v${seafileVersion}.tar.gz";
sha256 = "6882eb1a3066897e4f91fb60a3405b3f58b4b794334deaca73617003f77a7eb0";
};
patches = [ ./libccnet.pc.patch ./0001-Add-autoconfiguration-for-libjansson.patch ];
buildInputs = [ which automake autoconf pkgconfig libtool vala python ];
propagatedBuildInputs = [ libsearpc libzdb libuuid libevent sqlite openssl ];
preConfigure = ''
sed -ie 's|/bin/bash|/bin/sh|g' ./autogen.sh
./autogen.sh
'';
configureFlags = "--enable-server";
buildPhase = "make -j1";
meta =
{
homepage = "https://github.com/haiwen/ccnet";
description = "A framework for writing networked applications in C.";
license = stdenv.lib.licenses.gpl3Plus;
maintainers = [ stdenv.lib.maintainers.calrama ];
};
}

View File

@ -0,0 +1,10 @@
From: Aaron Lindsay <aaron@aclindsay.com>
--- a/libccnet.pc.in 2013-01-10 01:35:24.000000000 -0500
+++ b/libccnet.pc.in 2013-01-19 11:31:50.479301798 -0500
@@ -1,4 +1,4 @@
-prefix=(DESTDIR)@prefix@
+prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

View File

@ -562,6 +562,8 @@ let
catdoc = callPackage ../tools/text/catdoc { }; catdoc = callPackage ../tools/text/catdoc { };
ccnet = callPackage ../tools/networking/ccnet { };
ditaa = callPackage ../tools/graphics/ditaa { }; ditaa = callPackage ../tools/graphics/ditaa { };
direnv = callPackage ../tools/misc/direnv { }; direnv = callPackage ../tools/misc/direnv { };
@ -4943,6 +4945,8 @@ let
librsync = callPackage ../development/libraries/librsync { }; librsync = callPackage ../development/libraries/librsync { };
libsearpc = callPackage ../development/libraries/libsearpc { };
libsigcxx = callPackage ../development/libraries/libsigcxx { }; libsigcxx = callPackage ../development/libraries/libsigcxx { };
libsigcxx12 = callPackage ../development/libraries/libsigcxx/1.2.nix { }; libsigcxx12 = callPackage ../development/libraries/libsigcxx/1.2.nix { };
@ -5101,6 +5105,8 @@ let
libzip = callPackage ../development/libraries/libzip { }; libzip = callPackage ../development/libraries/libzip { };
libzdb = callPackage ../development/libraries/libzdb { };
libzrtpcpp = callPackage ../development/libraries/libzrtpcpp { }; libzrtpcpp = callPackage ../development/libraries/libzrtpcpp { };
libzrtpcpp_1_6 = callPackage ../development/libraries/libzrtpcpp/1.6.nix { libzrtpcpp_1_6 = callPackage ../development/libraries/libzrtpcpp/1.6.nix {
ccrtp = ccrtp_1_8; ccrtp = ccrtp_1_8;
@ -8706,6 +8712,8 @@ let
inherit (gnome) libart_lgpl; inherit (gnome) libart_lgpl;
}; };
seafileClient = callPackage ../applications/networking/seafile-client { };
seeks = callPackage ../tools/networking/p2p/seeks { seeks = callPackage ../tools/networking/p2p/seeks {
opencv = opencv_2_1; opencv = opencv_2_1;
}; };
@ -10227,6 +10235,8 @@ let
saneFrontends = callPackage ../applications/graphics/sane/frontends.nix { }; saneFrontends = callPackage ../applications/graphics/sane/frontends.nix { };
seafileShared = callPackage ../misc/seafile-shared { };
slock = callPackage ../misc/screensavers/slock { }; slock = callPackage ../misc/screensavers/slock { };
sourceAndTags = import ../misc/source-and-tags { sourceAndTags = import ../misc/source-and-tags {