PKGBUILD 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Maintainer (arch): Evangelos Foutras <evangelos@foutrelis.com>
  2. # Contributor: Gaetan Bisson <bisson@archlinux.org>
  3. # Contributor: Thayer Williams <thayer@archlinux.org>
  4. # Contributor: Hugo Doria <hugo@archlinux.org>
  5. # Contributor: TuxSpirit<tuxspirit@archlinux.fr>
  6. # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
  7. # Contributor: André Silva <emulatorman@hyperbola.info>
  8. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  9. _pkgname=p7zip-libre
  10. pkgname=p7zip
  11. pkgver=17.04
  12. pkgrel=1
  13. pkgrel+=.parabola1
  14. pkgdesc="Command-line file archiver with high compression ratio"
  15. arch=('x86_64')
  16. arch+=('i686' 'armv7h')
  17. url="https://github.com/jinfeihan57/p7zip"
  18. license=('LGPL')
  19. conflicts=('p7zip-libre')
  20. replaces=('p7zip-libre')
  21. depends=('gcc-libs' 'sh')
  22. source=(https://github.com/jinfeihan57/p7zip/archive/v$pkgver/$pkgname-v$pkgver.tar.gz
  23. oemcp-iconv.patch::https://github.com/jinfeihan57/p7zip/commit/c104127e6a93.patch
  24. oemcp-cygwin.patch::https://github.com/jinfeihan57/p7zip/commit/0e0a1a8316b6.patch
  25. oemcp-apple.patch::https://github.com/jinfeihan57/p7zip/commit/334a01e3f8bc.patch
  26. libre.patch)
  27. sha256sums=('ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef'
  28. 'e32636aa03b9c75a2b9d9138e03a738ceed6ca5da4c3c67e7f5981e135fb9e24'
  29. 'fa658d42cc1da2b567a210a819502bd8e3bb1e02d5d23e087e2278c4aaffe15e'
  30. 'a1b21ceb5582633d85d41ec9e4995f758cba1731dd80fb6f45a7bc6b18bfe394'
  31. '5dd8986cbc8541b9197235163d1bc63cc04956bf8256a5473f9682dfdf6843c1')
  32. prepare() {
  33. cd $pkgname-$pkgver
  34. # Remove nonfree unRAR utility files from the source
  35. rm -rv CPP/7zip/{Archive,Compress}/Rar
  36. rm -v CPP/7zip/Compress/{Rar{1,2,3}Decoder.{cpp,h},Rar3Vm.{cpp,h},RarCodecsRegister.cpp}
  37. rm -v CPP/7zip/Crypto/{Rar20Crypto,Rar{,5}Aes}.{cpp,h}
  38. rm -v Utils/file_Codecs_Rar_so.py
  39. rm -v DOC/unRarLicense.txt
  40. # Remove nonfree parent folder icon
  41. rm CPP/7zip/UI/FileManager/res/ParentFolder.h
  42. # Remove RAR and parent folder icon references
  43. patch -Np1 -i ../libre.patch
  44. # https://github.com/jinfeihan57/p7zip/issues/112
  45. patch -Rp1 -i ../oemcp-apple.patch
  46. patch -Rp1 -i ../oemcp-cygwin.patch
  47. patch -Rp1 -i ../oemcp-iconv.patch
  48. }
  49. build() {
  50. cd $pkgname-$pkgver
  51. make OPTFLAGS="$CPPFLAGS $CFLAGS" 7z 7zr 7za
  52. }
  53. package() {
  54. cd $pkgname-$pkgver
  55. make install \
  56. DEST_DIR="$pkgdir" \
  57. DEST_HOME=/usr \
  58. DEST_MAN=/usr/share/man
  59. # Remove documentation for the GUI file manager
  60. rm -r "$pkgdir/usr/share/doc/p7zip/DOC/MANUAL/fm"
  61. install -d "${pkgdir}"/usr/share/licenses/p7zip
  62. ln -s -t "$pkgdir/usr/share/licenses/p7zip/" \
  63. /usr/share/doc/p7zip/DOC/License.txt
  64. chmod -R a+r,u+w,a+X "$pkgdir/usr"
  65. }
  66. # vim:set ts=2 sw=2 et: