Skip to content

Commit

Permalink
Create initial snapcraft configurations (dashpay#38)
Browse files Browse the repository at this point in the history
* Create initial snapcraft configurations

* Change version to 5.0.0
  • Loading branch information
bytzck authored and ckti committed Apr 26, 2022
1 parent 0d0411d commit 4a6e247
Show file tree
Hide file tree
Showing 11 changed files with 414 additions and 0 deletions.
Binary file added snap/local/desktop/desktop.zip
Binary file not shown.
15 changes: 15 additions & 0 deletions snap/local/desktop/wagerr-qt.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html

[Desktop Entry]
Encoding=UTF-8
Name=Wagerr Qt
Comment=Wagerr Digital Currency QT Official release
GenericName=Wagerr Digital Currency QT client main network
Exec=wagerr.qt %u
Terminal=false
Type=Application
Icon=${SNAP}/wagerr-qt.png
MimeType=x-scheme-handler/wagerr;
Categories=X-Office;X-Finance;
Keywords=internet;wagerr;zwgr;wagerr;core;wallet;qt;main;snap;launchpad;crypto;digital;currency;coin;token;zerocoin;
Version=5.0.0
Binary file added snap/local/desktop/wagerr-qt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions snap/local/desktop/wagerr-qt_regtest.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html

[Desktop Entry]
Encoding=UTF-8
Name=Wagerr Qt
Comment=Wagerr Digital Currency QT regression test network
GenericName=Wagerr Digital Currency QT client regtest network
Exec=wagerr.qt-regtest %u
Terminal=false
Type=Application
Icon=${SNAP}/wagerr-qt_regtest.png
MimeType=x-scheme-handler/wagerr;
Categories=X-Office;X-Finance;
Keywords=internet;wagerr;zwgr;wagerr;core;wallet;qt;regtest;snap;launchpad;crypto;digital;currency;coin;token;zerocoin;
Version=5.0.0
Binary file added snap/local/desktop/wagerr-qt_regtest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions snap/local/desktop/wagerr-qt_testnet.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html

[Desktop Entry]
Encoding=UTF-8
Name=Wagerr Qt
Comment=Wagerr Digital Currency QT test network
GenericName=Wagerr Digital Currency QT client testnet network
Exec=wagerr.qt-testnet %u
Terminal=false
Type=Application
Icon=${SNAP}/wagerr-qt_testnet.png
MimeType=x-scheme-handler/wagerr;
Categories=X-Office;X-Finance;
Keywords=internet;wagerr;zwgr;wagerr;core;wallet;qt;testnet;snap;launchpad;crypto;digital;currency;coin;token;zerocoin;
Version=5.0.0
Binary file added snap/local/desktop/wagerr-qt_testnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions snap/local/patches/X001-default_data_dir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/src/util.cpp 2021-07-02 14:00:05.384677604 +0100
+++ b/src/util.cpp 2021-07-02 14:02:18.761271092 +0100
@@ -671,7 +671,7 @@
return GetSpecialFolderPath(CSIDL_APPDATA) / "Wagerr";
#else
fs::path pathRet;
- char* pszHome = getenv("HOME");
+ char* pszHome = getenv("SNAP_USER_COMMON");
if (pszHome == nullptr || strlen(pszHome) == 0)
pathRet = fs::path("/");
else

36 changes: 36 additions & 0 deletions snap/local/patches/X002-fix-bdb-tmp-folder.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From dcfe31b190ab8a28f2617914afdf15c6be2a74d2 Mon Sep 17 00:00:00 2001
From: cevap <dev@i2pmail.org>
Date: Mon, 4 Feb 2019 07:41:47 +0100
Subject: [PATCH] fix-bdb-tmp-folder

---
depends/packages/bdb.mk | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk
index 6c9876c..291111c 100644
--- a/depends/packages/bdb.mk
+++ b/depends/packages/bdb.mk
@@ -13,6 +13,19 @@ $(package)_cxxflags=-std=c++11
endef

define $(package)_preprocess_cmds
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' csharp/DatabaseEnvironment.cs && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' csharp/DatabaseEnvironmentConfig.cs && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' csharp/doc/libdb_dotnet48.XML && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' docs/api_reference/C/envset_tmp_dir.html && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' docs/api_reference/CXX/envset_tmp_dir.html && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' docs/csharp/html/F_BerkeleyDB_DatabaseEnvironmentConfig_TempDir.htm && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' docs/csharp/html/P_BerkeleyDB_DatabaseEnvironment_TempDir.htm && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' docs/java/com/sleepycat/db/EnvironmentConfig.html && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' docs/programmer_reference/test.html && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' java/src/com/sleepycat/db/EnvironmentConfig.java && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' os/os_tmpdir.c && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' php_db4/samples/simple_counter.php && \
+ sed -i.old 's/\/var\/tmp/$HOME\/snap\/wagerr\/common\/var\/tmp/g' php_db4/samples/transactional_counter.php && \
sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h && \
sed -i.old 's/atomic_init/atomic_init_db/' dbinc/atomic.h mp/mp_region.c mp/mp_mvcc.c mp/mp_fget.c mutex/mut_method.c mutex/mut_tas.c && \
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist
--
2.17.1

11 changes: 11 additions & 0 deletions snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/share/genbuild.sh 2021-07-02 14:42:34.929275467 +0100
+++ b/share/genbuild.sh 2021-07-02 14:43:24.141157299 +0100
@@ -36,7 +36,7 @@

# otherwise generate suffix from git, i.e. string like "59887e8-dirty"
SUFFIX=$(git rev-parse --short HEAD)
- git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty"
+ git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-snap"
fi

if [ -n "$DESC" ]; then
Loading

0 comments on commit 4a6e247

Please sign in to comment.