summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Thalmeier2018-01-07 09:03:27 +0100
committerMichael Thalmeier2018-01-07 09:03:27 +0100
commit3c6f8e069dc97f32f7b0d965c6ef73a006ddaf80 (patch)
tree81ce7cf003c439207b66bf2f4a1ff40bdecd90a7
downloadaur-3c6f8e069dc97f32f7b0d965c6ef73a006ddaf80.tar.gz
First version of Polis crypto package
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD71
-rw-r--r--polisd@.service12
-rw-r--r--txmempool.patch40
4 files changed, 165 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8d929594a31d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,42 @@
+pkgbase = polis
+ pkgdesc = Polis peer-to-peer network based digital currency
+ pkgver = 1.2.0
+ pkgrel = 0
+ url = http://www.polispay.org/
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = boost
+ makedepends = automoc4
+ makedepends = qrencode
+ makedepends = miniupnpc
+ makedepends = protobuf
+ makedepends = zeromq
+ depends = boost-libs
+ depends = libevent
+ optdepends = zeromq: Optional, allows generating ZMQ notifications
+ optdepends = miniupnpc: Firewall-jumping support
+ optdepends = db4.8: Wallet storage
+ source = polis-daemon-1.2.0.tar.gz::https://github.com/polispay/polis/archive/v1.2.0.tar.gz
+ source = txmempool.patch
+ source = polisd@.service
+ sha256sums = d5bd3482f707dc281a41e1661d0d0081d7a0a54e516046f60921724a3c809619
+ sha256sums = 2d033c1ee77e1fae89da61f3b0e494feaf91f1b860fe4b3c0ec848c013776a25
+ sha256sums = 59fc628be7c2aa6dc6db31d7a621392d2e24f1722328b4cfb0797ffe76e108be
+
+pkgname = polis-daemon
+ pkgdesc = Polis peer-to-peer network based digital currency (daemon)
+
+pkgname = polis-cli
+ pkgdesc = Polis peer-to-peer network based digital currency (CLI)
+
+pkgname = polis-qt
+ pkgdesc = Polis peer-to-peer network based digital currency (Qt)
+ depends = boost-libs
+ depends = libevent
+ depends = qt5-base
+ depends = qt5-tools
+ depends = miniupnpc
+ optdepends = protobuf: Data interchange format used for payment protocol
+ optdepends = qrencode: Optional for generating QR codes
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4ff08b121a0f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Michael Thalmeier <michael@thalmeier.at>
+# Contributor: Michael Thalmeier <michael@thalmeier.at>
+
+pkgname=('polis-daemon' 'polis-cli' 'polis-qt')
+pkgbase=polis
+pkgver=1.2.0
+pkgrel=0
+arch=('i686' 'x86_64')
+url="http://www.polispay.org/"
+depends=('boost-libs' 'libevent')
+makedepends=('boost' 'automoc4' 'qrencode' 'miniupnpc' 'protobuf' 'zeromq')
+optdepends=('zeromq: Optional, allows generating ZMQ notifications'
+ 'miniupnpc: Firewall-jumping support'
+ 'db4.8: Wallet storage')
+pkgdesc="Polis peer-to-peer network based digital currency "
+license=('MIT')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/polispay/polis/archive/v${pkgver}.tar.gz"
+ "txmempool.patch"
+ "polisd@.service")
+sha256sums=('d5bd3482f707dc281a41e1661d0d0081d7a0a54e516046f60921724a3c809619'
+ '2d033c1ee77e1fae89da61f3b0e494feaf91f1b860fe4b3c0ec848c013776a25'
+ '59fc628be7c2aa6dc6db31d7a621392d2e24f1722328b4cfb0797ffe76e108be')
+
+prepare() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ patch -p1 -i "$srcdir/txmempool.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ chmod +x autogen.sh
+ chmod +x share/genbuild.sh
+ ./autogen.sh
+ ./configure --with-incompatible-bdb --enable-hardening --disable-tests
+ make
+}
+
+package_polis-daemon() {
+ pkgdesc+="(daemon)"
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ install -Dm644 "${srcdir}/polisd@.service" "${pkgdir}/usr/lib/systemd/system/polisd@.service"
+ install -Dm755 "src/polisd" "${pkgdir}/usr/bin/polisd"
+ install -Dm644 "contrib/debian/examples/polis.conf" "${pkgdir}/usr/share/doc/${pkgname}/examples/polis.conf"
+ install -Dm644 "contrib/debian/manpages/polisd.1" "${pkgdir}/usr/share/man/man1/polisd.1"
+ install -Dm644 "contrib/debian/manpages/polis.conf.5" "${pkgdir}/usr/share/man/man5/polis.conf.5"
+ install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
+
+package_polis-cli() {
+ pkgdesc+="(CLI)"
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ install -Dm755 "src/polis-cli" "${pkgdir}/usr/bin/polis-cli"
+ install -Dm755 "src/polis-tx" "${pkgdir}/usr/bin/polis-tx"
+ install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
+
+package_polis-qt() {
+ depends+=('qt5-base' 'qt5-tools' 'miniupnpc')
+ optdepends=('protobuf: Data interchange format used for payment protocol'
+ 'qrencode: Optional for generating QR codes')
+
+ pkgdesc+="(Qt)"
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ install -Dm755 "src/qt/polis-qt" "${pkgdir}/usr/bin/polis-qt"
+ install -Dm644 "contrib/debian/polis-qt.desktop" "${pkgdir}/usr/share/applications/polis.desktop"
+ install -Dm644 "share/pixmaps/polis128.png" "${pkgdir}/usr/share/pixmaps/polis128.png"
+ install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
diff --git a/polisd@.service b/polisd@.service
new file mode 100644
index 000000000000..1f2b747c81cc
--- /dev/null
+++ b/polisd@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Polis Daemon
+After=network.target
+
+[Service]
+User=%i
+Group=users
+Type=simple
+ExecStart=/usr/bin/polisd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/txmempool.patch b/txmempool.patch
new file mode 100644
index 000000000000..8481d42d7ca8
--- /dev/null
+++ b/txmempool.patch
@@ -0,0 +1,40 @@
+diff --git a/src/txmempool.h b/src/txmempool.h
+index 89f7283..cbeae80 100644
+--- a/src/txmempool.h
++++ b/src/txmempool.h
+@@ -204,7 +204,7 @@ struct mempoolentry_txid
+ class CompareTxMemPoolEntryByDescendantScore
+ {
+ public:
+- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
++ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
+ {
+ bool fUseADescendants = UseDescendantScore(a);
+ bool fUseBDescendants = UseDescendantScore(b);
+@@ -226,7 +226,7 @@ public:
+ }
+
+ // Calculate which score to use for an entry (avoiding division).
+- bool UseDescendantScore(const CTxMemPoolEntry &a)
++ bool UseDescendantScore(const CTxMemPoolEntry &a) const
+ {
+ double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants();
+ double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize();
+@@ -241,7 +241,7 @@ public:
+ class CompareTxMemPoolEntryByScore
+ {
+ public:
+- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
++ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
+ {
+ double f1 = (double)a.GetModifiedFee() * b.GetTxSize();
+ double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
+@@ -255,7 +255,7 @@ public:
+ class CompareTxMemPoolEntryByEntryTime
+ {
+ public:
+- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
++ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
+ {
+ return a.GetTime() < b.GetTime();
+ }