summaryrefslogtreecommitdiff
path: root/community/tork/PKGBUILD
blob: fe8a4121b867af33e0f8cff82bd1f9f24f7d8e7b (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
# $Id: PKGBUILD 103134 2013-12-27 05:36:23Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Darwin Bautista <djclue917@gmail.com>
# Contributor: Chris Giles <Chris.G.27 (at) Gmail.com>

_libname=tor
pkgname=${_libname}k
pkgver=0.33
pkgrel=5
pkgdesc="An anonymity manager for KDE"
arch=("i686" "x86_64")
url="http://sourceforge.net/projects/$pkgname/"
license=("GPL")
depends=("geoip" "kdelibs3" "${_libname}" "torsocks" "hicolor-icon-theme" "desktop-file-utils" "xdg-utils")
optdepends=("privoxy: For anonymous browsing with Konqueror")
options=("!emptydirs")
install=${pkgname}.install

source=(
  http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2
  fix_net_port.patch
  fix_getuid.patch
)
sha1sums=(
  'cf94b9579cf24254fcb344f579088a241bbd4028'
  '70c450031bf5e603801451fc016e5cfc22cfd19c'
  '9fe1de823850e6a0d0a4a18c3b86955206f544bd'
)

build() {
  cd ${pkgname}-${pkgver}
  
  # Source the KDE and QT profiles
  source /etc/profile.d/kde3.sh
  #source /etc/profile.d/qt3.sh

  msg "Applying patch(es) ..."
  
  patch -Np1 -i ../fix_net_port.patch
  patch -Np1 -i ../fix_getuid.patch

  # Build
  msg "Compiling tork ..."
  ./configure --prefix=/opt/kde --mandir=/usr/share/man \
  --sysconfdir=/etc --with-external-geoip --without-arts

  # Fix --as-needed and --hash-style=gnu options not recognized error
  find . -name Makefile -exec sed -i "s/-Wl,//g" {} \;
  find . -name Makefile -exec sed -i "s/-Wl//g" {} \;
  find . -name Makefile -exec sed -i "s/--hash-style=gnu,//g" {} \;
  find . -name Makefile -exec sed -i "s/--hash-style=gnu//g" {} \;
  find . -name Makefile -exec sed -i "s/--as-needed,//g" {} \;
  find . -name Makefile -exec sed -i "s/--as-needed//g" {} \;

  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}

# vim:set ts=2 sw=2 et: