summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 96df71b661d0f4771f01039447c96c0b3218dd63 (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
#Maintainer: M0Rf30

_pkgname=openbazaar
pkgname=${_pkgname}-git
pkgver=4054.05a993d
pkgrel=1
pkgdesc="A decentralized marketplace proof of concept. It is based off of the POC code by the darkmarket team and protected by the GPL"
arch=(any)
url="http://openbazaar.org"
license=('MIT')
depends=(
	    curl
	    #gnupg1
	    jquery
            python2-bitcoin
            python2-dnschain
            python2-gnupg-hg
            python2-ipy
            python2-miniupnpc
            python2-obelisk
            python2-pillow
            python2-psutil
            python2-pycountry
            python2-pyee
            python2-pyelliptic
            python2-pystun
            python2-qrcode
            python2-requests
            python2-rfc3986
            python2-tornado
)

makedepends=(git)
optdepends=('pybitmessage-git: Send and receive messages to anyone on the bitmessage network')
source=("${_pkgname}::git+https://github.com/OpenBazaar/OpenBazaar.git#branch=develop"
	 ${_pkgname}.service
	 ${_pkgname}.sh
	 ${_pkgname}.conf
#	 gnupg1.patch
)
backup=('etc/openbazaar.conf')
install=${_pkgname}.install
options=('!strip')
provides=(${_pkgname})
replaces=(${_pkgname})

package(){
  cd $srcdir/${_pkgname}

 # msg2 "Patch against Gnupg2"
 # patch -Np1 -i ../gnupg1.patch

  msg2 "Install systemd service"
  install -Dm644 $srcdir/${_pkgname}.service $pkgdir/usr/lib/systemd/system/${_pkgname}.service

  msg2 "Install ${_pkgname} sample conf in /etc/${_pkgname}.conf"
  install -Dm644 $srcdir/${_pkgname}.conf $pkgdir/etc/${_pkgname}.conf

  msg2 "Install ${_pkgname} scripts"
  install -Dm755 $srcdir/${_pkgname}.sh $pkgdir/usr/bin/${_pkgname}

  msg2 "Create folder for user ${_pkgname}"
  cd installers/ubuntu
  cat build | head -n -2 > create_folders
  python2 create_folders
	install -dm755 $pkgdir/var/lib/

  cp -r output/usr/share/${_pkgname} $pkgdir/var/lib/
  cp -r $srcdir/${_pkgname}/rudp $pkgdir/var/lib/${_pkgname}

  msg2 "Jquery symlink"
  ln -s -r /usr/share/jquery/jquery.min.js $pkgdir/var/lib/${_pkgname}/html/vendors

  msg2 "Python2 bytecode generation"
  cd $pkgdir/var/lib/${_pkgname}/ && python2 -m compileall .
}

pkgver() {
  cd ${_pkgname}
  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

md5sums=('SKIP'
         '1d1e3933c4fd26f565e47f475eede2b4'
         '87ad334f35bce82931151fa94c06bab1'
         '0741fc4c68e499b10cbf272f27efd3a0')