PKGBUILD 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Maintainer (arch): Lukas Fleischer <lfleischer@archlinux.org>
  2. # Contributor: Gaetan Bisson <bisson@archlinux.org>
  3. # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
  4. # Contributor: Robson Peixoto
  5. # Contributor: André Silva <emulatorman@hyperbola.info>
  6. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  7. _pkgname=unzip-libre
  8. pkgname=unzip
  9. pkgver=6.0
  10. _pkgver=${pkgver/./}
  11. pkgrel=14
  12. pkgrel+=.parabola1
  13. pkgdesc='For extracting and viewing files in .zip archives'
  14. url='https://www.info-zip.org/UnZip.html'
  15. arch=('x86_64')
  16. arch+=('i686' 'armv7h')
  17. license=('custom')
  18. depends=('bzip2' 'bash')
  19. conflicts=("${_pkgname}")
  20. replaces=("${_pkgname}")
  21. mksource=("https://downloads.sourceforge.net/infozip/${pkgname}${_pkgver}.tar.gz"
  22. 'match.patch')
  23. source=("https://repo.parabola.nu/other/${_pkgname}/${pkgname}${_pkgver}-libre.tar.gz"
  24. 'overflow-fsize.patch'
  25. 'cve20149636.patch'
  26. 'test_compr_eb.patch'
  27. 'getZip64Data.patch'
  28. 'crc32.patch'
  29. 'empty-input.patch'
  30. 'csiz-underflow.patch'
  31. 'nextbyte-overflow.patch')
  32. mksha256sums=('036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37'
  33. '400c44871da916f2263213bfe04405cd92b9e55e28bc368067631232da5fd793')
  34. sha256sums=('fe77e2c98fc7bd721962a3633fc8e7e59d79098c3a6842a2e5e418b88ddd6c50'
  35. 'e2a10fa494c39fb3f311d0f2d7db775bdecbc8d5b9d298c7bd035ace1f1713d5'
  36. 'c9a863e570bdaf2637c43bf1bba3d97808a1b0504d85418f6a8550ac286788f2'
  37. '1a1390390402e674ef7b143705ade0e9aa082131bb9686e95fb7985310def885'
  38. 'f598f2c1c840c845f9e9d08fc14d358b87c002cfaff021c4b4a7086ecbe337c8'
  39. '5598c4124ec5865745bad5bf80c48f92cafd55363d5e140e5abca801815b0ce6'
  40. '9bdea454a3677e00fc81b8ffe534040b2a250ae0d76437d38e41f849997668ae'
  41. '95dd15d5d9cdf5cea18c357b152930d6d52660599e0fd4907d6405870fdd9fe1'
  42. '788c29727ff0689c3b1828466127758426f6d2c769048aa985950373747c76f3')
  43. mksource() {
  44. cd "${srcdir}/${pkgname}${_pkgver}"
  45. # from http://bzr.trisquel.info/package-helpers/trunk/annotate/head%3A/helpers/natty/DATA/unzip/match.patch
  46. patch -Np0 -i ${srcdir}/match.patch
  47. }
  48. prepare() {
  49. cd "${srcdir}/${pkgname}${_pkgver}"
  50. sed -i "/MANDIR =/s#)/#)/share/#" unix/Makefile
  51. patch -p1 -i ../overflow-fsize.patch # FS#44171
  52. patch -p1 -i ../cve20149636.patch # FS#44171
  53. patch -i ../test_compr_eb.patch # FS#43391
  54. patch -i ../getZip64Data.patch # FS#43300
  55. patch -i ../crc32.patch # FS#43300
  56. patch -p1 -i ../empty-input.patch # FS#46955
  57. patch -p1 -i ../csiz-underflow.patch # FS#46955
  58. patch -p1 -i ../nextbyte-overflow.patch # FS#46955
  59. }
  60. build() {
  61. cd "${srcdir}/${pkgname}${_pkgver}"
  62. # DEFINES, make, and install args from Debian
  63. DEFINES='-DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR -DLARGE_FILE_SUPPORT \
  64. -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \
  65. -DDATE_FORMAT=DF_YMD -DUSE_BZIP2 -DNOMEMCPY -DNO_WORKING_ISPRINT'
  66. make -f unix/Makefile prefix=/usr \
  67. D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 \
  68. LF2="$LDFLAGS" CF="$CFLAGS $CPPFLAGS -I. $DEFINES" \
  69. unzips
  70. }
  71. package() {
  72. cd "${srcdir}/${pkgname}${_pkgver}"
  73. make -f unix/Makefile prefix="${pkgdir}"/usr install
  74. install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  75. }