diff options
author | clsung <clsung@FreeBSD.org> | 2006-08-22 22:29:25 +0800 |
---|---|---|
committer | clsung <clsung@FreeBSD.org> | 2006-08-22 22:29:25 +0800 |
commit | 24a890829d6af952e3923ee2d72c2444185c36fa (patch) | |
tree | 8d2e8d33f44d3f0478596736e9dafaff6640ad52 /sysutils/fusefs-sqlfs | |
parent | 794204ba0dad2213a9f6c9f76c77064b9508d935 (diff) | |
download | freebsd-ports-gnome-24a890829d6af952e3923ee2d72c2444185c36fa.tar.gz freebsd-ports-gnome-24a890829d6af952e3923ee2d72c2444185c36fa.tar.zst freebsd-ports-gnome-24a890829d6af952e3923ee2d72c2444185c36fa.zip |
Add fusefs-sqlfs 20060811, SQLite backed FUSE file system.
PR: ports/102271
Submitted by: Stanislav Sedov <ssedov at mbsd.msk.ru>
Diffstat (limited to 'sysutils/fusefs-sqlfs')
-rw-r--r-- | sysutils/fusefs-sqlfs/Makefile | 55 | ||||
-rw-r--r-- | sysutils/fusefs-sqlfs/distinfo | 3 | ||||
-rw-r--r-- | sysutils/fusefs-sqlfs/files/patch-fuse_main.c | 57 | ||||
-rw-r--r-- | sysutils/fusefs-sqlfs/pkg-descr | 9 | ||||
-rw-r--r-- | sysutils/fusefs-sqlfs/pkg-message | 11 |
5 files changed, 135 insertions, 0 deletions
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 <ssedov@mbsd.msk.ru> +# +# $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 <bsd.port.pre.mk> + +.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 <bsd.port.post.mk> 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 <stdlib.h> ++#include <stdio.h> ++#include <sysexits.h> + #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. + +============================================================================== |