PKGBUILD 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Maintainer (Arch): Balló György <ballogyor+arch at gmail dot com>
  2. # Contributor (Arch): Alexander Fehr <pizzapunk gmail com>
  3. # Contributor (Arch): Andrew Simmons <andrew.simmons@gmail.com>
  4. # Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
  5. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  6. pkgbase=xarchiver
  7. pkgname=(xarchiver xarchiver-gtk2)
  8. pkgver=0.5.4.14
  9. pkgrel=1
  10. pkgrel+=.par1
  11. pkgdesc="GTK+ frontend to various command line archivers"
  12. pkgdesc+=", without nonfree unrar support"
  13. arch=('x86_64')
  14. arch+=('i686' 'armv7h')
  15. url="https://github.com/ib/xarchiver"
  16. license=('GPL')
  17. depends=('gtk2' 'gtk3')
  18. makedepends=('docbook-xsl' 'intltool' 'xmlto')
  19. optdepends=('arj: ARJ support'
  20. 'binutils: deb support'
  21. 'bzip2: bzip2 support'
  22. 'cpio: RPM support'
  23. 'gzip: gzip support'
  24. 'lha: LHA support'
  25. 'lrzip: lrzip support'
  26. 'lz4: LZ4 support'
  27. 'lzip: lzip support'
  28. 'lzop: LZOP support'
  29. 'p7zip: 7z support'
  30. 'tar: tar support'
  31. 'unarchiver: RAR support'
  32. 'unzip: ZIP support'
  33. 'xz: xz support'
  34. 'zip: ZIP support'
  35. 'zstd: zstd support')
  36. source=($pkgbase-$pkgver.tar.gz::https://github.com/ib/xarchiver/archive/$pkgver.tar.gz
  37. xarchiver.appdata.xml
  38. libre.patch)
  39. sha256sums=('335bed86e10a1428d54196edf5c828e79ceed05049e83896114aa46f0a950a2f'
  40. '55f41aa0e5569b446933a34ac0585443fa5bd92f03f47e1fd53daf19905cc97e'
  41. '5a43941cfe10f37f62c56c592a04bd2eec7f2cca2ba1ce6d99312980c0c62aa6')
  42. prepare() {
  43. cd $pkgbase-$pkgver
  44. # Remove nonfree unRAR support
  45. patch -p1 -i ../libre.patch
  46. ./autogen.sh
  47. }
  48. build() {
  49. # GTK+ 3 version
  50. [ -d gtk3 ] || cp -r $pkgbase-$pkgver gtk3
  51. cd gtk3
  52. ./configure --prefix=/usr --libexecdir=/usr/lib/xfce4
  53. make -j1
  54. cd "$srcdir"
  55. # GTK+ 2 version
  56. [ -d gtk2 ] || cp -r $pkgbase-$pkgver gtk2
  57. cd gtk2
  58. ./configure --prefix=/usr --libexecdir=/usr/lib/xfce4 --enable-gtk2
  59. make -j1
  60. }
  61. package_xarchiver() {
  62. depends=('gtk3')
  63. conflicts=('xarchiver-libre')
  64. replaces=('xarchiver-libre')
  65. cd gtk3
  66. make DESTDIR="$pkgdir" install
  67. install -Dm644 ../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
  68. }
  69. package_xarchiver-gtk2() {
  70. pkgdesc+=' (GTK+ 2 version)'
  71. depends=('gtk2')
  72. conflicts=('xarchiver')
  73. cd gtk2
  74. make DESTDIR="$pkgdir" install
  75. # Ignore package by AppStream to avoid duplicated IDs
  76. echo 'X-AppStream-Ignore=true' >> "$pkgdir/usr/share/applications/xarchiver.desktop"
  77. }