summaryrefslogtreecommitdiff
path: root/~xihh/retroshare/PKGBUILD
blob: 7c62e2254b57785dbee9e5a01f5378419af85fa2 (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
# Maintainer: stqn
# Contributor: JHeaton <jheaton at archlinux dot us>
# Contributor: Tristero <tristero at online dot de>
# Contributor: funkyou

pkgname=retroshare
pkgver=0.5.3b
pkgrel=5
pkgdesc="Serverless encrypted instant messenger with filesharing, chatgroups, e-mail."
arch=('i686' 'x86_64' 'mips64el')
url="http://retroshare.sourceforge.net/"
license=('LGPL' 'GPL')
depends=('qt' 'libupnp' 'gpgme' 'libgnome-keyring' 'libxss')
install="${pkgname}.install"

source=(http://sourceforge.net/projects/retroshare/files/RetroShare/${pkgver}/RetroShare-v${pkgver}.tar.gz \
        ${pkgname}.sh \
        ${pkgname}.install \
        ${pkgname}.desktop)

sha256sums=('bd602a8a144597381659191561c19aaf9993eab0e0955cba8e6923b7efa30b0e'
            '79d390eecea24ac51caa869fa8e0813abae092c75873527e180e0c965dac6f8e'
            '5ba8c11c312b232b1935ee0918d020b049e4993cd8701e0446af4f8f637f4dce'
            '70be00968f2477e368f75393f193e76f366fff2dadab869c855e92048060cf29')

# Setting this to TRUE activates the compilation and packaging
# of the plugins which are not yet officially released.
# NOTE: doesn't work at the moment.
_USE_PLUGINS=FALSE

# Setting this to TRUE activates the compilation and packaging
# of retroshare-nogui
_USE_NOGUI=FALSE

build() {
  cd ${srcdir}

  msg "Compiling libbitdht..."
  cd ${srcdir}/trunk/libbitdht/src
  qmake
  make

  msg "Compiling libretroshare..."
  cd ${srcdir}/trunk/libretroshare/src
  qmake
  make

  if [ "x$_USE_PLUGINS" == "xTRUE" ] ; then
    msg "Compiling retroshare plugins..."
    cd ${srcdir}/trunk/plugins
    qmake
    make
  fi

  msg "Compiling retroshare-gui..."
  cd ${srcdir}/trunk/retroshare-gui/src
  # Add missing libs
  sed -i "s/-lssl -lgpgme -lupnp -lixml -lXss -lgnome-keyring/-lssl -lcrypto -ldl -lX11 -lgpgme -lupnp -lixml -lXss -lgnome-keyring/" RetroShare.pro
  qmake
  make

  if [ "x$_USE_NOGUI" == "xTRUE" ] ; then
    msg "Compiling retroshare-nogui..."
    cd ${srcdir}/trunk/retroshare-nogui/src
    # Add missing libs
    sed -i "s/-lssl -lgpgme -lupnp -lixml -lgnome-keyring/-lssl -lcrypto -ldl -lgpgme -lupnp -lixml -lgnome-keyring/" retroshare-nogui.pro
    qmake
    make
  fi
}

package() {

  # --- Install Files ---

  msg "Install files to fakeroot-environment"

  # - Binaries
  # Not installing the static libraries since there's no SDK anyway
  #install -D -m 644 \
  #  "${srcdir}/trunk/libbitdht/src/lib/libbitdht.a" \
  #  "${pkgdir}/usr/lib/libbitdht.a"
  #install -D -m 644 \
  #  "${srcdir}/trunk/libretroshare/src/lib/libretroshare.a" \
  #  "${pkgdir}/usr/lib/libretroshare.a"

  install -D -m 755 \
    "${srcdir}/trunk/retroshare-gui/src/RetroShare" \
    "${pkgdir}/opt/${pkgname}/${pkgname}"

  install -D -m 755 \
    "${pkgname}.sh" \
    "${pkgdir}/usr/bin/${pkgname}"

  if [ "x$_USE_NOGUI" == "xTRUE" ] ; then
    install -D -m 755 \
	"${srcdir}/trunk/retroshare-nogui/src/retroshare-nogui" \
        "${pkgdir}/usr/bin/${pkgname}-nogui"
  fi

  # plugins

  if [ "x$_USE_PLUGINS" == "xTRUE" ] ; then
    # missing : LinksCloud
    install -D -m 755 \
	"${srcdir}/trunk/plugins/bin/libcalendar_plugin.so" \
	"${pkgdir}/usr/lib/retroshare/plugins/libcalendar_plugin.so"
    install -D -m 755 \
	"${srcdir}/trunk/plugins/bin/libpuzzle_plugin.so" \
	"${pkgdir}/usr/lib/retroshare/plugins/libpuzzle_plugin.so"
    install -D -m 755 \
	"${srcdir}/trunk/plugins/bin/libqcheckers_plugin.so" \
	"${pkgdir}/usr/lib/retroshare/plugins/libqcheckers_plugin.so"
    install -D -m 755 \
	"${srcdir}/trunk/plugins/bin/libqdiagram_plugin.so" \
	"${pkgdir}/usr/lib/retroshare/plugins/libqdiagram_plugin.so"
  fi

  # Style sheets
  cp -r "${srcdir}/trunk/retroshare-gui/src/qss" "$pkgdir/opt/retroshare/"
  chmod 755 "$pkgdir/opt/retroshare/qss"

  # Icons
  #install -D -m 644 \
  #  "${srcdir}/trunk/retroshare-gui/src/gui/images/retrosharelogo1.png" \
  #  "${pkgdir}/usr/share/pixmaps/retroshare_blue.png"
  install -D -m 644 \
    "${srcdir}/trunk/retroshare-gui/src/gui/images/retrosharelogo2.png" \
    "${pkgdir}/usr/share/pixmaps/retroshare.png"

  # Desktop File
  install -D -m 644 \
    "${srcdir}/${pkgname}.desktop" \
    "${pkgdir}/usr/share/applications/${pkgname}.desktop"

  # bdboot (needed to bootstrap the DHT)
  install -D -m 644 \
    "${srcdir}/trunk/libbitdht/src/bitdht/bdboot.txt" \
    "${pkgdir}/usr/share/RetroShare/bdboot.txt"
}