[arch-commits] Commit in electrum/trunk (2 files)

Timothy Redaelli tredaelli at archlinux.org
Fri Feb 26 18:12:14 UTC 2016


    Date: Friday, February 26, 2016 @ 19:12:13
  Author: tredaelli
Revision: 163517

upgpkg: electrum 2.6-1

Added:
  electrum/trunk/60b595356b8c049adc296deb0ffe65b357500ab4.patch
Modified:
  electrum/trunk/PKGBUILD

------------------------------------------------+
 60b595356b8c049adc296deb0ffe65b357500ab4.patch |   29 +++++++++++++++++++++++
 PKGBUILD                                       |   25 ++++++++++++-------
 2 files changed, 45 insertions(+), 9 deletions(-)

Added: 60b595356b8c049adc296deb0ffe65b357500ab4.patch
===================================================================
--- 60b595356b8c049adc296deb0ffe65b357500ab4.patch	                        (rev 0)
+++ 60b595356b8c049adc296deb0ffe65b357500ab4.patch	2016-02-26 18:12:13 UTC (rev 163517)
@@ -0,0 +1,29 @@
+From 60b595356b8c049adc296deb0ffe65b357500ab4 Mon Sep 17 00:00:00 2001
+From: Andreas Hilboll <andreas at hilboll.de>
+Date: Tue, 5 Jan 2016 12:13:15 +0100
+Subject: [PATCH] BUG: allow non-root installation on linux
+
+fixes #1607
+---
+ setup.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+ mode change 100644 => 100755 setup.py
+
+diff --git a/setup.py b/setup.py
+old mode 100644
+new mode 100755
+index 117a7ba..943f572
+--- a/setup.py
++++ b/setup.py
+@@ -17,6 +17,11 @@
+ 
+ if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']:
+     usr_share = os.path.join(sys.prefix, "share")
++    if not os.access(usr_share, os.W_OK):
++        if 'XDG_DATA_HOME' in os.environ.keys():
++            usr_share = os.environ['$XDG_DATA_HOME']
++        else:
++            usr_share = os.path.expanduser('~/.local/share')
+     data_files += [
+         (os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
+         (os.path.join(usr_share, 'pixmaps/'), ['icons/electrum.png'])

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-02-26 17:55:12 UTC (rev 163516)
+++ PKGBUILD	2016-02-26 18:12:13 UTC (rev 163517)
@@ -5,7 +5,7 @@
 # http://bitcoin-otc.com/viewgpg.php?nick=ThomasV
 
 pkgname=electrum
-pkgver=2.5.4
+pkgver=2.6
 pkgrel=1
 pkgdesc="Lightweight Bitcoin wallet"
 arch=('any')
@@ -16,12 +16,15 @@
             'python2-matplotlib: plot transaction history in graphical mode'
             'zbar: QR code reading support')
 url="https://electrum.org"
-license=('GPL3')
-source=("https://download.electrum.org/${pkgver}/${pkgname^}-${pkgver}.tar.gz"{,.asc})
-md5sums=('a36929bf236c22095e656a3b34003af2'
-         'SKIP')
-sha256sums=('c0b00f440884fe3f087e842c44914e1c5f1139d0288ecb74ba6e1ff0b2504aa3'
-            'SKIP')
+license=(MIT)
+source=("https://download.electrum.org/${pkgver}/${pkgname^}-${pkgver}.tar.gz"{,.asc}
+        60b595356b8c049adc296deb0ffe65b357500ab4.patch)
+md5sums=('63039f6e307274829a9b8cd0662e40e9'
+         'SKIP'
+         '99509675fb508c1d10ded5cb8dd1acff')
+sha256sums=('6adb213f042fc4cdefca6675948d3a7d4b5d7ec89178d3388626ee5e0e032d29'
+            'SKIP'
+            'f157421a54ffd001fb0957a557f0a3a91709424ae4b78b97f0eda9e053ac3c81')
 validpgpkeys=('6694D8DE7BE8EE5631BED9502BD5824B7F9470E6')
 
 provides=('electrum')
@@ -30,8 +33,11 @@
 prepare() {
   cd ${pkgname^}-${pkgver}
 
-  find . -type f -exec sed -i 's#/usr/bin/python#/usr/bin/python2#g' {} +
-  find . -type f -exec sed -i 's#/usr/bin/env python#/usr/bin/env python2#g' {} +
+  find . -type f -exec sed -i 's#/usr/bin/python$#/usr/bin/python2#g' {} +
+  find . -type f -exec sed -i 's#/usr/bin/env python$#/usr/bin/env python2#g' {} +
+
+  # Revert commit 60b595356b8c049adc296deb0ffe65b357500ab4
+  patch -Rp1 -i "$srcdir/60b595356b8c049adc296deb0ffe65b357500ab4.patch"
 }
 
 build() {
@@ -45,4 +51,5 @@
   cd ${pkgname^}-${pkgver}
 
   python2 setup.py install --root="${pkgdir}" --optimize=1
+  install -D -m644 LICENCE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
 }



More information about the arch-commits mailing list