diff --git a/snap/local/desktop/desktop.zip b/snap/local/desktop/desktop.zip new file mode 100644 index 0000000000000..88778192432f6 Binary files /dev/null and b/snap/local/desktop/desktop.zip differ diff --git a/snap/local/desktop/wagerr-qt.desktop b/snap/local/desktop/wagerr-qt.desktop new file mode 100755 index 0000000000000..acadadbd91d63 --- /dev/null +++ b/snap/local/desktop/wagerr-qt.desktop @@ -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 diff --git a/snap/local/desktop/wagerr-qt.png b/snap/local/desktop/wagerr-qt.png new file mode 100644 index 0000000000000..d04030e0915dc Binary files /dev/null and b/snap/local/desktop/wagerr-qt.png differ diff --git a/snap/local/desktop/wagerr-qt_regtest.desktop b/snap/local/desktop/wagerr-qt_regtest.desktop new file mode 100755 index 0000000000000..4b3df7fc21f61 --- /dev/null +++ b/snap/local/desktop/wagerr-qt_regtest.desktop @@ -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 \ No newline at end of file diff --git a/snap/local/desktop/wagerr-qt_regtest.png b/snap/local/desktop/wagerr-qt_regtest.png new file mode 100644 index 0000000000000..b2a4f22006384 Binary files /dev/null and b/snap/local/desktop/wagerr-qt_regtest.png differ diff --git a/snap/local/desktop/wagerr-qt_testnet.desktop b/snap/local/desktop/wagerr-qt_testnet.desktop new file mode 100755 index 0000000000000..e2bb80289062f --- /dev/null +++ b/snap/local/desktop/wagerr-qt_testnet.desktop @@ -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 \ No newline at end of file diff --git a/snap/local/desktop/wagerr-qt_testnet.png b/snap/local/desktop/wagerr-qt_testnet.png new file mode 100644 index 0000000000000..b0e1e08ff1249 Binary files /dev/null and b/snap/local/desktop/wagerr-qt_testnet.png differ diff --git a/snap/local/patches/X001-default_data_dir.patch b/snap/local/patches/X001-default_data_dir.patch new file mode 100644 index 0000000000000..00b96ade08b19 --- /dev/null +++ b/snap/local/patches/X001-default_data_dir.patch @@ -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 + diff --git a/snap/local/patches/X002-fix-bdb-tmp-folder.patch b/snap/local/patches/X002-fix-bdb-tmp-folder.patch new file mode 100644 index 0000000000000..4c548428bbc62 --- /dev/null +++ b/snap/local/patches/X002-fix-bdb-tmp-folder.patch @@ -0,0 +1,36 @@ +From dcfe31b190ab8a28f2617914afdf15c6be2a74d2 Mon Sep 17 00:00:00 2001 +From: cevap +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 + diff --git a/snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch b/snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch new file mode 100644 index 0000000000000..a383e31afae43 --- /dev/null +++ b/snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch @@ -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 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100755 index 0000000000000..48074acef7a9c --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,310 @@ +# Copyright (c) 2018-2021 The Wagerr developers +name: wagerr +base: core18 +version: 5.0.0 +summary: wagerr, digital currency for media content +description: | + WAGERR is an open-source decentralized peer-to-peer currency featuring a Delegated Proof of Stake algorithm + designed to empower content creators through transparent media analytics and blockchain tokenization. + + - The WAGERR network features three layers. + - The first is the core code that makes WAGERR a decentralized currency. It is composed of all users and powered by the permissionless staking network. + - The second is the Guardian Validator Node network which consists of enterprise companies partnering with WAGERR to operate validator nodes to help secure, + guide, and grow the network. + - The third is the Token layer, designed for creators and users alike to help deliver a powerful and new way of sharing and collecting content. + - WAGERR will allow creators to tokenize their media, regulate access to it, and track every view. User engagement data is the basis for effective advertising. + - Transparent Media Analytics means that advertisers can track their ad spend and returns with precision and allocate their advertising budget + to the greatest advantage. + - It also means that creators who attract attention can get paid proportionally for the value they contribute. + - TMAP transforms the model from content ownership and consumption to one of true incentivized partnership + in which content creation, distribution, and engagement all earn proportionate rewards. + + Homepage: https://wagerr.com/ + Blockexplorer (main): https://chainz.cryptoid.info/wagerr/ + Github: https://github.com/wagerr/wagerr/ + Wiki: https://github.com/wagerr/wagerr/wiki + + Social networks/forums: + - Telegram (https://t.me/wagerr) + - twitter (https://twitter.com/wagerr) + - instagram (https://www.instagram.com/wagerr/) + - facebook (https://www.facebook.com/wagerr) +grade: devel +confinement: strict +apps: + daemon: + command: wagerrd + plugs: [network, network-bind, home, removable-media] + #desktop: wagerrd.desktop + environment: + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + daemon-testnet: + command: wagerrd --testnet + plugs: [network, network-bind, home, removable-media] + #desktop: wagerrd_testnet.desktop + environment: + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + daemon-regtest: + command: wagerrd --regtest + plugs: [network, network-bind, home, removable-media] + #desktop: wagerrd_regtest.desktop + environment: + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + qt: + command: wagerr-qt + plugs: [network, network-bind, network-status, unity7, desktop, desktop-legacy, wayland, x11, mir, opengl, home, gsettings, removable-media, screen-inhibit-control, pulseaudio, media-hub] + desktop: wagerr-qt.desktop + environment: + QT_XKB_CONFIG_ROOT: $SNAP_USER_DATA:$SNAP/usr/share:$QT_XKB_CONFIG_ROOT + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + qt-testnet: + command: wagerr-qt --testnet + plugs: [network, network-bind, network-status, unity7, desktop, desktop-legacy, wayland, x11, mir, opengl, home, gsettings, removable-media, screen-inhibit-control, pulseaudio, media-hub] + desktop: wagerr-qt_testnet.desktop + environment: + QT_XKB_CONFIG_ROOT: $SNAP_USER_DATA:$SNAP/usr/share:$QT_XKB_CONFIG_ROOT + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + qt-regtest: + command: wagerr-qt --regtest + plugs: [network, network-bind, network-status, unity7, desktop, desktop-legacy, wayland, x11, mir, opengl, home, gsettings, removable-media, screen-inhibit-control, pulseaudio, media-hub] + desktop: wagerr-qt_regtest.desktop + environment: + QT_XKB_CONFIG_ROOT: $SNAP_USER_DATA:$SNAP/usr/share:$QT_XKB_CONFIG_ROOT + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + cli: + command: wagerr-cli + plugs: [network, network-bind, home, removable-media] + environment: + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + cli-testnet: + command: wagerr-cli --testnet + plugs: [network, network-bind, home, removable-media] + environment: + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + cli-regtest: + command: wagerr-cli --regtest + plugs: [network, network-bind, home, removable-media] + environment: + XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS + tx: + command: wagerr-tx + plugs: [home] + test: + command: test_wagerr + plugs: [home] + testqt: + command: test_wagerr-qt + plugs: [home] +parts: + wagerr: + source: http://github.com/wagerr/wagerr + source-type: git + source-tag: master + plugin: nil + override-build: | + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "CUSTOM SETTINGS" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + # use override prefix if binaries differ from project name, for ion it does, + # project is called ioncore because ion exists already as package. For anybody + # offering non official release and using own SNAP, this variable should be used + # default value is "false", to enable it, use your projects binary prefix + OVERRIDEBINPREFIX="false" + OVERRIDEDATADIR="false" + OVERRIDECONF="${OVERRIDEDATADIR}" + COPYCONF=0 # copy example config into users data folder, 1 = enabled + JOBS=4 # 0 means off and make will run without -j + PATCH=1 # 1 = enabled + SPLASHPNGS=0 # patch pngs to differ visaully from those installed from self compilation or other source like deb + FIXPPCBUILD=1 # if ppc builds fail due to failed qt, apps part will return error and build will fail, 1 = enabled + EXTRALOG=1 # prints env and all installed files at the end of current script + RUNTESTS=0 # run make check after post install part + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "SET OVERRIDE VARIABLES IF SET" # checks OVERRIDEBINPREFIX, OVERRIDEDATADIR and OVERRIDECONF + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + if [ $OVERRIDEBINPREFIX = "false" ]; then + BINPREF="${SNAPCRAFT_PROJECT_NAME}" + else + BINPREF="${OVERRIDEBINPREFIX}" + fi + if [ $OVERRIDEDATADIR = "false" ]; then + DATADIR="${SNAPCRAFT_PROJECT_NAME}" + else + DATADIR="${OVERRIDEDATADIR}" + fi + if [ $OVERRIDECONF = "false" ]; then + CONF="${SNAPCRAFT_PROJECT_NAME}" + else + CONF="${OVERRIDECONF}" + fi + echo "BINPREF VARIABLE - ${BINPREF}" + echo "DATADIR VARIABLE - ${DATADIR}" + echo "CONF VARIABLE - ${CONF}" + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "OVERRIDE ARCHITECTURE" # applies currently only on i386, for i386 architecture, we will use i686-linux-gnu to compile dependencies + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + if [ $SNAPCRAFT_ARCH_TRIPLET = "i386-linux-gnu" ]; then + HOST="i686-linux-gnu" + else + HOST="${SNAPCRAFT_ARCH_TRIPLET}" + fi + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "APPLY PATCHES ${BINPREF}-${SNAPCRAFT_PROJECT_VERSION}" # patches which have to be applied for compilation, replace splash screen + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + cd ${SNAPCRAFT_PART_BUILD} + if [ $PATCH = 1 ]; then + echo "apply patches:" + git apply $SNAPCRAFT_PART_BUILD/snap/local/patches/X001-default_data_dir.patch + git apply $SNAPCRAFT_PART_BUILD/snap/local/patches/X002-fix-bdb-tmp-folder.patch + git apply $SNAPCRAFT_PART_BUILD/snap/local/patches/X003-fix-use-snap-instead-of-dirty.patch + sed -i 's/tar --strip-components/tar --no-same-owner --strip-components/' ${SNAPCRAFT_PART_BUILD}/depends/funcs.mk + else + echo "APPLY .patch files during compilation is disabled, skipping" + fi + if [ $SPLASHPNGS = 1 ]; then + echo "replace splash screen with snapcrafts" + mv -f $SNAPCRAFT_PART_BUILD/contrib/snap/images/splash.png $SNAPCRAFT_PART_BUILD/src/qt/res/images/splash.png + mv -f $SNAPCRAFT_PART_BUILD/contrib/snap/images/splash_regtest.png $SNAPCRAFT_PART_BUILD/src/qt/res/images/splash_regtest.png + mv -f $SNAPCRAFT_PART_BUILD/contrib/snap/images/splash_testnet.png $SNAPCRAFT_PART_BUILD/src/qt/res/images/splash_testnet.png + mv -f $SNAPCRAFT_PART_BUILD/contrib/snap/icons/favicon.ico $SNAPCRAFT_PART_BUILD/share/pixmaps/favicon.ico + mv -f $SNAPCRAFT_PART_BUILD/contrib/snap/icons/favicon_testnet.ico $SNAPCRAFT_PART_BUILD/share/pixmaps/favicon_testnet.ico + mv -f $SNAPCRAFT_PART_BUILD/contrib/snap/icons/favicon_regtest.ico $SNAPCRAFT_PART_BUILD/share/pixmaps/favicon_regtest.ico + mv -f $SNAPCRAFT_PART_BUILD/snap/local/desktop/${BINPREF}.png $SNAPCRAFT_PART_BUILD/src/qt/res/icons/${BINPREF}.png + mv -f $SNAPCRAFT_PART_BUILD/snap/local/desktop/${BINPREF}_testnet.png $SNAPCRAFT_PART_BUILD/src/qt/res/icons/${BINPREF}_testnet.png + mv -f $SNAPCRAFT_PART_BUILD/snap/local/desktop/${BINPREF}_regtest.png $SNAPCRAFT_PART_BUILD/src/qt/res/icons/${BINPREF}_regtest.png + else + echo "patch icons and images is disabled, skipping" + fi + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "BUILD DEPENDENCIES" + echo "PRECOMPILE ${SNAPCRAFT_ARCH_TRIPLET} DEPENDENCIES FOR ${BINPREF}-${SNAPCRAFT_PROJECT_VERSION}" # cd to depends folder, download and precompile + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + cd ${SNAPCRAFT_PART_BUILD}/depends + make download-linux + if [ $JOBS = 0 ]; then + make + else + make -j${JOBS} HOST=${HOST} + fi + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "CONFIGURATION OF ${BINPREF}-${SNAPCRAFT_PROJECT_VERSION}" # run configure with prefix to include depends + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + cd ${SNAPCRAFT_PART_BUILD} + echo "Configure and build ${BINPREF}" + ./autogen.sh + ./configure --prefix=`pwd`/depends/${HOST} + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "COMPILATION OF ${BINPREF}-${SNAPCRAFT_PROJECT_VERSION}" # run make to compile using -j + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + if [ $JOBS = 0 ]; then + make + else + make -j${JOBS} HOST=${HOST} + fi + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "INSTALLATION OF ${BINPREF}-${SNAPCRAFT_PROJECT_VERSION}" # run make install with a prefix where to install + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + make install prefix=${SNAPCRAFT_PART_INSTALL} + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "POST INSTALL SCRIPTS OF ${BINPREF}-${SNAPCRAFT_PROJECT_VERSION}" # run make install with a prefix where to install + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + if [ $FIXPPCBUILD = 1 ]; then + if [ $SNAPCRAFT_ARCH_TRIPLET = "powerpc64le-linux-gnu" ]; then + if [ -e $SNAPCRAFT_PART_BUILD/src/qt/${BINPREF}-qt ]; then + echo "PPC64EL fix - ${BINPREF}-qt exists, fix unrequired" + else + echo "echo ${BINPREF}-qt is not installed" > ${SNAPCRAFT_PART_INSTALL}/usr/bin/${BINPREF}-qt + chmod +x ${SNAPCRAFT_PART_INSTALL}/usr/bin/${BINPREF}-qt + echo "PPC64EL fix - ${BINPREF}-qt does not exist, fix required, dummy as ${BINPREF}-qt" + fi + if [ -e $SNAPCRAFT_PART_BUILD/src/qt/test/test_${BINPREF}-qt ]; then + echo "PPC64EL fix - test_${BINPREF}-qt exists, fix unrequired" + else + echo "echo test_${BINPREF}-qt is not installed" > ${SNAPCRAFT_PART_INSTALL}/usr/bin/test_${BINPREF}-qt + chmod +x ${SNAPCRAFT_PART_INSTALL}/usr/bin/test_${BINPREF}-qt + echo "PPC64EL fix - test_${BINPREF}-qt does not exist, fix required, dummy as test_${BINPREF}-qt" + fi + if [ -e $SNAPCRAFT_PART_BUILD/src/test/test_${BINPREF} ]; then + echo "PPC64EL fix - test_${BINPREF} exists, fix unrequired" + else + echo "echo test_${BINPREF} is not installed" > ${SNAPCRAFT_PART_INSTALL}/usr/bin/test_${BINPREF} + chmod +x ${SNAPCRAFT_PART_INSTALL}/usr/bin/test_${BINPREF} + echo "PPC64EL fix - test_${BINPREF} does not exist, fix required, dummy as test_${BINPREF}" + fi + fi + else + echo "PPC64EL fix disabled, skipping" + fi + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "CONFIG FILE" # create .wagerr folder and copy example config - !!!warning!!!: do not copy as wagerr.conf + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + mkdir -p ${SNAP_USER_COMMON}/.${DATADIR} + if [ $COPYCONF = 1 ]; then + cp ${SNAPCRAFT_PART_BUILD}/contrib/debian/manpages/${CONF}.conf.5 ${SNAP_USER_COMMON}/.${DATADIR}/${CONF}-example.conf + else + echo "COPY CONFIG FILE disabled, skipping" + fi + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "RUN TESTS" # if tests fail to pass, build and release will fail + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + cd ${SNAPCRAFT_PART_BUILD} + if [ $RUNTESTS = 1 ]; then + make check + else + echo "RUN TESTS disabled, skipping" + fi + echo "-----------------------------------------------" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + echo "WAGERR SPECIFIC" + echo "+++++++++++++++++++++++++++++++++++++++++++++++" + build-packages: + - curl + - wget + - gcc + - gcc-8 + - g++ + - g++-8 + - make + - autoconf + - automake + - pkg-config + - libtool + - bsdmainutils + - binutils + - python3 + - help2man + - doxygen + - npm + - libts-dev + stage-packages: + - libxkbcommon0 + - ttf-ubuntu-font-family + - dmz-cursor-theme + - light-themes + - shared-mime-info + - libqt5gui5 + - libgdk-pixbuf2.0-0 + - libqt5svg5 # for loading icon themes which are svg + - locales-all + - qtwayland5 + - ca-certificates + after: + - patches + patches: + source: snap/local/patches + plugin: dump + prime: + - -* + desktop: + source: snap/local/desktop + plugin: dump