aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/archivemount/Makefile35
-rw-r--r--sysutils/archivemount/distinfo3
-rw-r--r--sysutils/archivemount/files/patch-Makefile13
-rw-r--r--sysutils/archivemount/files/patch-archivemount.c87
-rw-r--r--sysutils/archivemount/pkg-descr6
6 files changed, 145 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 91b7894e1e2b..a45e96743060 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -29,6 +29,7 @@
SUBDIR += apcupsd
SUBDIR += apt
SUBDIR += arcconf
+ SUBDIR += archivemount
SUBDIR += areca-cli
SUBDIR += asapm
SUBDIR += ascpu
diff --git a/sysutils/archivemount/Makefile b/sysutils/archivemount/Makefile
new file mode 100644
index 000000000000..e1b398bee441
--- /dev/null
+++ b/sysutils/archivemount/Makefile
@@ -0,0 +1,35 @@
+# New ports collection makefile for: archivemount
+# Date created: 2008-06-20
+# Whom: Evgeny Zhirnov <jirnov@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= archivemount
+PORTVERSION= 0.5.3
+CATEGORIES= sysutils
+MASTER_SITES= http://www.cybernoia.de/software/archivemount/
+
+MAINTAINER= jirnov@gmail.com
+COMMENT= Mount archives with FUSE
+
+BUILD_DEPENDS= ${LOCALBASE}/include/fuse.h:${PORTSDIR}/sysutils/fusefs-libs
+RUN_DEPENDS= ${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod
+
+PLIST_FILES= bin/archivemount
+
+NO_INSTALL_MANPAGES= yes
+USE_GMAKE= yes
+USE_ICONV= yes
+USE_GCC= 4.2+
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/archivemount ${PREFIX}/bin
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 600000 # Inherited from fusefs-kmod
+IGNORE= requires FreeBSD 6.x or above
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/archivemount/distinfo b/sysutils/archivemount/distinfo
new file mode 100644
index 000000000000..ecc6ca3aae7e
--- /dev/null
+++ b/sysutils/archivemount/distinfo
@@ -0,0 +1,3 @@
+MD5 (archivemount-0.5.3.tar.gz) = 1a3b2901388c4854199471e67c303797
+SHA256 (archivemount-0.5.3.tar.gz) = 5bcb193a753395f912bdccff6fd08018ae0fba253a97087bc717ccf87682815a
+SIZE (archivemount-0.5.3.tar.gz) = 20267
diff --git a/sysutils/archivemount/files/patch-Makefile b/sysutils/archivemount/files/patch-Makefile
new file mode 100644
index 000000000000..d26b4f547946
--- /dev/null
+++ b/sysutils/archivemount/files/patch-Makefile
@@ -0,0 +1,13 @@
+--- Makefile.orig 2006-12-28 18:32:47.000000000 +0300
++++ Makefile 2008-06-20 20:04:50.000000000 +0400
+@@ -12,8 +12,8 @@
+ CC = gcc
+ all: $(EXE)
+
+-CFLAGS += -D_FILE_OFFSET_BITS=64
+-LDFLAGS = -larchive -lfuse
++CFLAGS += -D_FILE_OFFSET_BITS=64 -I/usr/local/include/fuse
++LDFLAGS = -larchive -liconv -lfuse -pthread -L/usr/local/lib
+
+ ifeq ($(DEBUG),1)
+ CFLAGS += -ggdb -O0
diff --git a/sysutils/archivemount/files/patch-archivemount.c b/sysutils/archivemount/files/patch-archivemount.c
new file mode 100644
index 000000000000..0a505755f0b4
--- /dev/null
+++ b/sysutils/archivemount/files/patch-archivemount.c
@@ -0,0 +1,87 @@
+--- archivemount.c.orig 2006-12-28 18:32:47.000000000 +0300
++++ archivemount.c 2008-06-20 20:31:46.000000000 +0400
+@@ -19,7 +19,7 @@
+ #define _GNU_SOURCE 1
+ #endif
+
+-#define FUSE_USE_VERSION 22
++#define FUSE_USE_VERSION 25
+ #define MAXBUF 4096
+
+ #include <fuse.h>
+@@ -31,7 +31,9 @@
+ #include <fcntl.h>
+ #include <dirent.h>
+ #include <errno.h>
++#ifdef HAVE_STATFS
+ #include <sys/statfs.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <time.h>
+@@ -42,6 +44,7 @@
+ #include <wchar.h>
+ #include <archive.h>
+ #include <archive_entry.h>
++#include <limits.h>
+
+ /**********/
+ /* macros */
+@@ -433,9 +436,14 @@
+ strlen( P_tmpdir ) +
+ strlen( "_archivemount" ) +
+ strlen( tmppath ) + 8 );
+- sprintf( *location, "%s/archivemount%s_XXXXXX", P_tmpdir, tmppath );
++ sprintf( *location, "/tmp/archivemount%s_XXXXXX", tmppath );
+ free( tmppath );
+- if( ( fh = mkstemp( *location ) == -1 ) ) {
++
++ char bsdLocation[PATH_MAX];
++
++ strcpy(bsdLocation, *location);
++
++ if( ( fh = mkstemp(bsdLocation ) == -1 ) ) {
+ log( "Could not create temp file name %s: %s",
+ *location, strerror( errno ) );
+ free( *location );
+@@ -1449,7 +1457,13 @@
+ return tmp;
+ }
+ /* create temp file */
+- if( mknod( location, mode, rdev ) == -1 ) {
++ if (S_ISREG( mode )) {
++ tmp = open( location, O_CREAT | O_EXCL | O_WRONLY, mode );
++ } else if (S_ISFIFO( mode ))
++ tmp = mkfifo( location, mode );
++ else
++ tmp = mknod( location, mode, rdev );
++ if( tmp == -1 ) {
+ log( "Could not create temporary file %s: %s",
+ location, strerror( errno ) );
+ free( location );
+@@ -1604,6 +1618,7 @@
+ return 0;
+ }
+
++#ifdef HAVE_STATFS
+ static int
+ ar_statfs( const char *path, struct statfs *stbuf )
+ {
+@@ -1613,6 +1628,7 @@
+
+ return -ENOSYS;
+ }
++#endif
+
+ static int
+ ar_rename( const char *from, const char *to )
+@@ -1753,7 +1769,9 @@
+ .open = ar_open,
+ .read = ar_read,
+ .write = ar_write,
++#ifdef HAVE_STATFS
+ .statfs = ar_statfs,
++#endif
+ .release = ar_release,
+ .fsync = ar_fsync,
+ /*
diff --git a/sysutils/archivemount/pkg-descr b/sysutils/archivemount/pkg-descr
new file mode 100644
index 000000000000..21dfc6e9b54b
--- /dev/null
+++ b/sysutils/archivemount/pkg-descr
@@ -0,0 +1,6 @@
+Archivemount is a piece of glue code between libarchive
+(http://people.freebsd.org/~kientzle/libarchive/) and FUSE
+(http://fuse.sourceforge.net). It can be used to mount a (possibly compressed)
+archive (as in .tar.gz or .tar.bz2) and use it like an ordinary filesystem.
+
+WWW: http://www.cybernoia.de/software/archivemount/