summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Lichtblau2017-02-22 20:44:43 +0100
committerJaroslav Lichtblau2017-02-22 20:44:43 +0100
commit4c3b9f5853675d6a026a4f023be7f8a1646088f0 (patch)
tree507b4faf1676a5c050bf9494225fe430683ba7f7
parent84c8d260f9543564aedc86eab3dd953f41e11745 (diff)
downloadaur-4c3b9f5853675d6a026a4f023be7f8a1646088f0.tar.gz
trezord-1.2.0-2
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD27
-rw-r--r--trezord.patch32
3 files changed, 60 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eff8bda36d91..87494b436da4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,10 @@
# Generated by mksrcinfo v8
-# Mon Oct 17 16:37:05 UTC 2016
+# Wed Feb 22 19:44:34 UTC 2017
pkgbase = trezord
pkgdesc = TREZOR Communication Daemon
pkgver = 1.2.0
- pkgrel = 1
- url = http://bitcointrezor.com/
+ pkgrel = 2
+ url = https://github.com/trezor
install = trezord.install
arch = i686
arch = x86_64
@@ -18,11 +18,15 @@ pkgbase = trezord
depends = jsoncpp
depends = libusb
source = trezord-1.2.0.tar.gz::https://github.com/trezor/trezord/archive/v1.2.0.tar.gz
+ source = git+https://github.com/trezor/trezor-crypto.git#commit=3d364aac3618ca7cca1e7687a7a3d99f7981ccd6
+ source = git+https://github.com/trezor/trezor-common.git#commit=f50db0e6640b4a0ee1734b27e12304c318578c33
source = trezord.sysusers
- source = git+https://github.com/trezor/trezor-crypto.git#commit=ed755120af13a58ae339fc02c911573a71bee87d
+ source = trezord.patch
sha256sums = 883c68e5794b308a139706fea4549c9f8a7573d7e17d82f0fd3e7c0c8c36b6e7
- sha256sums = a4106f04d8322836905c6d300c0fb54849063bbc258ef76e28acdbec7c1c4df4
sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = a4106f04d8322836905c6d300c0fb54849063bbc258ef76e28acdbec7c1c4df4
+ sha256sums = 3101ef63935ca2e07457e0eccbd01e58b111f0194e998f541dbd503b1c393d8c
pkgname = trezord
diff --git a/PKGBUILD b/PKGBUILD
index 815ab4bd8e16..1086cb72dd5b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,22 +2,27 @@
# Contributor: Saleem Rashid <spudowiar@outlook.com>
pkgname=trezord
-pkgrel=1
+pkgrel=2
pkgver=1.2.0
-_commit=ed755120af13a58ae339fc02c911573a71bee87d
+_commitcrypto=3d364aac3618ca7cca1e7687a7a3d99f7981ccd6
+_commitcommon='f50db0e6640b4a0ee1734b27e12304c318578c33'
pkgdesc='TREZOR Communication Daemon'
arch=('i686' 'x86_64')
-url='http://bitcointrezor.com/'
+url='https://github.com/trezor'
license=('LGPL3')
depends=('boost-libs' 'protobuf' 'libmicrohttpd' 'jsoncpp' 'libusb')
makedepends=('git' 'cmake' 'boost')
install=$pkgname.install
source=($pkgname-$pkgver.tar.gz::https://github.com/trezor/$pkgname/archive/v$pkgver.tar.gz
+ git+https://github.com/trezor/trezor-crypto.git#commit=$_commitcrypto
+ git+https://github.com/trezor/trezor-common.git#commit=$_commitcommon
$pkgname.sysusers
- git+https://github.com/trezor/trezor-crypto.git#commit=$_commit)
+ $pkgname.patch)
sha256sums=('883c68e5794b308a139706fea4549c9f8a7573d7e17d82f0fd3e7c0c8c36b6e7'
+ 'SKIP'
+ 'SKIP'
'a4106f04d8322836905c6d300c0fb54849063bbc258ef76e28acdbec7c1c4df4'
- 'SKIP')
+ '3101ef63935ca2e07457e0eccbd01e58b111f0194e998f541dbd503b1c393d8c')
prepare() {
cd "${srcdir}"/$pkgname-$pkgver/vendor
@@ -26,10 +31,15 @@ prepare() {
# disable static linking
cd "${srcdir}"/$pkgname-$pkgver
- sed -i '/if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")/,/endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")/d' CMakeLists.txt
- sed -i 's/NAMES json$/&cpp/' cmake/modules/Findjsoncpp.cmake
+ git apply "${srcdir}"/$pkgname.patch
- install -d build
+# https://github.com/trezor/trezord/issues/32
+# Generate Protocol Buffers
+ cd "${srcdir}"/trezor-common/protob
+ protoc --cpp_out="${srcdir}"/$pkgname-$pkgver/src/config config.proto
+
+# prepare build dir
+ install -d "${srcdir}"/$pkgname-$pkgver/build
}
build() {
@@ -37,6 +47,7 @@ build() {
cmake -DCMAKE_BUILD_TYPE=Release ..
make
+ cd "${srcdir}"/$pkgname-$pkgver
}
package() {
diff --git a/trezord.patch b/trezord.patch
new file mode 100644
index 000000000000..63d82a5f5ce3
--- /dev/null
+++ b/trezord.patch
@@ -0,0 +1,32 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c0e2cf..fd3dceb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -58,14 +58,6 @@ target_link_libraries(trezord ${OS_LIBRARIES})
+ # add dynamic libs
+ find_package(CURL REQUIRED)
+ find_package(libmicrohttpd REQUIRED)
+-
+-# add static libs
+-if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+- set(BUILD_SHARED_LIBS off)
+- set(Boost_USE_STATIC_LIBS on)
+- set(CMAKE_FIND_STATIC FIRST)
+-endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ find_package(Boost 1.53.0 REQUIRED
+ regex thread system unit_test_framework program_options chrono)
+ find_package(Protobuf 2.5.0 REQUIRED)
+diff --git a/cmake/modules/Findjsoncpp.cmake b/cmake/modules/Findjsoncpp.cmake
+index b51a2db..e4a3b7c 100644
+--- a/cmake/modules/Findjsoncpp.cmake
++++ b/cmake/modules/Findjsoncpp.cmake
+@@ -4,7 +4,7 @@
+
+ find_path(JSONCPP_INCLUDE_DIR json
+ HINTS "${CMAKE_SOURCE_DIR}/vendor/jsoncpp/include")
+-find_library(JSONCPP_LIBRARY NAMES json
++find_library(JSONCPP_LIBRARY NAMES jsoncpp
+ HINTS "${CMAKE_BINARY_DIR}/lib/jsoncpp/lib")
+
+ set(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})