summaryrefslogtreecommitdiff
path: root/libre/xarchiver/PKGBUILD
blob: df78babe2d4d63f5debcf558cd982d1f58d5beda (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
# $Id: PKGBUILD 153431 2015-12-16 15:22:16Z 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>

pkgbase=xarchiver
pkgname=(xarchiver xarchiver-gtk2)
pkgver=0.5.4.6
pkgrel=1.parabola1
pkgdesc="GTK+ frontend to various command line archivers, without nonfree unrar support"
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/ib/xarchiver"
license=('GPL')
depends=('gtk2' 'gtk3' 'desktop-file-utils')
makedepends=('docbook-xsl' 'intltool' 'xmlto')
optdepends=('zip: ZIP support'
            'unzip: ZIP support'
            'p7zip: 7z support'
            'lzop: LZOP support'
            'cpio: RPM support')
install=xarchiver.install
source=(https://github.com/ib/xarchiver/archive/$pkgbase-$pkgver.tar.gz
        0001-Add-support-for-GTK-3.patch
        0001-Fix-docbook-file.patch
        remove-nonfree-unrar-support.patch)
sha256sums=('5199670b435e9a25d33c6101b99f7bd64375377920d389a9a566d9ba72cc9f8b'
            '4ac66b7e23e714ed03fe377b2f8e494c6048a7a507bbc439fe2f081ba110021a'
            '12e4848f81d2532e93ee5bb0774334d176ad09462f07f16a0928558564fdf3a3'
            'b210b98fe60ffc50f6feac48b565dd1faa7e0f7adf14d7d7534089c3b32c9131')

prepare() {
  cd $pkgbase-$pkgbase-$pkgver

  # Add support for GTK+ 3
  patch -Np1 -i ../0001-Add-support-for-GTK-3.patch

  # Fix docbook file
  patch -Np1 -i ../0001-Fix-docbook-file.patch

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

  ./autogen.sh
}

build() {
  # GTK+ 3 version
  [ -d gtk3 ] || cp -r $pkgbase-$pkgbase-$pkgver gtk3
  cd gtk3
  ./configure --prefix=/usr --libexecdir=/usr/lib/xfce4
  make

  cd "$srcdir"
  # GTK+ 2 version
  [ -d gtk2 ] || cp -r $pkgbase-$pkgbase-$pkgver gtk2
  cd gtk2
  ./configure --prefix=/usr --libexecdir=/usr/lib/xfce4 --disable-gtk3
  make
}

package_xarchiver() {
  depends=('gtk3' 'desktop-file-utils')
  conflicts=('xarchiver-libre')
  replaces=('xarchiver-libre')

  cd gtk3
  make DESTDIR="$pkgdir" install
}

package_xarchiver-gtk2() {
  pkgdesc+=' (GTK+ 2 version)'
  depends=('gtk2' 'desktop-file-utils')
  conflicts=('xarchiver')

  cd gtk2
  make DESTDIR="$pkgdir" install
}