From 655a76d62a87c763e39e870b9d0f4c810fbdd37c Mon Sep 17 00:00:00 2001 From: Erik Hanson Date: Wed, 15 Mar 2017 08:02:37 -0500 Subject: network/dobbscoin: Updated for version 0.10.1, patched. Added patch from Larry Hajali for newer versions of miniupnpc. Added documentation, example config, and desktop file, thanks to Christoph Willing. Signed-off-by: Erik Hanson . --- network/dobbscoin/dobbscoin.SlackBuild | 61 ++++++++++++++----------------- network/dobbscoin/dobbscoin.info | 6 +-- network/dobbscoin/miniupnpc-1.9-api.patch | 29 +++++++++++++++ 3 files changed, 59 insertions(+), 37 deletions(-) create mode 100644 network/dobbscoin/miniupnpc-1.9-api.patch diff --git a/network/dobbscoin/dobbscoin.SlackBuild b/network/dobbscoin/dobbscoin.SlackBuild index 6e94cf07c4..defc639fc5 100644 --- a/network/dobbscoin/dobbscoin.SlackBuild +++ b/network/dobbscoin/dobbscoin.SlackBuild @@ -25,7 +25,7 @@ # based on bitcoin.SlackBuild by nomnombtc PRGNAM=dobbscoin -VERSION=${VERSION:-0.8.7.0} +VERSION=${VERSION:-0.10.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -77,49 +77,42 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# build dobbscoin-qt -qmake \ - QMAKE_CFLAGS+="$SLKCFLAGS" \ - QMAKE_CXXFLAGS+="$SLKCFLAGS -DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT=1" \ - USE_UPNP="$UPNP" \ - USE_QRCODE="$QRCODE" \ - USE_SSL=1 +# Fix for miniupnpc >= 1.9.20150730. +# Source: https://github.com/dogecoin/dogecoin/issues/1292 +patch -p1 < $CWD/miniupnpc-1.9-api.patch -make +./autogen.sh -# build dobbscoind -cd src +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-silent-rules \ + --enable-static=no \ + --with-gui="${QTGUI:-qt4}" \ + --build=$ARCH-slackware-linux - if [ "$UPNP" = "-" ]; then - # disable UPNP - sed -i 's/USE_UPNP:=0/USE_UPNP:=/g' makefile.unix - fi +make +make install DESTDIR=$PKG - # disable static linking, not supported by boost in slackware - sed -i 's/Bstatic/Bdynamic/g' makefile.unix +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - CFLAGS="$SLKCFLAGS" \ - CXXFLAGS="$SLKCFLAGS -DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT=1" \ - make -f makefile.unix \ - dobbscoind \ - USE_SSL=1 -cd - +mkdir -p $PKG/usr/man/man{1,5} +install -m 0644 contrib/debian/manpages/*.1 $PKG/usr/man/man1/ +install -m 0644 contrib/debian/manpages/*.5 $PKG/usr/man/man5/ +find $PKG/usr/man -type f -exec gzip -9 {} \; -mkdir -p $PKG/usr/bin mkdir -p $PKG/usr/share/{applications,pixmaps} - -install -m 0755 dobbscoin-qt $PKG/usr/bin/ -install -m 0755 src/dobbscoind $PKG/usr/bin/ - -install -m 0644 src/qt/res/icons/dobbscoin.png $PKG/usr/share/pixmaps/ -install -m 0644 $CWD/dobbscoin-qt.desktop $PKG/usr/share/applications/ - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +install -m 0644 contrib/debian/dobbscoin-qt.desktop $PKG/usr/share/applications/ +install -m 0644 share/pixmaps/dobbscoin128.xpm $PKG/usr/share/pixmaps/ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a doc/README.md COPYING $PKG/usr/doc/$PRGNAM-$VERSION +cp -a doc/* COPYING contrib/debian/examples/dobbscoin.conf $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/network/dobbscoin/dobbscoin.info b/network/dobbscoin/dobbscoin.info index 76af06f80b..8b0a4770fb 100644 --- a/network/dobbscoin/dobbscoin.info +++ b/network/dobbscoin/dobbscoin.info @@ -1,8 +1,8 @@ PRGNAM="dobbscoin" -VERSION="0.8.7.0" +VERSION="0.10.1" HOMEPAGE="http://dobbscoin.info/" -DOWNLOAD="https://github.com/dobbscoin/dobbscoin-source/archive/v0.8.7.0.tar.gz" -MD5SUM="cfdd854deafb755b9752c2e0a28d31e0" +DOWNLOAD="https://github.com/dobbscoin/dobbscoin-source/archive/v0.10.1/dobbscoin-source-0.10.1.tar.gz" +MD5SUM="9330b729ebdd458c1ee2825294dffdd2" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="protobuf" diff --git a/network/dobbscoin/miniupnpc-1.9-api.patch b/network/dobbscoin/miniupnpc-1.9-api.patch new file mode 100644 index 0000000000..2fe88bac4b --- /dev/null +++ b/network/dobbscoin/miniupnpc-1.9-api.patch @@ -0,0 +1,29 @@ +From 984e204d7c60f0d0c5cc7d1c3a5daefcd7433f6e Mon Sep 17 00:00:00 2001 +From: acerix +Date: Wed, 7 Oct 2015 20:33:08 -0400 +Subject: [PATCH] apply bitcoin patch for miniupnpc 1.9 + +--- + src/net.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/net.cpp b/src/net.cpp +index 279ee4d..f7ea000 100644 +--- a/src/net.cpp ++++ b/src/net.cpp +@@ -1109,10 +1109,14 @@ void ThreadMapPort() + #ifndef UPNPDISCOVER_SUCCESS + /* miniupnpc 1.5 */ + devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0); +-#else ++#elif MINIUPNPC_API_VERSION < 14 + /* miniupnpc 1.6 */ + int error = 0; + devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error); ++#else ++ /* miniupnpc 1.9.20150730 */ ++ int error = 0; ++ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error); + #endif + + struct UPNPUrls urls; -- cgit v1.2.3