summaryrefslogtreecommitdiff
path: root/libre/xarchiver/PKGBUILD
blob: 6045bfc4e7f179f85117a07be48742a6ba288bc4 (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
# 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 (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgbase=xarchiver
pkgname=(xarchiver xarchiver-gtk2)
pkgver=0.5.4.14
pkgrel=1
pkgrel+=.par1
pkgdesc="GTK+ frontend to various command line archivers"
pkgdesc+=", without nonfree unrar support"
arch=('x86_64')
arch+=('i686' 'armv7h')
url="https://github.com/ib/xarchiver"
license=('GPL')
depends=('gtk2' 'gtk3')
makedepends=('docbook-xsl' 'intltool' 'xmlto')
optdepends=('arj: ARJ support'
            'binutils: deb support'
            'bzip2: bzip2 support'
            'cpio: RPM support'
            'gzip: gzip support'
            'lha: LHA support'
            'lrzip: lrzip support'
            'lz4: LZ4 support'
            'lzip: lzip support'
            'lzop: LZOP support'
            'p7zip: 7z support'
            'tar: tar support'
            'unarchiver: RAR support'
            'unzip: ZIP support'
            'xz: xz support'
            'zip: ZIP support'
            'zstd: zstd support')
source=($pkgbase-$pkgver.tar.gz::https://github.com/ib/xarchiver/archive/$pkgver.tar.gz
        xarchiver.appdata.xml
        libre.patch)
sha256sums=('335bed86e10a1428d54196edf5c828e79ceed05049e83896114aa46f0a950a2f'
            '55f41aa0e5569b446933a34ac0585443fa5bd92f03f47e1fd53daf19905cc97e'
            '5a43941cfe10f37f62c56c592a04bd2eec7f2cca2ba1ce6d99312980c0c62aa6')

prepare() {
  cd $pkgbase-$pkgver

  # Remove nonfree unRAR support
  patch -p1 -i ../libre.patch

  ./autogen.sh
}

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

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

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

  cd gtk3
  make DESTDIR="$pkgdir" install
  install -Dm644 ../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
}

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

  cd gtk2
  make DESTDIR="$pkgdir" install
  # Ignore package by AppStream to avoid duplicated IDs
  echo 'X-AppStream-Ignore=true' >> "$pkgdir/usr/share/applications/xarchiver.desktop"
}