summaryrefslogtreecommitdiff
path: root/libre/xarchiver/PKGBUILD
blob: c50f53572114b29205ccf60fe802ec0f1840d9b1 (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
# $Id: PKGBUILD 119883 2014-09-30 14:21:21Z bgyorgy $
# Maintainer (Arch): Balló György <ballogyor+arch at gmail dot com>
# Contributor (Arch): Alexander Fehr <pizzapunk gmail com>
# Contributor (Arch): Andrew Simmons <andrew.simmons@gmail.com>
# Maintainer: André Silva <emulatorman@parabola.nu>

pkgname=xarchiver
pkgver=0.5.4
pkgrel=1.parabola1
pkgdesc="GTK+ frontend to various command line archivers, without nonfree unrar support"
arch=('i686' 'x86_64' 'mips64el')
url="http://xarchiver.sourceforge.net/"
license=('GPL')
conflicts=("${pkgname}-libre")
replaces=("${pkgname}-libre")
depends=('gtk2' 'desktop-file-utils')
makedepends=('intltool')
optdepends=('zip: ZIP support'
            'unzip: ZIP 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
        fix-rpm-support.patch
        fix-password-protected.patch
        add-mime-types.patch
        remove-nonfree-unrar-support.patch)
md5sums=('1b4cd37a6af03afc957a8e307417e8d0'
         '812b93339f5e3332621f3c5abebfe277'
         '35ab96d98521a0a36f3e9e9ec0969107'
         '0cee887b3c989ba2cdce9154813843fb'
         '064ec8984be6e0e7bbf20c435a9f4ef0')

prepare() {
  cd $pkgname-$pkgver

  # Fix RPM support
  patch -Np1 -i ../fix-rpm-support.patch

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

  # Add more MIME types in the desktop file
  patch -Np1 -i ../add-mime-types.patch

  # Remove nonfree unRAR support
  patch -Np1 -i ../remove-nonfree-unrar-support.patch
  rm -v src/rar.{c,h}

  # Fix po files
  cd po
  for file in *.po; do
    intltool-update ${file%.*}
    msgattrib --no-obsolete -o $file $file
  done
}

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

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