summaryrefslogtreecommitdiff
path: root/libre/xarchiver-libre/PKGBUILD
blob: df6bfbca63e955784cab5a50722caff909ce2a4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# $Id: PKGBUILD 104651 2014-01-24 08:23:36Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Andrew Simmons <andrew.simmons@gmail.com>
# Maintainer (Parabola): André Silva <emulatorman@parabola.nu>

_pkgname=xarchiver
pkgname=xarchiver-libre
pkgver=0.5.2
pkgrel=6
pkgdesc="GTK+ frontend to various command line archivers, with unar support"
arch=('i686' 'x86_64' 'mips64el')
url="http://xarchiver.sourceforge.net/"
license=('GPL')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
replaces=("$_pkgname")
depends=('gtk2' 'desktop-file-utils')
makedepends=('intltool')
optdepends=('zip: ZIP support'
            'unzip: ZIP support'
            'unar: RAR support'
            'p7zip: 7z support'
            'arj: ARJ support'
            'lzop: LZOP support'
            'cpio: RPM support')
install=xarchiver.install
source=(http://downloads.sourceforge.net/xarchiver/xarchiver-$pkgver.tar.bz2
        xarchiver-0.5.2-no-donators-menu.patch
        xarchiver-0.5.2-add_xz_support.patch
        xarchiver-0.5.2-segfault-open-with.patch
        xarchiver-0.5.2-fix_7z_support.patch
        xarchiver-0.5.2-drag-n-drop_escaped_path.patch
        xarchiver-0.5.2-fix-double-escaping.patch
        xarchiver-0.5.2-fix-non-existent-archive.patch
        xarchiver-0.5.2-segfault-delete-file.patch
        xarchiver-0.5.2-segfault-password-protected.patch
        xarchiver-0.5.2-add_unar_support.patch
        xarchiver-0.5.2-add_mime_types.patch)
md5sums=('2bc7f06403cc6582dd4a8029ec9d038d'
         '7ef9fe9aee9f0fbc141ed9683e91ea1c'
         '5d5ef8dd1b8b7790af4ece5fcedcd370'
         'f9036a44157b318cbc59ed012b04974b'
         '782f55c1f1021dc02c7739bf8a47336e'
         'fcd9e04222c5e0ef459977bd7cd0ae4e'
         '6178d7ab679b761469c880a8db991907'
         '22ed2783e72684a102243c5834bf5ca3'
         'e518b1e0bc4407383aae2783c0c19a04'
         'c46daf2ee9fce7ece608eca33174db6b'
         '13c133a6ba867425b9a8a13900664d18'
         '36a4c3181230aab1e0ce1596acc5ef88')

prepare() {
  cd $_pkgname-$pkgver

  # Fix donators menu item (upstream patch)
  patch -Np2 -i ../xarchiver-0.5.2-no-donators-menu.patch

  # Add XZ support
  # http://sourceforge.net/p/xarchiver/bugs/28/
  patch -Np1 -i ../xarchiver-0.5.2-add_xz_support.patch

  # Fix segfault on open with dialog
  # http://sourceforge.net/p/xarchiver/bugs/52/
  patch -Np1 -i ../xarchiver-0.5.2-segfault-open-with.patch

  # Fix 7z support
  # http://sourceforge.net/p/xarchiver/patches/5/
  patch -Np1 -i ../xarchiver-0.5.2-fix_7z_support.patch

  # Fix extraction when the Drag'n'Drop target path contains spaces
  patch -Np1 -i ../xarchiver-0.5.2-drag-n-drop_escaped_path.patch

  # Fix error when trying to create archives with spaces
  patch -Np1 -i ../xarchiver-0.5.2-fix-double-escaping.patch

  # Fix segfault when non-existent archive specified
  patch -Np1 -i ../xarchiver-0.5.2-fix-non-existent-archive.patch

  # Fix segfault when deleting a file
  patch -Np1 -i ../xarchiver-0.5.2-segfault-delete-file.patch

  # Fix segfault when handling password protected files
  patch -Np1 -i ../xarchiver-0.5.2-segfault-password-protected.patch

  # Add unar support
  patch -Np1 -i ../xarchiver-0.5.2-add_unar_support.patch

  # Add more MIME types in the desktop file
  patch -Np1 -i ../xarchiver-0.5.2-add_mime_types.patch

  # Update upstream URL
  find -type f | xargs sed -i 's|http://xarchiver.xfce.org|http://xarchiver.sf.net|'
}

build() {
  cd $_pkgname-$pkgver
  ./configure --prefix=/usr --libexecdir=/usr/lib/xfce4
  make
}

package() {
  cd $_pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}