summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuflone2019-04-13 15:53:42 +0200
committerMuflone2019-04-13 15:53:42 +0200
commitafd2a62c7f2f58197417a0eb90510613c4c938c8 (patch)
treef23935123d8dd6c0b5c9f415a958579558f38166
downloadaur-afd2a62c7f2f58197417a0eb90510613c4c938c8.tar.gz
Dropped package netactview 0.6.4-5 from community
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD59
-rw-r--r--drop-gconf.patch76
-rw-r--r--drop-libgnome.patch135
-rw-r--r--netactview_polkit2
-rw-r--r--org.archlinux.pkexec.netactview.policy18
6 files changed, 315 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6fa6f6ee7a56
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = netactview
+ pkgdesc = A graphical network connections viewer similar in functionality to netstat
+ pkgver = 0.6.4
+ pkgrel = 5
+ url = http://netactview.sourceforge.net/index.html
+ arch = x86_64
+ license = GPL
+ makedepends = intltool
+ makedepends = polkit
+ depends = libglade
+ depends = libgtop
+ optdepends = polkit: restart the application as root
+ source = https://downloads.sourceforge.net/netactview/netactview-0.6.4.tar.bz2
+ source = drop-libgnome.patch
+ source = drop-gconf.patch
+ source = netactview_polkit
+ source = org.archlinux.pkexec.netactview.policy
+ sha256sums = 0cfe68e90862b10a19ab2cc4977a079887eeda00e4069a819c13ece90843fb4a
+ sha256sums = e5359685c785427c812fd285b1eda3465e27120c186eae35a926881be1985df9
+ sha256sums = 0f07529a186dbdb553dd37465ba4904969b3fb03df42fe4f7c90c3a32a4055e4
+ sha256sums = 8d5319635ce05be5e5f3a426e81db34e0c2613010575bb7b3682bb2ae34fdd36
+ sha256sums = 467aa93ad28849061bfd1ea07698cc0154bef0a5a98e4c384260fc53e03b877c
+
+pkgname = netactview
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f84d61a3504c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Muflone http://www.muflone.com/contacts/english/
+# Contributor: lp76 <l.peduto@gmail.com>
+
+pkgname=netactview
+pkgver=0.6.4
+pkgrel=5
+pkgdesc="A graphical network connections viewer similar in functionality to netstat"
+arch=('x86_64')
+url="http://netactview.sourceforge.net/index.html"
+license=('GPL')
+depends=('libglade' 'libgtop')
+makedepends=('intltool' 'polkit')
+optdepends=('polkit: restart the application as root')
+source=("https://downloads.sourceforge.net/netactview/${pkgname}-${pkgver}.tar.bz2"
+ 'drop-libgnome.patch'
+ 'drop-gconf.patch'
+ 'netactview_polkit'
+ 'org.archlinux.pkexec.netactview.policy')
+sha256sums=('0cfe68e90862b10a19ab2cc4977a079887eeda00e4069a819c13ece90843fb4a'
+ 'e5359685c785427c812fd285b1eda3465e27120c186eae35a926881be1985df9'
+ '0f07529a186dbdb553dd37465ba4904969b3fb03df42fe4f7c90c3a32a4055e4'
+ '8d5319635ce05be5e5f3a426e81db34e0c2613010575bb7b3682bb2ae34fdd36'
+ '467aa93ad28849061bfd1ea07698cc0154bef0a5a98e4c384260fc53e03b877c')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+
+ # Remove libgnome dependency
+ patch -Np1 -i ../drop-libgnome.patch
+
+ # Remove gconf dependency
+ patch -Np1 -i ../drop-gconf.patch
+
+ # Use pkexec instead of gksu
+ sed -i 's/\[gksu\]/\[pkexec\]/' configure.ac
+ sed -i 's|GKSU_PATH, EXECUTABLE_PATH|"/usr/bin/netactview_polkit"|
+ s/install gksu/install polkit/' src/mainwindow.c
+
+ autoreconf -fi
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # Polkit policy
+ install -Dm644 "${srcdir}/org.archlinux.pkexec.netactview.policy" \
+ "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.netactview.policy"
+
+ # Launcher script
+ install -Dm755 "${srcdir}/netactview_polkit" \
+ "${pkgdir}/usr/bin/netactview_polkit"
+}
diff --git a/drop-gconf.patch b/drop-gconf.patch
new file mode 100644
index 000000000000..64d06ced39a2
--- /dev/null
+++ b/drop-gconf.patch
@@ -0,0 +1,76 @@
+diff -Naur netactview-0.6.4.orig/configure.ac netactview-0.6.4/configure.ac
+--- netactview-0.6.4.orig/configure.ac 2018-09-12 15:12:32.807073000 +0200
++++ netactview-0.6.4/configure.ac 2018-09-12 15:14:11.836589749 +0200
+@@ -25,7 +25,7 @@
+ AM_GLIB_GNU_GETTEXT
+
+
+-PKG_CHECK_MODULES(NETACTVIEW, [gtk+-2.0 >= 2.8 libglade-2.0 gthread-2.0 glib-2.0 >= 2.8 gconf-2.0 libgtop-2.0 >= 2.12])
++PKG_CHECK_MODULES(NETACTVIEW, [gtk+-2.0 >= 2.8 libglade-2.0 gthread-2.0 glib-2.0 >= 2.8 libgtop-2.0 >= 2.12])
+ AC_SUBST(NETACTVIEW_CFLAGS)
+ AC_SUBST(NETACTVIEW_LIBS)
+
+diff -Naur netactview-0.6.4.orig/src/mainwindow.c netactview-0.6.4/src/mainwindow.c
+--- netactview-0.6.4.orig/src/mainwindow.c 2018-09-12 15:12:32.827074000 +0200
++++ netactview-0.6.4/src/mainwindow.c 2018-09-12 15:16:06.949901211 +0200
+@@ -40,7 +40,6 @@
+ #include <glade/glade.h>
+ #include <gdk/gdkkeysyms.h>
+ #include <glib/gi18n.h>
+-#include <gconf/gconf-client.h>
+
+
+ /*Column data types as used by compare functions*/
+@@ -172,7 +171,6 @@
+
+ int columns_initial_view_order[MVC_VIEW_COLUMNSNUMBER]; /* [position] = index. */
+
+- char *default_fixed_font;
+ gboolean first_refresh, manual_refresh;
+
+ int window_width, window_height, initial_window_width, initial_window_height;
+@@ -2430,19 +2428,6 @@
+ return FALSE;
+ }
+
+-static void gconf_load ()
+-{
+- GConfClient *conf = gconf_client_get_default();
+-
+- Mwd.default_fixed_font = gconf_client_get_string (conf,
+- "/desktop/gnome/interface/monospace_font_name", NULL);
+- if (Mwd.default_fixed_font == NULL)
+- Mwd.default_fixed_font = g_strdup("Monospace 10");
+-
+- g_object_unref(conf);
+-
+-}
+-
+
+ static void connect_signals (GtkWidget *window)
+ {
+@@ -2586,7 +2571,7 @@
+ label = GTK_LABEL(gtk_label_new(text));
+ gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+
+- font_desc = pango_font_description_from_string(Mwd.default_fixed_font);
++ font_desc = pango_font_description_from_string("Monospace 10");
+ if (font_desc != NULL)
+ {
+ gtk_widget_modify_font(GTK_WIDGET(label), font_desc);
+@@ -2634,7 +2619,6 @@
+ Mwd.connections = g_array_sized_new(FALSE, TRUE, sizeof(NetConnection*), 16);
+
+ load_preferences();
+- gconf_load();
+
+ init_controls();
+ setup_status_bar();
+@@ -2684,7 +2668,6 @@
+
+ FreeFilterData();
+ g_string_free(Mwd.filter, TRUE);
+- g_free(Mwd.default_fixed_font);
+ }
+
+
diff --git a/drop-libgnome.patch b/drop-libgnome.patch
new file mode 100644
index 000000000000..959e03127587
--- /dev/null
+++ b/drop-libgnome.patch
@@ -0,0 +1,135 @@
+diff -Naur netactview-0.6.4.orig/configure.ac netactview-0.6.4/configure.ac
+--- netactview-0.6.4.orig/configure.ac 2015-03-12 11:34:12.000000000 +0100
++++ netactview-0.6.4/configure.ac 2017-01-21 03:23:18.306420114 +0100
+@@ -25,7 +25,7 @@
+ AM_GLIB_GNU_GETTEXT
+
+
+-PKG_CHECK_MODULES(NETACTVIEW, [gtk+-2.0 >= 2.8 libglade-2.0 gnome-vfs-2.0 >= 2.4 glib-2.0 >= 2.8 libgnome-2.0 gconf-2.0 libgtop-2.0 >= 2.12])
++PKG_CHECK_MODULES(NETACTVIEW, [gtk+-2.0 >= 2.8 libglade-2.0 gthread-2.0 glib-2.0 >= 2.8 gconf-2.0 libgtop-2.0 >= 2.12])
+ AC_SUBST(NETACTVIEW_CFLAGS)
+ AC_SUBST(NETACTVIEW_LIBS)
+
+diff -Naur netactview-0.6.4.orig/src/main.c netactview-0.6.4/src/main.c
+--- netactview-0.6.4.orig/src/main.c 2015-03-18 14:04:51.000000000 +0100
++++ netactview-0.6.4/src/main.c 2017-01-21 03:08:09.510451928 +0100
+@@ -27,9 +27,6 @@
+ #include <gtk/gtk.h>
+ #include <glade/glade.h>
+ #include <glib.h>
+-#include <libgnome/libgnome.h>
+-#include <libgnomevfs/gnome-vfs.h>
+-#include <libgnomevfs/gnome-vfs-utils.h>
+ #include <glib/gi18n.h>
+
+ #include "mainwindow.h"
+@@ -42,7 +39,7 @@
+ static void on_aboutdialog_url_activated (GtkAboutDialog *about, const gchar *url,
+ gpointer data)
+ {
+- gnome_vfs_url_show(url);
++ gtk_show_uri(NULL, url, GDK_CURRENT_TIME, NULL);
+ }
+
+ static void on_aboutdialog_email_activated (GtkAboutDialog *about, const gchar *url,
+@@ -50,7 +47,7 @@
+ {
+ GString *s = g_string_new("mailto:");
+ g_string_append(s, url);
+- gnome_vfs_url_show(s->str);
++ gtk_show_uri(NULL, s->str, GDK_CURRENT_TIME, NULL);
+ g_string_free(s, TRUE);
+ }
+
+@@ -59,7 +56,6 @@
+ main (int argc, char *argv[])
+ {
+ GtkWidget *window;
+- GnomeProgram *program;
+ GOptionContext *option_context;
+
+ g_type_init();
+@@ -75,12 +71,6 @@
+ option_context = g_option_context_new(_(" - view network connections"));
+
+ gtk_init(&argc, &argv);
+- program = gnome_program_init(PACKAGE, VERSION, LIBGNOME_MODULE, argc, argv,
+- GNOME_PARAM_GOPTION_CONTEXT, option_context,
+- GNOME_PROGRAM_STANDARD_PROPERTIES,
+- GNOME_PARAM_NONE);
+-
+- gnome_vfs_init();
+
+ gtk_about_dialog_set_url_hook(&on_aboutdialog_url_activated, NULL, NULL);
+ gtk_about_dialog_set_email_hook(&on_aboutdialog_email_activated, NULL, NULL);
+@@ -103,8 +93,6 @@
+ g_printerr("Error loading %s \nThe application might not be correctly installed.\n",
+ GLADEFILE);
+ }
+-
+- g_object_unref (program);
+
+ return 0;
+ }
+diff -Naur netactview-0.6.4.orig/src/mainwindow.c netactview-0.6.4/src/mainwindow.c
+--- netactview-0.6.4.orig/src/mainwindow.c 2015-03-25 08:49:56.000000000 +0100
++++ netactview-0.6.4/src/mainwindow.c 2017-01-21 03:40:26.925588908 +0100
+@@ -36,9 +36,6 @@
+
+ #include "config.h"
+
+-#include <libgnome/libgnome.h>
+-#include <libgnomevfs/gnome-vfs.h>
+-#include <libgnomevfs/gnome-vfs-utils.h>
+ #include <gtk/gtk.h>
+ #include <glade/glade.h>
+ #include <gdk/gdkkeysyms.h>
+@@ -1858,17 +1855,19 @@
+ static void on_menuWiki_activate (GtkMenuItem *menuitem, gpointer user_data)
+ {
+ const char *wikiURL = "http://netactview.sourceforge.net/wiki/";
+- GnomeVFSResult res = gnome_vfs_url_show(wikiURL);
+- if (res != GNOME_VFS_OK)
++ GError *error = NULL;
++ gtk_show_uri(NULL, wikiURL, GDK_CURRENT_TIME, &error);
++ if (error != NULL)
+ {
+ GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ _("Can't open wiki URL: \"%s\".\n"
+- "Please check that gnome vfs and mime configurations work "
++ "Please check that gvfs and mime configurations work "
+ "correctly with the default web browser."),
+ wikiURL);
+ gtk_dialog_run(GTK_DIALOG (dialog));
+ gtk_widget_destroy(dialog);
++ g_error_free(error);
+ }
+ }
+
+@@ -1907,13 +1906,13 @@
+ {
+ #ifdef HAVE_GKSU
+ GtkWidget *window = glade_xml_get_widget(GladeXml, "window");
+- char *execute_params[] = { GKSU_PATH, EXECUTABLE_PATH };
++ char *execute_params[] = { GKSU_PATH, EXECUTABLE_PATH, NULL };
+ int child_pid;
++ GError *error = NULL;
+ save_preferences();
+
+- child_pid = gnome_execute_async(NULL, sizeof(execute_params)/sizeof(char*),
+- execute_params);
+- if (child_pid < 0) /*error*/
++ g_spawn_async (NULL, execute_params, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error);
++ if (error != NULL) /*error*/
+ {
+ GtkWidget *dialog;
+ dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
+@@ -1922,6 +1921,7 @@
+ );
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
++ g_error_free (error);
+
+ }else /*close current instance*/
+ {
diff --git a/netactview_polkit b/netactview_polkit
new file mode 100644
index 000000000000..b2044a2d0a2e
--- /dev/null
+++ b/netactview_polkit
@@ -0,0 +1,2 @@
+#!/bin/bash
+pkexec --disable-internal-agent "/usr/bin/netactview" "$@"
diff --git a/org.archlinux.pkexec.netactview.policy b/org.archlinux.pkexec.netactview.policy
new file mode 100644
index 000000000000..b45e8550acc3
--- /dev/null
+++ b/org.archlinux.pkexec.netactview.policy
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+ <action id="org.archlinux.pkexec.netactview">
+ <message>Authentication is required to run Net Activity Viewer</message>
+ <icon_name>netactview</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/netactview</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
+