summaryrefslogtreecommitdiff
path: root/nonprism/pidgin/PKGBUILD
blob: aa11adeca7b3f545913f01a9e807bde95580fbb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Maintainer (arch): Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: bill-auger <bill-auger@programmer.net>


# parabola changes and rationale:
# - remove modules for and artwork non-privacy-respecting services


pkgname=('pidgin' 'libpurple' 'finch')
pkgver=2.14.4
pkgrel=1
pkgrel+=.nonprism1
arch=('x86_64')
arch+=('armv7h' 'i686')
url="https://pidgin.im/"
license=('GPL')
makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
             'libidn' 'libgadu' 'python' 'hicolor-icon-theme' 'farstream' 'tk'
             'libnsl' 'avahi' 'ca-certificates' 'intltool' 'libnm' 'dbus-glib'
             'libgnt' 'libxcrypt')
makedepends=(${makedepends[*]/libgadu})
options=('!emptydirs')
source=(https://downloads.sourceforge.net/project/pidgin/Pidgin/$pkgver/$pkgname-$pkgver.tar.bz2{,.asc})
source+=(remove-services.patch)
sha256sums=('67c1a0104b0624a50100c6d73cd5504d53c9d221922b1b28fa86020531a9904e'
            'SKIP')
sha256sums+=('49b54d48ada9008b88c16af0cb059f307a2e90ad81a2d0f9f727cf573784962e')
validpgpkeys=('40DE1DC7288FE3F50AB938C548F66AFFD9BDB729') # Gary Kramlich <grim@reaperworld.com>


prepare() {
  cd $pkgbase-$pkgver

  echo "applying remove-services.patch"
  patch -Np1 -i "${srcdir}"/remove-services.patch

  # replace 'Linux' with 'GNU/Linux' in doc strings
  sed -i 's|on Linux|on GNU/Linux|' doc/pidgin.1.in
  sed -i 's|on Linux|on GNU/Linux|' libpurple/valgrind.h
  sed -i 's|On Linux|On GNU/Linux|' libpurple/connection.h

  # delete icons for removed services
  # ASSERT: these correspond to the remove-services.patch changes to pidgin/pixmaps/Makefile.am
  local remove_imgs_rx='aim\.|facebook\.|gadu-gadu\.|google-talk\.|icq\.|meanwhile\.|novell\.'
  local remove_imgs=$(find pidgin/pixmaps/protocols/ -name '*.png' -or -name '*.svg' | \
                      grep -E "${remove_imgs_rx}"                                      )
  rm ${remove_imgs}
  rm pidgin/pixmaps/Makefile.in ; automake ;

  # delete references to removed services
  local desktop_file=pidgin/data/pidgin.desktop.in
  rm ${desktop_file}
  sed -i 's|^\(_Comment=\).*|\1Chat over IRC, Jabber/XMPP, and more|' ${desktop_file}.in
}

build() {
  cd $pkgbase-$pkgver

  local available_protocols='bonjour,irc,jabber,silc,simple,zephyr'
  ./configure \
    --with-dynamic-prpls=${available_protocols} \
    --prefix=/usr \
    --sysconfdir=/etc \
    --disable-schemas-install \
    --disable-gevolution \
    --disable-meanwhile \
    --disable-gnutls \
    --enable-cyrus-sasl \
    --disable-doxygen \
    --enable-nm \
    --with-system-ssl-certs=/etc/ssl/certs
    make
}

package_pidgin(){
  pkgdesc="Multi-protocol instant messaging client"
  pkgdesc+=", without support for non-privacy-respecting services"
  depends=('libpurple' 'startup-notification' 'gtkspell' 'libxss' 'libsm'
           'gst-plugins-base' 'gst-plugins-good' 'hicolor-icon-theme')
  optdepends=('aspell: for spelling correction')

  cd $pkgbase-$pkgver

  # For linking
  make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES

  make -C pidgin DESTDIR="$pkgdir" install
  make -C doc DESTDIR="$pkgdir" install

  # Remove files that are packaged in libpurle
  make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES

  rm "$pkgdir/usr/share/man/man1/finch.1"

  # https://bugs.archlinux.org/task/53770
  # https://bugs.archlinux.org/task/69026
  find "$pkgdir/usr/lib/perl5" -name perllocal.pod -delete
}

package_libpurple(){
  pkgdesc="IM library extracted from Pidgin"
  pkgdesc+=", without support for non-privacy-respecting services"
  depends=('farstream' 'libsasl' 'libidn' 'libnsl' 'libgadu' 'dbus-glib' 'nss'
           'libnm' 'libxcrypt')
  depends=(${depends[*]/libgadu})
  optdepends=('avahi: Bonjour protocol support'
              'ca-certificates: SSL CA certificates'
              'python-dbus: for purple-remote and purple-url-handler'
              'tk: Tcl/Tk scripting support')

  cd $pkgbase-$pkgver

  for _dir in libpurple share/sounds share/ca-certs m4macros po; do
    make -C "$_dir" DESTDIR="$pkgdir" install
  done

  # https://bugs.archlinux.org/task/53770
  # https://bugs.archlinux.org/task/69026
  find "$pkgdir/usr/lib/perl5" -name perllocal.pod -delete
}

package_finch(){
  pkgdesc="A ncurses-based messaging client"
  pkgdesc+=", without support for non-privacy-respecting services"
  depends=('libpurple' 'libgnt' 'libx11')

  cd $pkgbase-$pkgver

  # For linking
  make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES

  make -C finch DESTDIR="$pkgdir" install
  make -C doc DESTDIR="$pkgdir" install

  # Remove files that are packaged in libpurle
  make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES

  rm "$pkgdir"/usr/share/man/man1/pidgin.1
}