diff options
author | 0strodamus | 2016-10-18 17:59:49 -0700 |
---|---|---|
committer | 0strodamus | 2016-10-18 17:59:49 -0700 |
commit | 3ea9768eae5a1dd618822c04e31a5979be11004a (patch) | |
tree | ad3d672523258f9119f2d8e3a1daec73bdd0dd3c | |
download | aur-3ea9768eae5a1dd618822c04e31a5979be11004a.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 38 | ||||
-rw-r--r-- | PKGBUILD | 68 | ||||
-rw-r--r-- | engrampa-1.16.0-changes.patch | 282 | ||||
-rwxr-xr-x | engrampa.tap | 47 | ||||
-rw-r--r-- | fr-rpm-bsdtar.patch | 60 |
5 files changed, 495 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6bef5df6ba91 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,38 @@ +# Generated by mksrcinfo v8 +# Wed Oct 19 00:58:23 UTC 2016 +pkgbase = engrampa-thunar-gtk2 + pkgdesc = Archive manipulator from MATE without Caja dependency (GTK2 version) + pkgver = 1.14.1 + pkgrel = 2 + url = http://mate-desktop.org + arch = i686 + arch = x86_64 + license = GPL + makedepends = intltool + makedepends = itstool + depends = gtk2 + depends = gzip + depends = libarchive + depends = tar + depends = unzip + depends = zip + optdepends = p7zip: 7Z and ARJ archive support + optdepends = unace: ACE archive support + optdepends = unrar: RAR archive support + optdepends = thunar-archive-plugin: create and extract archives in Thunar + provides = engrampa + conflicts = engrampa + conflicts = engrampa-dev + conflicts = engrampa-thunar + replaces = engrampa + source = http://pub.mate-desktop.org/releases/1.14/engrampa-1.14.1.tar.xz + source = fr-rpm-bsdtar.patch + source = engrampa.tap + source = engrampa-1.16.0-changes.patch + sha1sums = 1245f5203b37b842cfaf818781b17cd22f1234b1 + sha1sums = 219b05a979bf6f249aaae27964f02345fd81168d + sha1sums = 84f023a660c77cf046cff71d1d890f7de5af4110 + sha1sums = 75cef1a9940d317a18580151e64cd491cd238f56 + +pkgname = engrampa-thunar-gtk2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..632f567f7ee2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: 0strodamus <0strodamus at cox dot net> +# Contributor: Martin Wimpress <code@flexion.org> +# Contributor: Rob McCathie <korrode AT gmail> +# Contributor: n00b <dannyurvt (at) gmail.com> +# +# MATE Engrampa package: +# without Caja dependency and with Thunar integration +# with some non-GTK3 changes backported from subsequent upstream versions +# I'm not a developer, so don't expect too much. :) +# +# note: if you get "No suitable archive manager found" errors, you need +# to adjust Xfce Settings > MIME Type Editor associations for Engrampa + +pkgname=engrampa-thunar-gtk2 +_pkgname=engrampa +_ver=1.14 +pkgver=${_ver}.1 +pkgrel=2 +pkgdesc="Archive manipulator from MATE without Caja dependency (GTK2 version)" +url="http://mate-desktop.org" +arch=('i686' 'x86_64') +license=('GPL') +depends=('gtk2' 'gzip' 'libarchive' 'tar' 'unzip' 'zip') +makedepends=('intltool' 'itstool') +optdepends=('p7zip: 7Z and ARJ archive support' + 'unace: ACE archive support' + 'unrar: RAR archive support' + 'thunar-archive-plugin: create and extract archives in Thunar') +provides=('engrampa') +conflicts=('engrampa' 'engrampa-dev' 'engrampa-thunar') +replaces=('engrampa') +source=("http://pub.mate-desktop.org/releases/${_ver}/${_pkgname}-${pkgver}.tar.xz" + 'fr-rpm-bsdtar.patch' + 'engrampa.tap' + 'engrampa-1.16.0-changes.patch') +sha1sums=('1245f5203b37b842cfaf818781b17cd22f1234b1' + '219b05a979bf6f249aaae27964f02345fd81168d' + '84f023a660c77cf046cff71d1d890f7de5af4110' + '75cef1a9940d317a18580151e64cd491cd238f56') + +prepare() { + cd "${srcdir}/${_pkgname}-${pkgver}" + # this patch 'depends' on libarchive + patch -Np1 -i "${srcdir}/fr-rpm-bsdtar.patch" + # patch to apply some non-GTK3 changes from subsequent upstream versions + patch -Np1 -i "${srcdir}/engrampa-1.16.0-changes.patch" +} + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/${_pkgname} \ + --with-gtk=2.0 \ + --disable-packagekit \ + --disable-caja-actions -without-cajadir + + #https://bugzilla.gnome.org/show_bug.cgi?id=656231 + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -Dm755 ${srcdir}/engrampa.tap ${pkgdir}/usr/lib/xfce4/thunar-archive-plugin/engrampa.tap +} diff --git a/engrampa-1.16.0-changes.patch b/engrampa-1.16.0-changes.patch new file mode 100644 index 000000000000..9000eb5c7596 --- /dev/null +++ b/engrampa-1.16.0-changes.patch @@ -0,0 +1,282 @@ +diff -aur a/src/file-data.c b/src/file-data.c +--- a/src/file-data.c 2016-04-07 04:37:58.000000000 -0700 ++++ b/src/file-data.c 2016-07-28 00:24:43.000000000 -0700 +@@ -37,7 +37,7 @@ + fdata->content_type = NULL; + fdata->free_original_path = FALSE; + fdata->dir_size = 0; +- ++ + return fdata; + } + +@@ -54,6 +54,7 @@ + g_free (fdata->path); + g_free (fdata->link); + g_free (fdata->list_name); ++ g_free (fdata->sort_key); + g_free (fdata); + } + +@@ -67,7 +68,7 @@ + + fdata->original_path = g_strdup (src->original_path); + fdata->free_original_path = TRUE; +- ++ + fdata->full_path = g_strdup (src->full_path); + fdata->link = g_strdup (src->link); + fdata->size = src->size; +@@ -81,6 +82,7 @@ + + fdata->list_dir = src->list_dir; + fdata->list_name = g_strdup (src->list_name); ++ fdata->sort_key = g_strdup (src->sort_key); + + return fdata; + } +@@ -90,10 +92,10 @@ + file_data_get_type (void) + { + static GType type = 0; +- ++ + if (type == 0) + type = g_boxed_type_register_static ("FRFileData", (GBoxedCopyFunc) file_data_copy, (GBoxedFreeFunc) file_data_free); +- ++ + return type; + } + +@@ -101,10 +103,9 @@ + void + file_data_update_content_type (FileData *fdata) + { +- +- if (fdata->dir) ++ if (fdata->dir) + fdata->content_type = MIME_TYPE_DIRECTORY; +- else ++ else + fdata->content_type = get_static_string (g_content_type_guess (fdata->full_path, NULL, 0, NULL)); + } + +@@ -116,13 +117,28 @@ + } + + ++void ++file_data_set_list_name (FileData *fdata, ++ const char *value) ++{ ++ g_free (fdata->list_name); ++ fdata->list_name = g_strdup (value); ++ ++ g_free (fdata->sort_key); ++ if (fdata->list_name != NULL) ++ fdata->sort_key = g_utf8_collate_key_for_filename (fdata->list_name, -1); ++ else ++ fdata->sort_key = NULL; ++} ++ ++ + int + file_data_compare_by_path (gconstpointer a, + gconstpointer b) + { + FileData *data_a = *((FileData **) a); + FileData *data_b = *((FileData **) b); +- ++ + return strcmp (data_a->full_path, data_b->full_path); + } + +@@ -158,12 +174,12 @@ + } + + if (cmp == 0) +- return p; ++ return p; + else if (cmp < 0) + right = p; +- else ++ else + left = p + 1; + } +- ++ + return -1; + } +diff -aur a/src/file-data.h b/src/file-data.h +--- a/src/file-data.h 2016-04-07 04:37:58.000000000 -0700 ++++ b/src/file-data.h 2016-07-28 00:24:43.000000000 -0700 +@@ -40,13 +40,14 @@ + gboolean dir; /* Whether this is a directory listed in the archive */ + goffset dir_size; + const char *content_type; +- ++ + /* Additional data. */ + + gboolean list_dir; /* Whether this entry is used to show + * a directory. */ + char *list_name; /* The string visualized in the list + * view. */ ++ char *sort_key; + + /* Private data */ + +@@ -57,14 +58,15 @@ + + GType file_data_get_type (void); + FileData * file_data_new (void); +-FileData * file_data_copy (FileData *src); +-void file_data_free (FileData *fdata); +-void file_data_update_content_type (FileData *fdata); +-gboolean file_data_is_dir (FileData *fdata); +- +-int file_data_compare_by_path (gconstpointer a, +- gconstpointer b); +-int find_path_in_file_data_array (GPtrArray *array, +- const char *path); ++FileData * file_data_copy (FileData *src); ++void file_data_free (FileData *fdata); ++void file_data_update_content_type (FileData *fdata); ++gboolean file_data_is_dir (FileData *fdata); ++void file_data_set_list_name (FileData *fdata, ++ const char *value); ++int file_data_compare_by_path (gconstpointer a, ++ gconstpointer b); ++int find_path_in_file_data_array (GPtrArray *array, ++ const char *path); + + #endif /* FILE_DATA_H */ +diff -aur a/src/fr-command-7z.c b/src/fr-command-7z.c +--- a/src/fr-command-7z.c 2016-04-07 04:37:58.000000000 -0700 ++++ b/src/fr-command-7z.c 2016-09-13 21:04:59.000000000 -0700 +@@ -39,7 +39,8 @@ + static void fr_command_7z_class_init (FrCommand7zClass *class); + static void fr_command_7z_init (FrCommand *afile); + static void fr_command_7z_finalize (GObject *object); +-static gboolean spd_support; ++static gboolean spd_support = FALSE; ++static gboolean unexpected_end_of_archive = FALSE; + + /* Parent Class */ + +@@ -125,6 +126,9 @@ + comm->multi_volume = (strcmp (fields[1], "+") == 0); + g_strfreev (fields); + } ++ else if (strncmp (line, "Unexpected end of archive", 25) == 0) { ++ unexpected_end_of_archive = TRUE; ++ } + return; + } + +@@ -371,11 +375,20 @@ + if (from_file != NULL) + fr_process_add_arg_concat (comm->process, "-i@", from_file, NULL); + ++ if (from_file == NULL) ++ for (scan = file_list; scan; scan = scan->next) ++ /* Files prefixed with '@' need to be handled specially */ ++ if (g_str_has_prefix (scan->data, "@")) ++ fr_process_add_arg_concat (comm->process, "-i!", scan->data, NULL); ++ + fr_process_add_arg (comm->process, "--"); + fr_process_add_arg (comm->process, comm->filename); ++ + if (from_file == NULL) + for (scan = file_list; scan; scan = scan->next) +- fr_process_add_arg (comm->process, scan->data); ++ /* Skip files prefixed with '@', already added */ ++ if (!g_str_has_prefix (scan->data, "@")) ++ fr_process_add_arg (comm->process, scan->data); + + fr_process_end_command (comm->process); + } +@@ -399,11 +412,20 @@ + if (from_file != NULL) + fr_process_add_arg_concat (comm->process, "-i@", from_file, NULL); + ++ if (from_file == NULL) ++ for (scan = file_list; scan; scan = scan->next) ++ /* Files prefixed with '@' need to be handled specially */ ++ if (g_str_has_prefix (scan->data, "@")) ++ fr_process_add_arg_concat (comm->process, "-i!", scan->data, NULL); ++ + fr_process_add_arg (comm->process, "--"); + fr_process_add_arg (comm->process, comm->filename); ++ + if (from_file == NULL) + for (scan = file_list; scan; scan = scan->next) +- fr_process_add_arg (comm->process, scan->data); ++ /* Skip files prefixed with '@', already added */ ++ if (!g_str_has_prefix (scan->data, "@")) ++ fr_process_add_arg (comm->process, scan->data); + + fr_process_end_command (comm->process); + } +@@ -453,11 +475,22 @@ + if (from_file != NULL) + fr_process_add_arg_concat (comm->process, "-i@", from_file, NULL); + ++ if (from_file == NULL) ++ for (scan = file_list; scan; scan = scan->next) ++ /* Files prefixed with '@' need to be handled specially */ ++ if (g_str_has_prefix (scan->data, "@")) ++ fr_process_add_arg_concat (comm->process, "-i!", scan->data, NULL); ++ + fr_process_add_arg (comm->process, "--"); + fr_process_add_arg (comm->process, comm->filename); ++ + if (from_file == NULL) + for (scan = file_list; scan; scan = scan->next) +- fr_process_add_arg (comm->process, scan->data); ++ /* Skip files prefixed with '@', already added */ ++ if (!g_str_has_prefix (scan->data, "@")) ++ fr_process_add_arg (comm->process, scan->data); ++ ++ if (unexpected_end_of_archive) fr_process_set_ignore_error (comm->process, TRUE); + + fr_process_end_command (comm->process); + } +@@ -507,7 +540,7 @@ + return; + } + +- if (error->status <= 1) { ++ if ((error->status <= 1) || (unexpected_end_of_archive)) { + error->type = FR_PROC_ERROR_NONE; + } + else { +@@ -572,7 +605,8 @@ + if (is_mime_type (mime_type, "application/x-rar") + || is_mime_type (mime_type, "application/x-cbr")) + { +- if (! check_command || g_file_test ("/usr/lib/p7zip/Codecs/Rar29.so", G_FILE_TEST_EXISTS)) ++ if (! check_command || g_file_test ("/usr/lib/p7zip/Codecs/Rar29.so", G_FILE_TEST_EXISTS) || g_file_test ("/usr/lib/p7zip/Codecs/Rar.so", G_FILE_TEST_EXISTS) ++ || g_file_test ("/usr/libexec/p7zip/Codecs/Rar29.so", G_FILE_TEST_EXISTS) || g_file_test ("/usr/libexec/p7zip/Codecs/Rar.so", G_FILE_TEST_EXISTS)) + capabilities |= FR_COMMAND_CAN_READ; + } + else +diff -aur a/src/fr-init.c b/src/fr-init.c +--- a/src/fr-init.c 2016-04-07 04:37:58.000000000 -0700 ++++ b/src/fr-init.c 2016-09-20 17:27:10.182630316 -0700 +@@ -342,6 +342,7 @@ + + register_command (FR_TYPE_COMMAND_TAR); + register_command (FR_TYPE_COMMAND_CFILE); ++ register_command (FR_TYPE_COMMAND_RAR); + register_command (FR_TYPE_COMMAND_7Z); + register_command (FR_TYPE_COMMAND_DPKG); + +@@ -353,7 +354,6 @@ + register_command (FR_TYPE_COMMAND_ISO); + register_command (FR_TYPE_COMMAND_JAR); + register_command (FR_TYPE_COMMAND_LHA); +- register_command (FR_TYPE_COMMAND_RAR); + register_command (FR_TYPE_COMMAND_RPM); + register_command (FR_TYPE_COMMAND_UNSTUFF); + register_command (FR_TYPE_COMMAND_ZIP); diff --git a/engrampa.tap b/engrampa.tap new file mode 100755 index 000000000000..628f2de6140f --- /dev/null +++ b/engrampa.tap @@ -0,0 +1,47 @@ +#!/bin/sh +# +# engrampa.tap - Wrapper script to create and extract archive files +# in Thunar, via the thunar-archive-plugin, using the +# engrampa archive manager. +# +# $Id: engrampa.tap 1468 2006-07-02 14:02:38Z benny $ +# +# Copyright (c) 2006 Benedikt Meurer <benny@xfce.org>. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place, Suite 330, Boston, MA 02111-1307 USA. +# + +# determine the action and the folder, $@ then contains only the files +action=$1; shift; +folder=$1; shift; + +# check the action +case $action in +create) + exec engrampa "--default-dir=$folder" --add "$@" + ;; + +extract-here) + exec engrampa "--extract-to=$folder" --force "$@" + ;; + +extract-to) + exec engrampa --extract "$@" + ;; + +*) + echo "Unsupported action '$action'" >&2 + exit 1 +esac diff --git a/fr-rpm-bsdtar.patch b/fr-rpm-bsdtar.patch new file mode 100644 index 000000000000..93a783176f3f --- /dev/null +++ b/fr-rpm-bsdtar.patch @@ -0,0 +1,60 @@ +This makes Engrampa use bsdtar to extract .RPM packages instead of using cpio. +It is useful on systems that do not have cpio or RPM/YUM +This patch was created for Arch Linux, however should work on any system that has bsdtar capable of handling cpio archives. + +------------------+ + rpm2cpio.c | 2 +- + fr-command-rpm.c | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +Index: src/commands/rpm2cpio.c +================================ +--- mate-file-archiver-1.6.0/src/commands/rpm2cpio.c 2013-03-31 ++++ mate-file-archiver-1.6.0/src/commands/rpm2cpio.c 2013-07-26 +@@ -128,7 +128,7 @@ + archive_command = "bzip2 -dc"; + fclose (stream); + +- command = g_strdup_printf ("sh -c \"dd if=%s ibs=%u skip=1 2>/dev/null | %s | cpio %s\"", g_shell_quote (filename), offset, archive_command, cpio_args->str); ++ command = g_strdup_printf ("sh -c \"dd if=%s ibs=%u skip=1 2>/dev/null | %s | bsdtar %s\"", g_shell_quote (filename), offset, archive_command, cpio_args->str); + + return system (command); + } +Index: src/fr-command-rpm.c +================================ +--- mate-file-archiver-1.6.0/src/fr-command-rpm.c 2013-03-31 ++++ mate-file-archiver-1.6.0/src/fr-command-rpm.c 2013-07-26 +@@ -175,7 +175,7 @@ + + fr_process_begin_command (comm->process, "sh"); + fr_process_add_arg (comm->process, "-c"); +- fr_process_add_arg_concat (comm->process, PRIVEXECDIR "rpm2cpio ", comm->e_filename, " -itv", NULL); ++ fr_process_add_arg_concat (comm->process, PRIVEXECDIR "rpm2cpio ", comm->e_filename, " -tvf -", NULL); + fr_process_end_command (comm->process); + fr_process_start (comm->process); + } +@@ -200,7 +200,7 @@ + + cmd = g_string_new (PRIVEXECDIR "rpm2cpio "); + g_string_append (cmd, comm->e_filename); +- g_string_append (cmd, " -idu "); ++ g_string_append (cmd, " -xf - "); + for (scan = file_list; scan; scan = scan->next) { + char *filename = g_shell_quote (scan->data); + g_string_append (cmd, filename); +@@ -233,7 +233,7 @@ + FrCommandCap capabilities; + + capabilities = FR_COMMAND_CAN_ARCHIVE_MANY_FILES; +- if (is_program_available ("cpio", check_command)) ++ if (is_program_available ("bsdtar", check_command)) + capabilities |= FR_COMMAND_CAN_READ; + + return capabilities; +@@ -244,7 +244,7 @@ + fr_command_rpm_get_packages (FrCommand *comm, + const char *mime_type) + { +- return PACKAGES ("cpio,rpm"); ++ return PACKAGES ("bsdtar,rpm"); + } |