summaryrefslogtreecommitdiff
path: root/sysutils/gnome-mount
diff options
context:
space:
mode:
authorjmcneill <jmcneill>2008-11-22 17:54:42 +0000
committerjmcneill <jmcneill>2008-11-22 17:54:42 +0000
commit32aff7af81efe0b2b554a67434bdc53fecc843ed (patch)
treeb6dde82acbd28a40dba7407ece33e0bfb92772a4 /sysutils/gnome-mount
parentc90bd232b9439a06023d66b33c6e0b6725af8f15 (diff)
downloadpkgsrc-32aff7af81efe0b2b554a67434bdc53fecc843ed.tar.gz
Import gnome-mount version 0.8.
The grand plan with gnome-mount is to get the appropriate GNOME software (such as gnome-volume-manager and gnome-vfs) to use this instead of invoking mount(1)/umount(1)/eject(1) / invoking methods on HAL directly. Included in gnome-mount is also gnome-umount and gnome-eject. All programs utilize the methods on HAL and as such run unprivileged. The rationale for gnome-mount is to have a centralized place (in gconf) where settings (e.g. mount options, mount location) are maintained.
Diffstat (limited to 'sysutils/gnome-mount')
-rw-r--r--sysutils/gnome-mount/DESCR10
-rw-r--r--sysutils/gnome-mount/Makefile27
-rw-r--r--sysutils/gnome-mount/PLIST37
-rw-r--r--sysutils/gnome-mount/distinfo8
-rw-r--r--sysutils/gnome-mount/patches/patch-aa98
-rw-r--r--sysutils/gnome-mount/patches/patch-ab126
-rw-r--r--sysutils/gnome-mount/patches/patch-ac13
7 files changed, 319 insertions, 0 deletions
diff --git a/sysutils/gnome-mount/DESCR b/sysutils/gnome-mount/DESCR
new file mode 100644
index 00000000000..a5051767671
--- /dev/null
+++ b/sysutils/gnome-mount/DESCR
@@ -0,0 +1,10 @@
+The grand plan with gnome-mount is to get the appropriate GNOME
+software (such as gnome-volume-manager and gnome-vfs) to use this
+instead of invoking mount(1)/umount(1)/eject(1) / invoking methods on
+HAL directly.
+
+Included in gnome-mount is also gnome-umount and gnome-eject. All
+programs utilize the methods on HAL and as such run unprivileged. The
+rationale for gnome-mount is to have a centralized place (in gconf)
+where settings (e.g. mount options, mount location) are
+maintained.
diff --git a/sysutils/gnome-mount/Makefile b/sysutils/gnome-mount/Makefile
new file mode 100644
index 00000000000..db0047eac80
--- /dev/null
+++ b/sysutils/gnome-mount/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/11/22 17:54:42 jmcneill Exp $
+#
+
+DISTNAME= gnome-mount-0.8
+CATEGORIES= sysutils gnome
+MASTER_SITES= http://hal.freedesktop.org/releases/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://hal.freedesktop.org/
+COMMENT= Programs for mounting, unmounting and ejecting storage devices
+
+GNU_CONFIGURE= YES
+USE_DIRS+= gnome2-1.5
+USE_PKGLOCALEDIR= YES
+USE_TOOLS+= gmake intltool msgfmt perl pkg-config
+USE_LIBTOOL= YES
+
+GCONF_SCHEMAS+= gnome-mount.schemas
+
+.include "../../devel/GConf/schemas.mk"
+.include "../../security/gnome-keyring/buildlink3.mk"
+.include "../../sysutils/dbus-glib/buildlink3.mk"
+.include "../../sysutils/hal/buildlink3.mk"
+.include "../../sysutils/libnotify/buildlink3.mk"
+.include "../../sysutils/nautilus/buildlink3.mk"
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/gnome-mount/PLIST b/sysutils/gnome-mount/PLIST
new file mode 100644
index 00000000000..d1406c4ec16
--- /dev/null
+++ b/sysutils/gnome-mount/PLIST
@@ -0,0 +1,37 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/11/22 17:54:42 jmcneill Exp $
+bin/gnome-eject
+bin/gnome-mount
+bin/gnome-umount
+lib/nautilus/extensions-2.0/libgnome-mount.la
+lib/pkgconfig/gnome-mount.pc
+man/man1/gnome-mount.1
+share/gconf/schemas/gnome-mount.schemas
+share/gnome-mount/gnome-mount-properties.glade
+share/locale/ar/LC_MESSAGES/gnome-mount.mo
+share/locale/be/LC_MESSAGES/gnome-mount.mo
+share/locale/be@latin/LC_MESSAGES/gnome-mount.mo
+share/locale/ca/LC_MESSAGES/gnome-mount.mo
+share/locale/da/LC_MESSAGES/gnome-mount.mo
+share/locale/dz/LC_MESSAGES/gnome-mount.mo
+share/locale/el/LC_MESSAGES/gnome-mount.mo
+share/locale/en_GB/LC_MESSAGES/gnome-mount.mo
+share/locale/es/LC_MESSAGES/gnome-mount.mo
+share/locale/fi/LC_MESSAGES/gnome-mount.mo
+share/locale/fr/LC_MESSAGES/gnome-mount.mo
+share/locale/hu/LC_MESSAGES/gnome-mount.mo
+share/locale/it/LC_MESSAGES/gnome-mount.mo
+share/locale/ja/LC_MESSAGES/gnome-mount.mo
+share/locale/lv/LC_MESSAGES/gnome-mount.mo
+share/locale/mk/LC_MESSAGES/gnome-mount.mo
+share/locale/nb/LC_MESSAGES/gnome-mount.mo
+share/locale/oc/LC_MESSAGES/gnome-mount.mo
+share/locale/pa/LC_MESSAGES/gnome-mount.mo
+share/locale/pl/LC_MESSAGES/gnome-mount.mo
+share/locale/pt/LC_MESSAGES/gnome-mount.mo
+share/locale/pt_BR/LC_MESSAGES/gnome-mount.mo
+share/locale/ru/LC_MESSAGES/gnome-mount.mo
+share/locale/sv/LC_MESSAGES/gnome-mount.mo
+share/locale/vi/LC_MESSAGES/gnome-mount.mo
+share/locale/zh_HK/LC_MESSAGES/gnome-mount.mo
+share/locale/zh_TW/LC_MESSAGES/gnome-mount.mo
+@dirrm share/gnome-mount
diff --git a/sysutils/gnome-mount/distinfo b/sysutils/gnome-mount/distinfo
new file mode 100644
index 00000000000..4ccc893d019
--- /dev/null
+++ b/sysutils/gnome-mount/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/11/22 17:54:42 jmcneill Exp $
+
+SHA1 (gnome-mount-0.8.tar.gz) = 846ba178cf9009f3e32c7f55f912b3ca6b9ecedb
+RMD160 (gnome-mount-0.8.tar.gz) = 003800eda3edb7747714b1002bd1a1b50ea44fe9
+Size (gnome-mount-0.8.tar.gz) = 505788 bytes
+SHA1 (patch-aa) = f80152c75eef7963dff5ec557d8ff26fd3242b4c
+SHA1 (patch-ab) = c3f771562e599ddfd7abd15466995d78172704f4
+SHA1 (patch-ac) = 026448555bd9710cda343b6573260e3dcaa28b20
diff --git a/sysutils/gnome-mount/patches/patch-aa b/sysutils/gnome-mount/patches/patch-aa
new file mode 100644
index 00000000000..098507d0904
--- /dev/null
+++ b/sysutils/gnome-mount/patches/patch-aa
@@ -0,0 +1,98 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/11/22 17:54:42 jmcneill Exp $
+
+--- src/gnome-mount-properties-view.c.orig 2008-02-25 16:55:05.000000000 -0500
++++ src/gnome-mount-properties-view.c
+@@ -35,7 +35,7 @@
+ #include <string.h>
+ #include <gconf/gconf-client.h>
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <fstab.h>
+ #include <sys/param.h>
+ #include <sys/ucred.h>
+@@ -59,6 +59,30 @@ struct _GnomeMountPropertiesViewClass {
+ GtkVBoxClass base_class;
+ };
+
++#ifdef __NetBSD__
++static struct opt {
++ int o_opt;
++ const char *o_name;
++} optnames[] = {
++ { MNT_ASYNC, "async" },
++ { MNT_NOCOREDUMP, "nocoredump" },
++ { MNT_NODEV, "nodev" },
++ { MNT_NODEVMTIME, "nodevmtime" },
++ { MNT_NOEXEC, "noexec" },
++ { MNT_NOSUID, "nosuid" },
++ { MNT_RDONLY, "rdonly" },
++ { MNT_SYNCHRONOUS, "sync" },
++ { MNT_UNION, "union" },
++ { MNT_NOATIME, "noatime" },
++ { MNT_SYMPERM, "symperm" },
++ { MNT_SOFTDEP, "softdep" },
++#ifdef MNT_LOG
++ { MNT_LOG, "log" },
++#endif
++ { MNT_IGNORE, "hidden" },
++ { 0, NULL }
++};
++#endif
+ #ifdef __FreeBSD__
+ static struct opt {
+ int o_opt;
+@@ -345,6 +369,14 @@ struct mtab_handle
+ int iter;
+ };
+ #endif
++#ifdef __NetBSD__
++struct mtab_handle
++{
++ struct statvfs *mounts;
++ int n_mounts;
++ int iter;
++};
++#endif
+
+ /* borrowed from gtk/gtkfilesystemunix.c in GTK+ on 02/23/2006 */
+ static void
+@@ -454,7 +486,7 @@ out:
+ static gboolean
+ mtab_open (gpointer *handle)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ struct mtab_handle *mtab;
+
+ mtab = g_new0 (struct mtab_handle, 1);
+@@ -475,7 +507,7 @@ mtab_open (gpointer *handle)
+ static gboolean
+ mtab_next (gpointer handle, char **device_file, char **mount_options, char **mount_fstype)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ struct mtab_handle *mtab = handle;
+
+ if (mtab->iter < mtab->n_mounts) {
+@@ -484,7 +516,11 @@ mtab_next (gpointer handle, char **devic
+ GString *optstr;
+
+ optstr = g_string_new("");
++#if defined(__NetBSD__)
++ flags = mtab->mounts[mtab->iter].f_flag & MNT_VISFLAGMASK;
++#else
+ flags = mtab->mounts[mtab->iter].f_flags & MNT_VISFLAGMASK;
++#endif
+
+ for (o = optnames; flags && o->o_opt; o++) {
+ if (flags & o->o_opt) {
+@@ -517,7 +553,7 @@ mtab_next (gpointer handle, char **devic
+ static void
+ mtab_close (gpointer handle)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ g_free (handle);
+ #else
+ fclose (handle);
diff --git a/sysutils/gnome-mount/patches/patch-ab b/sysutils/gnome-mount/patches/patch-ab
new file mode 100644
index 00000000000..34297894584
--- /dev/null
+++ b/sysutils/gnome-mount/patches/patch-ab
@@ -0,0 +1,126 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/11/22 17:54:42 jmcneill Exp $
+
+--- src/gnome-mount.c.orig 2008-04-16 19:41:32.000000000 -0400
++++ src/gnome-mount.c
+@@ -31,6 +31,10 @@
+ #include <string.h>
+ #include <stdlib.h>
+
++#ifdef __NetBSD__
++#include <locale.h>
++#endif
++
+ #include <dbus/dbus.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+ #include <libhal.h>
+@@ -51,9 +55,9 @@
+ #define NOTIFY_EXPIRES_DEFAULT -1
+ #endif
+
+-#if !defined(sun) && !defined(__FreeBSD__)
++#if !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <mntent.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <fstab.h>
+ #include <sys/param.h>
+ #include <sys/ucred.h>
+@@ -677,7 +681,7 @@ static char *
+ get_mntent_mount_point(const char *device_file)
+ {
+ char *mount_point;
+-#if! defined(sun) && !defined(__FreeBSD__)
++#if! defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ FILE *f;
+ struct mntent mnt;
+ struct mntent *mnte;
+@@ -686,6 +690,10 @@ get_mntent_mount_point(const char *devic
+ struct statfs *mounts;
+ int n_mounts;
+ int i;
++#elif defined(__NetBSD__)
++ struct statvfs *mounts;
++ int n_mounts;
++ int i;
+ #elif defined(sun)
+ FILE *f;
+ struct mnttab mnt;
+@@ -694,7 +702,7 @@ get_mntent_mount_point(const char *devic
+
+ mount_point = NULL;
+
+-#if !defined(sun) && !defined(__FreeBSD__)
++#if !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ if ((f = setmntent ("/proc/mounts", "r")) != NULL) {
+
+ while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
+@@ -717,13 +725,13 @@ get_mntent_mount_point(const char *devic
+ }
+ fclose(f);
+ }
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__)
+ n_mounts = getmntinfo(&mounts, MNT_NOWAIT);
+ for (i = 0; i < n_mounts; i++) {
+ if (!strcmp(mounts[i].f_mntfromname, device_file))
+ mount_point = g_strdup (mounts[i].f_mntonname);
+ }
+-#endif /* sun && __FreeBSD__ */
++#endif /* sun && __FreeBSD__ && __NetBSD__ */
+
+ out:
+ return (mount_point);
+@@ -862,7 +870,7 @@ out:
+ static gboolean
+ fstab_open (gpointer *handle)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ return setfsent () == 1;
+ #else
+ *handle = fopen ("/etc/fstab", "r");
+@@ -873,7 +881,7 @@ fstab_open (gpointer *handle)
+ static char *
+ fstab_next (gpointer handle, char **mount_point)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ struct fstab *fstab;
+
+ fstab = getfsent ();
+@@ -901,7 +909,7 @@ fstab_next (gpointer handle, char **moun
+ static void
+ fstab_close (gpointer handle)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ endfsent ();
+ #else
+ fclose (handle);
+@@ -1116,7 +1124,7 @@ out:
+ return ret;
+ }
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #define MOUNT "/sbin/mount"
+ #define UMOUNT "/sbin/umount"
+ #else
+@@ -1451,7 +1459,7 @@ volume_mount (const char *udi, LibHalVol
+ if (volume == NULL && (mount_options->len == 0)) {
+ /* volume from a non-pollable drive, just set uid.. */
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ snprintf (uidbuf, sizeof (uidbuf) - 1, "uid=%u", getuid ());
+ #else
+ snprintf (uidbuf, sizeof (uidbuf) - 1, "-u=%u", getuid ());
+@@ -1482,7 +1490,7 @@ volume_mount (const char *udi, LibHalVol
+ g_debug ("read default option '%s' from gconf strlist key %s", option, key);
+
+ /* special workaround to replace "uid=" with "uid=<actual uid of caller>" */
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ if (strcmp (option, "uid=") == 0) {
+ g_free (option);
+ option = g_strdup_printf ("uid=%u", getuid ());
diff --git a/sysutils/gnome-mount/patches/patch-ac b/sysutils/gnome-mount/patches/patch-ac
new file mode 100644
index 00000000000..9f6899c5c74
--- /dev/null
+++ b/sysutils/gnome-mount/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2008/11/22 17:54:42 jmcneill Exp $
+
+--- Makefile.in.orig 2008-11-22 12:44:39.000000000 -0500
++++ Makefile.in
+@@ -248,7 +248,7 @@ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUBDIRS = src po
+-schemadir = $(sysconfdir)/gconf/schemas
++schemadir = $(datadir)/gconf/schemas
+ schema_in_files = gnome-mount.schemas.in
+ schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+ pkgconfigdir = $(libdir)/pkgconfig