From 24a890829d6af952e3923ee2d72c2444185c36fa Mon Sep 17 00:00:00 2001 From: clsung Date: Tue, 22 Aug 2006 14:29:25 +0000 Subject: Add fusefs-sqlfs 20060811, SQLite backed FUSE file system. PR: ports/102271 Submitted by: Stanislav Sedov --- sysutils/fusefs-sqlfs/Makefile | 55 ++++++++++++++++++++++++++ sysutils/fusefs-sqlfs/distinfo | 3 ++ sysutils/fusefs-sqlfs/files/patch-fuse_main.c | 57 +++++++++++++++++++++++++++ sysutils/fusefs-sqlfs/pkg-descr | 9 +++++ sysutils/fusefs-sqlfs/pkg-message | 11 ++++++ 5 files changed, 135 insertions(+) create mode 100644 sysutils/fusefs-sqlfs/Makefile create mode 100644 sysutils/fusefs-sqlfs/distinfo create mode 100644 sysutils/fusefs-sqlfs/files/patch-fuse_main.c create mode 100644 sysutils/fusefs-sqlfs/pkg-descr create mode 100644 sysutils/fusefs-sqlfs/pkg-message (limited to 'sysutils/fusefs-sqlfs') diff --git a/sysutils/fusefs-sqlfs/Makefile b/sysutils/fusefs-sqlfs/Makefile new file mode 100644 index 000000000000..cbe6edb68c30 --- /dev/null +++ b/sysutils/fusefs-sqlfs/Makefile @@ -0,0 +1,55 @@ +# New ports collection makefile for: fusefs-sqlfs +# Date created: 2006-08-19 +# Whom: Stanislav Sedov +# +# $MBSDlabs$ +# $FreeBSD$ +# + +PORTNAME= sqlfs +PORTVERSION= 20060811 +CATEGORIES= sysutils +MASTER_SITES= http://www.palmsource.com/opensource/downloads/ +PKGNAMEPREFIX= fusefs- +DISTNAME= lib${PORTNAME}-${PORTVERSION} + +MAINTAINER= ssedov@mbsd.msk.ru +COMMENT= SQLite backed FUSE file system + +LIB_DEPENDS= fuse.2:${PORTSDIR}/sysutils/fusefs-libs +RUN_DEPENDS= ${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod + +USE_SQLITE= 3 +WRKSRC= ${WRKDIR}/${PORTNAME} + +.if !defined(NOPORTDOCS) +PORTDOCS= README +.endif + +PLIST_FILES= bin/sqlfs + +.include + +.if ${OSVERSION} < 600000 +IGNORE= depends on kernel module that requires FreeBSD 6 or later +.endif + +do-build: + (cd ${WRKSRC} && ${CC} -DFUSE -DFUSE_USE_VERSION=25 \ + -D_FILE_OFFSET_BITS=64 -D_REENTRANT ${CFLAGS} \ + -I${LOCALBASE}/include -I. -L${LOCALBASE}/lib \ + -lfuse -lsqlite${SQLITE_VER} ${PTHREAD_CFLAGS} \ + ${PTHREAD_LIBS} sqlfs.c fuse_main.c -o sqlfs) + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/sqlfs ${TARGETDIR}/bin/ + +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR}/ + ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/ +.endif + +post-install: + @${CAT} ${PKGMESSAGE} + +.include diff --git a/sysutils/fusefs-sqlfs/distinfo b/sysutils/fusefs-sqlfs/distinfo new file mode 100644 index 000000000000..5fefaa33a31e --- /dev/null +++ b/sysutils/fusefs-sqlfs/distinfo @@ -0,0 +1,3 @@ +MD5 (libsqlfs-20060811.tar.gz) = e93480a033f235b0ed5ce11406c2189c +SHA256 (libsqlfs-20060811.tar.gz) = ba193d2845cf53ee6452a86ecddbb0ad1b31e9f2e959ca6dc192823b59636adf +SIZE (libsqlfs-20060811.tar.gz) = 311832 diff --git a/sysutils/fusefs-sqlfs/files/patch-fuse_main.c b/sysutils/fusefs-sqlfs/files/patch-fuse_main.c new file mode 100644 index 000000000000..392f162a8767 --- /dev/null +++ b/sysutils/fusefs-sqlfs/files/patch-fuse_main.c @@ -0,0 +1,57 @@ +--- fuse_main.c.orig Sat Aug 12 01:46:18 2006 ++++ fuse_main.c Sat Aug 19 16:18:02 2006 +@@ -17,12 +17,52 @@ + + *****************************************************************************/ + ++#include ++#include ++#include + #include "sqlfs.h" + ++void usage() __dead2; ++ ++void usage() ++{ ++ fprintf(stderr, "Usage: %s -o dbname [-h]\n", getprogname()); ++ ++ exit(EX_USAGE); ++} + + int main(int argc, char **argv) + { +- sqlfs_init("/tmp/fsdata"); ++ char c; ++ int ret; ++ char *dbname = NULL; ++ ++ while ((c = getopt(argc, argv, "o:h")) != -1) ++ switch (c) { ++ case 'o': ++ dbname = optarg; ++ break; ++ case 'h': ++ /* FALLTHROUGH */ ++ default: ++ usage(); ++ /* NOTREACHED */ ++ } ++ argc -= optind; ++ argv += optind; ++ ++ if (dbname == NULL) ++ dbname = getenv("SQLFS_DBNAME"); ++ ++ if (dbname == NULL) ++ usage(); ++ /* NOTREACHED */ ++ ++ ret = sqlfs_init(dbname); ++ if (ret != 0) ++ return ret; + +- return sqlfs_fuse_main(argc, argv); ++ ret = sqlfs_fuse_main(argc, argv); ++ ++ return ret; + } diff --git a/sysutils/fusefs-sqlfs/pkg-descr b/sysutils/fusefs-sqlfs/pkg-descr new file mode 100644 index 000000000000..954b32d26c93 --- /dev/null +++ b/sysutils/fusefs-sqlfs/pkg-descr @@ -0,0 +1,9 @@ +The sqlfs filesystem implements a POSIX style file system on top of an SQLite +database. It allows applications to have access to a full read/write +file system in a single file, complete with its own file hierarchy and name +space. This is useful for applications which needs structured storage, such +as embedding documents within documents, or management of configuration +data or preferences. + +Author: Palmsource, Inc. An Access Company +WWW: http://www.palmsource.com/opensource/ diff --git a/sysutils/fusefs-sqlfs/pkg-message b/sysutils/fusefs-sqlfs/pkg-message new file mode 100644 index 000000000000..dacb37bc338c --- /dev/null +++ b/sysutils/fusefs-sqlfs/pkg-message @@ -0,0 +1,11 @@ +============================================================================== + +Now sqlfs filesystem is installed. +You can mount it by issuing +% sqlfs -o /path/to/sqlite/database /path/to/mountpoint + +Alternatively you can supply database name via SQLFS_DBNAME env variable + +For additional information see supplied documentation. + +============================================================================== -- cgit