PKGBUILD 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. # Maintainer (arch): Evangelos Foutras <evangelos@foutrelis.com>
  2. # Contributor: Ionut Biru <ibiru@archlinux.org>
  3. # Contributor: Andrea Scarpino <andrea@archlinux.org>
  4. # Contributor: Alexander Fehr <pizzapunk gmail com>
  5. # Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl>
  6. # Contributor: André Silva <emulatorman@hyperbola.info>
  7. # Contributor: Márcio Silva <coadde@hyperbola.info>
  8. # Contributor: bill-auger <bill-auger@programmer.net>
  9. # parabola changes and rationale:
  10. # - remove modules for and artwork non-privacy-respecting services
  11. # - generate and install doxygen API docs (upstream no longer publishes them)
  12. pkgname=('pidgin' 'libpurple' 'finch')
  13. pkgver=2.14.4
  14. # _libnsl_ver=3 # WIP - pin to coupled dependency versions
  15. pkgrel=1
  16. pkgrel+=.nonprism3
  17. arch=('x86_64')
  18. arch+=('armv7h' 'i686')
  19. url="https://pidgin.im/"
  20. license=('GPL')
  21. makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
  22. 'libidn' 'libgadu' 'python' 'hicolor-icon-theme' 'farstream' 'tk'
  23. 'libnsl' 'avahi' 'ca-certificates' 'intltool' 'libnm' 'dbus-glib'
  24. 'libgnt' 'libxcrypt')
  25. makedepends=(${makedepends[*]/libgadu})
  26. makedepends+=(doxygen)
  27. # WIP - pin to coupled dependency versions
  28. # depends=( ${depends[*]/libnsl/libnsl>=${_libnsl_ver}} ) # pin to coupled dependency versions
  29. # depends+=( ${depends[*]/libnsl/libnsl.so} ) # pin to coupled dependency versions
  30. depends+=( libnsl.so ) # WIP - pin to coupled dependency versions
  31. options=('!emptydirs')
  32. source=(https://downloads.sourceforge.net/project/pidgin/Pidgin/$pkgver/$pkgname-$pkgver.tar.bz2{,.asc})
  33. source+=(remove-services.patch)
  34. sha256sums=('67c1a0104b0624a50100c6d73cd5504d53c9d221922b1b28fa86020531a9904e'
  35. 'SKIP')
  36. sha256sums+=('49b54d48ada9008b88c16af0cb059f307a2e90ad81a2d0f9f727cf573784962e')
  37. validpgpkeys=('40DE1DC7288FE3F50AB938C548F66AFFD9BDB729') # Gary Kramlich <grim@reaperworld.com>
  38. prepare() {
  39. cd $pkgbase-$pkgver
  40. # FIXME: option 'subdir-objects' is disabled
  41. autoreconf -fiv
  42. echo "applying remove-services.patch"
  43. patch -Np1 -i "${srcdir}"/remove-services.patch
  44. # replace 'Linux' with 'GNU/Linux' in doc strings
  45. sed -i 's|on Linux|on GNU/Linux|' doc/pidgin.1.in
  46. sed -i 's|on Linux|on GNU/Linux|' libpurple/valgrind.h
  47. sed -i 's|On Linux|On GNU/Linux|' libpurple/connection.h
  48. # delete icons for removed services
  49. # ASSERT: these correspond to the remove-services.patch changes to pidgin/pixmaps/Makefile.am
  50. # and mutially exclusive to those in 'available_protocols' in build()
  51. local remove_imgs_rx='aim\.|facebook\.|gadu-gadu\.|google-talk\.|icq\.|meanwhile\.|novell\.'
  52. local remove_imgs=$(find pidgin/pixmaps/protocols/ -name '*.png' -or -name '*.svg' | \
  53. grep -E "${remove_imgs_rx}" )
  54. rm ${remove_imgs}
  55. rm pidgin/pixmaps/Makefile.in ; automake ;
  56. # delete references to removed services
  57. local desktop_file=pidgin/data/pidgin.desktop.in
  58. rm ${desktop_file}
  59. sed -i 's|^\(_Comment=\).*|\1Chat over IRC, Jabber/XMPP, and more|' ${desktop_file}.in
  60. }
  61. build() {
  62. cd $pkgbase-$pkgver
  63. local available_protocols='bonjour,irc,jabber,silc,simple,zephyr'
  64. ./configure \
  65. --with-dynamic-prpls=${available_protocols} \
  66. --prefix=/usr \
  67. --sysconfdir=/etc \
  68. --disable-schemas-install \
  69. --disable-gevolution \
  70. --disable-meanwhile \
  71. --disable-gnutls \
  72. --enable-cyrus-sasl \
  73. --enable-nm \
  74. --with-system-ssl-certs=/etc/ssl/certs
  75. make
  76. }
  77. package_pidgin(){
  78. pkgdesc="Multi-protocol instant messaging client"
  79. pkgdesc+=", without support for non-privacy-respecting services"
  80. depends=('libpurple' 'startup-notification' 'gtkspell' 'libxss' 'libsm'
  81. 'gst-plugins-base' 'gst-plugins-good' 'hicolor-icon-theme')
  82. optdepends=('aspell: for spelling correction')
  83. cd $pkgbase-$pkgver
  84. # For linking
  85. make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
  86. make -C pidgin DESTDIR="$pkgdir" install
  87. make -C doc DESTDIR="$pkgdir" install
  88. # Remove files that are packaged in libpurle
  89. make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
  90. # Remove files that are packaged in finch
  91. rm "$pkgdir/usr/share/man/man1/finch.1"
  92. # generate doxygen API docs
  93. make docs
  94. # https://bugs.archlinux.org/task/53770
  95. # https://bugs.archlinux.org/task/69026
  96. find "$pkgdir/usr/lib/perl5" -name perllocal.pod -delete
  97. }
  98. package_libpurple(){
  99. pkgdesc="IM library extracted from Pidgin"
  100. pkgdesc+=", without support for non-privacy-respecting services"
  101. depends=('farstream' 'libsasl' 'libidn' 'libnsl' 'libgadu' 'dbus-glib' 'nss'
  102. 'libnm' 'libxcrypt')
  103. depends=(${depends[*]/libgadu})
  104. optdepends=('avahi: Bonjour protocol support'
  105. 'ca-certificates: SSL CA certificates'
  106. 'python-dbus: for purple-remote and purple-url-handler'
  107. 'tk: Tcl/Tk scripting support')
  108. cd $pkgbase-$pkgver
  109. for _dir in libpurple share/sounds share/ca-certs m4macros po; do
  110. make -C "$_dir" DESTDIR="$pkgdir" install
  111. done
  112. # install doxygen API docs
  113. install -Dm644 doc/html/search/* -t "$pkgdir"/usr/share/gtk-doc/html/pidgin/search/
  114. rm -rf doc/html/search/
  115. install -Dm644 doc/html/* -t "$pkgdir"/usr/share/gtk-doc/html/pidgin/
  116. # https://bugs.archlinux.org/task/53770
  117. # https://bugs.archlinux.org/task/69026
  118. find "$pkgdir/usr/lib/perl5" -name perllocal.pod -delete
  119. # FIXME: redmine #3465 - error while loading shared libraries: libnsl.so.2:
  120. ln -s libnsl.so "$pkgdir/usr/lib/libnsl.so.2"
  121. }
  122. package_finch(){
  123. pkgdesc="A ncurses-based messaging client"
  124. pkgdesc+=", without support for non-privacy-respecting services"
  125. depends=('libpurple' 'libgnt' 'libx11')
  126. cd $pkgbase-$pkgver
  127. # For linking
  128. make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
  129. make -C finch DESTDIR="$pkgdir" install
  130. make -C doc DESTDIR="$pkgdir" install
  131. # Remove files that are packaged in libpurle
  132. make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
  133. rm "$pkgdir"/usr/share/man/man1/pidgin.1
  134. }