PKGBUILD 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. pkgrel=1
  15. pkgrel+=.nonprism1
  16. arch=('x86_64')
  17. arch+=('armv7h' 'i686')
  18. url="https://pidgin.im/"
  19. license=('GPL')
  20. makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
  21. 'libidn' 'libgadu' 'python' 'hicolor-icon-theme' 'farstream' 'tk'
  22. 'libnsl' 'avahi' 'ca-certificates' 'intltool' 'libnm' 'dbus-glib'
  23. 'libgnt' 'libxcrypt')
  24. makedepends=(${makedepends[*]/libgadu})
  25. options=('!emptydirs')
  26. source=(https://downloads.sourceforge.net/project/pidgin/Pidgin/$pkgver/$pkgname-$pkgver.tar.bz2{,.asc})
  27. source+=(remove-services.patch)
  28. sha256sums=('67c1a0104b0624a50100c6d73cd5504d53c9d221922b1b28fa86020531a9904e'
  29. 'SKIP')
  30. sha256sums+=('49b54d48ada9008b88c16af0cb059f307a2e90ad81a2d0f9f727cf573784962e')
  31. validpgpkeys=('40DE1DC7288FE3F50AB938C548F66AFFD9BDB729') # Gary Kramlich <grim@reaperworld.com>
  32. prepare() {
  33. cd $pkgbase-$pkgver
  34. echo "applying remove-services.patch"
  35. patch -Np1 -i "${srcdir}"/remove-services.patch
  36. # replace 'Linux' with 'GNU/Linux' in doc strings
  37. sed -i 's|on Linux|on GNU/Linux|' doc/pidgin.1.in
  38. sed -i 's|on Linux|on GNU/Linux|' libpurple/valgrind.h
  39. sed -i 's|On Linux|On GNU/Linux|' libpurple/connection.h
  40. # delete icons for removed services
  41. # ASSERT: these correspond to the remove-services.patch changes to pidgin/pixmaps/Makefile.am
  42. # and mutially exclusive to those in 'available_protocols' in build()
  43. local remove_imgs_rx='aim\.|facebook\.|gadu-gadu\.|google-talk\.|icq\.|meanwhile\.|novell\.'
  44. local remove_imgs=$(find pidgin/pixmaps/protocols/ -name '*.png' -or -name '*.svg' | \
  45. grep -E "${remove_imgs_rx}" )
  46. rm ${remove_imgs}
  47. rm pidgin/pixmaps/Makefile.in ; automake ;
  48. # delete references to removed services
  49. local desktop_file=pidgin/data/pidgin.desktop.in
  50. rm ${desktop_file}
  51. sed -i 's|^\(_Comment=\).*|\1Chat over IRC, Jabber/XMPP, and more|' ${desktop_file}.in
  52. }
  53. build() {
  54. cd $pkgbase-$pkgver
  55. local available_protocols='bonjour,irc,jabber,silc,simple,zephyr'
  56. ./configure \
  57. --with-dynamic-prpls=${available_protocols} \
  58. --prefix=/usr \
  59. --sysconfdir=/etc \
  60. --disable-schemas-install \
  61. --disable-gevolution \
  62. --disable-meanwhile \
  63. --disable-gnutls \
  64. --enable-cyrus-sasl \
  65. --enable-nm \
  66. --with-system-ssl-certs=/etc/ssl/certs
  67. make
  68. }
  69. package_pidgin(){
  70. pkgdesc="Multi-protocol instant messaging client"
  71. pkgdesc+=", without support for non-privacy-respecting services"
  72. depends=('libpurple' 'startup-notification' 'gtkspell' 'libxss' 'libsm'
  73. 'gst-plugins-base' 'gst-plugins-good' 'hicolor-icon-theme')
  74. optdepends=('aspell: for spelling correction')
  75. cd $pkgbase-$pkgver
  76. # For linking
  77. make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
  78. make -C pidgin DESTDIR="$pkgdir" install
  79. make -C doc DESTDIR="$pkgdir" install
  80. # Remove files that are packaged in libpurle
  81. make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
  82. # Remove files that are packaged in finch
  83. rm "$pkgdir/usr/share/man/man1/finch.1"
  84. # generate doxygen API docs
  85. make docs
  86. # https://bugs.archlinux.org/task/53770
  87. # https://bugs.archlinux.org/task/69026
  88. find "$pkgdir/usr/lib/perl5" -name perllocal.pod -delete
  89. }
  90. package_libpurple(){
  91. pkgdesc="IM library extracted from Pidgin"
  92. pkgdesc+=", without support for non-privacy-respecting services"
  93. depends=('farstream' 'libsasl' 'libidn' 'libnsl' 'libgadu' 'dbus-glib' 'nss'
  94. 'libnm' 'libxcrypt')
  95. depends=(${depends[*]/libgadu})
  96. optdepends=('avahi: Bonjour protocol support'
  97. 'ca-certificates: SSL CA certificates'
  98. 'python-dbus: for purple-remote and purple-url-handler'
  99. 'tk: Tcl/Tk scripting support')
  100. cd $pkgbase-$pkgver
  101. for _dir in libpurple share/sounds share/ca-certs m4macros po; do
  102. make -C "$_dir" DESTDIR="$pkgdir" install
  103. done
  104. # install doxygen API docs
  105. install -Dm644 doc/html/search/* -t "$pkgdir"/usr/share/gtk-doc/html/pidgin/search/
  106. rm -rf doc/html/search/
  107. install -Dm644 doc/html/* -t "$pkgdir"/usr/share/gtk-doc/html/pidgin/
  108. # https://bugs.archlinux.org/task/53770
  109. # https://bugs.archlinux.org/task/69026
  110. find "$pkgdir/usr/lib/perl5" -name perllocal.pod -delete
  111. }
  112. package_finch(){
  113. pkgdesc="A ncurses-based messaging client"
  114. pkgdesc+=", without support for non-privacy-respecting services"
  115. depends=('libpurple' 'libgnt' 'libx11')
  116. cd $pkgbase-$pkgver
  117. # For linking
  118. make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
  119. make -C finch DESTDIR="$pkgdir" install
  120. make -C doc DESTDIR="$pkgdir" install
  121. # Remove files that are packaged in libpurle
  122. make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
  123. rm "$pkgdir"/usr/share/man/man1/pidgin.1
  124. }