PKGBUILD 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. # Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
  2. # Contributor (Arch): Art Gramlich <art@gramlich-net.com>
  3. # Contributor: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  4. # Contributor: Eli Schwartz <eschwartz@archlinux.org>
  5. # parabola changes and rationale:
  6. #
  7. # Several Parabola packages depends on ICU, and the ICU soname changes often.
  8. # This means that if we don't rebuild all the Parabola packages which depend
  9. # on ICU, as soon as the new ArchLinux, ArchLinux32, and ArchLinuxARM ICU
  10. # packages are synchronized into the Parabola repositories, we have a problem.
  11. # The repo server synchronizes with the upstream repos un-attended; so this
  12. # is a wonderful surprise each time; and we hustle frantucally to get the
  13. # system sane again. We could watch the testing and staging repos of each
  14. # upstream, and start re-building everything in a Parabola staging repo;
  15. # but that could result in discarded work, if those exact versions are not the
  16. # ones which are eventually released into [core].
  17. #
  18. # At first nothing was done to fix or workaround that issue. In practice,
  19. # once a new ICU was synchronized, many users were upgrading before the
  20. # Parabola packages had the time to be rebuilt. For such users, it
  21. # broke all the installed Parabola packages that were depending on the old ICU.
  22. # This means that users had to find a way to downgrade packages manually or wait
  23. # until developers would finally have rebuilt all the packages that were broken.
  24. #
  25. # Then such packages were modified to make them depend on the exact version of
  26. # the ICU packages they were built against. This way, once the new ICU package
  27. # was synchronized, users could not upgrade if they had packages that were not
  28. # rebuilt yet against the new ICU package. However this workaround also prevents
  29. # installing packages that depends on the new ICU.
  30. #
  31. # The correct fix would probably be to automatically build all the Packages
  32. # instead of relying on Arch Linux Packages. Still, a staging repo would be
  33. # required to hold the new packages, until they all can be released together sanely.
  34. # However we don't have the code, configuration and/or infrastructure to run
  35. # an automatic builder for all packages yet even if there is work in this
  36. # direction.
  37. #
  38. # In the meantime, this version of ICU exists for Parabola packages to link against
  39. # at runtime. In this way, Parabola packages can depend only on the "sodeps" exposed
  40. # by ICU, which is usually provided by the upstream distribution's ICU; but may be
  41. # this ICU, if the Parabola package has yet to be rebuilt agianst the upgraded ICU.
  42. #
  43. # It is inspired by the admittedly awkward hack of versioned library
  44. # dependencies more commonly seen (e.g. in the AUR as 'icu65') on which
  45. # proprietary binaries built against Debian's ICU will depend. It is awkward,
  46. # in the eyes of the beholder and this elegantly scales to Parabola's needs,
  47. # without consuming increasing resources, which is the best definition of "not
  48. # awkward".
  49. #
  50. # To use it, simply add the following dependency to any package which parabola
  51. # has built or rebuilt:
  52. #
  53. # depends=('libicui18n.so')
  54. #
  55. # or whichever shared library is reported by readelf -d /path/to/compiled/ELF/file
  56. # and, every time the upstream distribution upgrades ICU, update this package
  57. # as well, to ensure it always stays exactly one version behind.
  58. #
  59. # This works well for ICU, even for packages which link to both the older and
  60. # newer versions of libicu*.so, since ICU uses versioned symbols as reported by
  61. #
  62. # nm -D --demangle --with-symbol-versions /path/to/library
  63. #
  64. # However, caution must be taken before implementing the same idea for other
  65. # libraries. So the idea is to only use it for libraries that often have this
  66. # issue.
  67. #
  68. # Changes:
  69. # - remove all files other than libicu*.so.*
  70. # - depend on icu; this is needed because if the package is installed on its
  71. # own, ldconfig will create untracked symlinks which were supposed to be
  72. # installed by the icu package.
  73. _pkgname=icu
  74. pkgname=${_pkgname}-compat
  75. pkgver=67.1 # should always be one major version behind core/icu
  76. pkgrel=1
  77. pkgrel+=.parabola1
  78. pkgdesc="International Components for Unicode library"
  79. pkgdesc+=" (compatibility libraries for the previous release)"
  80. arch=(x86_64)
  81. arch+=(armv7h i686)
  82. url="http://site.icu-project.org/home"
  83. license=('custom:icu')
  84. depends=('gcc-libs' 'sh')
  85. depends+=("icu>$pkgver") # core/icu should always be one major version ahead
  86. conflicts=("icu<=$pkgver") # core/icu should always be one major version ahead
  87. makedepends=('python')
  88. provides=(libicu{data,i18n,io,test,tu,uc}.so)
  89. source=(https://github.com/unicode-org/icu/releases/download/release-${pkgver//./-}/${_pkgname}4c-${pkgver//./_}-src.tgz{,.asc})
  90. # https://github.com/unicode-org/icu/releases/download/release-65-1/SHASUM512.txt - no checksum file for v67 release
  91. sha512sums=('4779f1ce1ca7976f6fad6768853ea8c540da54d11509e3b6cfd864a04b5f2db1c3d4b546387f91ad02fb90804525bc37d2543173f0d705d6ca11dc6f2b7640a8'
  92. 'SKIP')
  93. validpgpkeys=('BA90283A60D67BA0DD910A893932080F4FB419E3') # "Steven R. Loomis (filfla-signing) <srloomis@us.ibm.com>"
  94. validpgpkeys+=('9731166CD8E23A83BEE7C6D3ACA5DBE1FD8FABF1') # "Steven R. Loomis (ICU Project) <srl@icu-project.org>"
  95. validpgpkeys+=('FFA9129A180D765B7A5BEA1C9B432B27D1BA20D7') # "Fredrik Roubert <fredrik@roubert.name>"
  96. validpgpkeys+=('E4098B78AFC94394F3F49AA903996C7C83F12F11') # "keybase.io/srl295 <srl295@keybase.io>"
  97. validpgpkeys=('4569BBC09DA846FC91CBD21CE1BBA44593CF2AE0') # "Steven R. Loomis (codesign-qormi) <srloomis@us.ibm.com>"
  98. build() {
  99. cd icu/source
  100. ./configure --prefix=/usr \
  101. --sysconfdir=/etc \
  102. --mandir=/usr/share/man \
  103. --sbindir=/usr/bin
  104. make
  105. }
  106. check() {
  107. cd icu/source
  108. make -k check
  109. }
  110. package() {
  111. cd icu/source
  112. make -j1 DESTDIR="${pkgdir}" install
  113. # Install license
  114. install -Dm644 "${srcdir}"/icu/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  115. # to avoid conflicts against the preferred 'icu' package, we remove all files
  116. # except the actual shared libraries
  117. rm -r "${pkgdir}"/usr/{bin,include,lib/{icu,pkgconfig},share}
  118. rm "${pkgdir}"/usr/lib/*.so
  119. }