PKGBUILD 4.6 KB

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