mirror of
https://github.com/Ponce/slackbuilds
synced 2024-09-29 17:37:55 +02:00
misc/ssss: New maintainer, fixes.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
cf6205c607
commit
969cc941a5
6 changed files with 89 additions and 28 deletions
21
misc/ssss/patches/0003-Fix-use-of-memset.patch
Normal file
21
misc/ssss/patches/0003-Fix-use-of-memset.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
From: Tomasz Buchert <tomasz@debian.org>
|
||||
Date: Wed, 2 Sep 2015 19:44:42 +0200
|
||||
Subject: Fix use of memset
|
||||
|
||||
---
|
||||
ssss.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ssss.c b/ssss.c
|
||||
index 717b98b..d2415b4 100644
|
||||
--- a/ssss.c
|
||||
+++ b/ssss.c
|
||||
@@ -171,7 +171,7 @@ void field_print(FILE* stream, const mpz_t x, int hexmode)
|
||||
size_t t;
|
||||
unsigned int i;
|
||||
int printable, warn = 0;
|
||||
- memset(buf, degree / 8 + 1, 0);
|
||||
+ memset(buf, 0, degree / 8 + 1);
|
||||
mpz_export(buf, &t, 1, 1, 0, 0, x);
|
||||
for(i = 0; i < t; i++) {
|
||||
printable = (buf[i] >= 32) && (buf[i] < 127);
|
22
misc/ssss/patches/0004-Remove-the-direct-PayPal-link.patch
Normal file
22
misc/ssss/patches/0004-Remove-the-direct-PayPal-link.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
From: Tomasz Buchert <tomasz@debian.org>
|
||||
Date: Wed, 2 Sep 2015 20:29:18 +0200
|
||||
Subject: Remove the direct PayPal link
|
||||
|
||||
---
|
||||
doc.html | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/doc.html b/doc.html
|
||||
index 4c79856..d2d3102 100644
|
||||
--- a/doc.html
|
||||
+++ b/doc.html
|
||||
@@ -162,8 +162,7 @@
|
||||
<input name="no_note" value="1" type="hidden">
|
||||
<input name="currency_code" value="EUR" type="hidden">
|
||||
<p>
|
||||
-If you like this software, think about donating some money via
|
||||
- <input src="https://www.paypal.com/en_US/i/btn/x-click-but7.gif" name="submit" alt="PayPal" type="image">.
|
||||
+If you like this software, think about donating some money (<a href="http://point-at-infinity.org/ssss/">information</a>).
|
||||
</p>
|
||||
</form>
|
||||
<hr>
|
2
misc/ssss/patches/series
Normal file
2
misc/ssss/patches/series
Normal file
|
@ -0,0 +1,2 @@
|
|||
0003-Fix-use-of-memset.patch
|
||||
0004-Remove-the-direct-PayPal-link.patch
|
|
@ -1,4 +1,4 @@
|
|||
.TH ssss 1 User Manuals
|
||||
.TH SSSS "1" "July 2023" "0.5" "SlackBuilds.org"
|
||||
.SH NAME
|
||||
ssss \- Split and Combine Secrets using Shamir's Secret Sharing Scheme.
|
||||
.SH SYNOPSIS
|
||||
|
|
|
@ -23,14 +23,21 @@
|
|||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# markus reichelt, slackbuilds@mareichelt.de, 0xCCEEF115
|
||||
# markus reichelt, email removed.
|
||||
# 2011 Apr 07 - initial release
|
||||
|
||||
# 20230709 bkw: BUILD=2
|
||||
# - new maintainer.
|
||||
# - man page symlinks to the actual command names.
|
||||
# - borrow patches from Debian to fix a bug (bad use of memset) and
|
||||
# clean up doc.html so it doesn't load an image from paypal.com every
|
||||
# time you view it.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=ssss
|
||||
VERSION=${VERSION:-0.5}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -42,9 +49,6 @@ if [ -z "$ARCH" ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
|
@ -56,16 +60,12 @@ OUTPUT=${OUTPUT:-/tmp}
|
|||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
@ -77,30 +77,46 @@ rm -rf $PRGNAM-$VERSION
|
|||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
|
||||
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
|
||||
|
||||
mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
# 20230709 bkw: Some patches taken from Debian's ssss-0.5-5. Don't
|
||||
# need the Makefile patch, and the "man page" patch really patches the
|
||||
# XML source to the man page, which doesn't help us because we can't
|
||||
# rebuild the man page anyway.
|
||||
for i in $( cat $CWD/patches/series ); do
|
||||
patch -p1 < $CWD/patches/$i
|
||||
done
|
||||
|
||||
# 20230709 bkw: No 'make install', so manual install.
|
||||
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
PKGBIN=$PKG/usr/bin
|
||||
PKGMAN1=$PKG/usr/man/man1
|
||||
|
||||
mkdir -p $PKGBIN $PKGDOC $PKGMAN1
|
||||
|
||||
sed -i "s/-O2/${SLKCFLAGS}/" Makefile
|
||||
|
||||
# 20230709 bkw: 'make ssss.1' is supposed to build the man page, but
|
||||
# fails. Original script author included the man page with the
|
||||
# script. We can't do "make" with no argument here...
|
||||
make ssss-split
|
||||
make ssss-combine
|
||||
|
||||
cp -a ssss-split ssss-combine $PKG/usr/bin
|
||||
cat $CWD/ssss.1 > $PKG/usr/man/man1/ssss.1
|
||||
# 20230709 bkw: ssss-combine is just a symlink.
|
||||
cp -a ssss-split $PKGBIN
|
||||
ln -s ssss-split $PKGBIN/ssss-combine
|
||||
|
||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
# 20230709 bkw: symlink the man pages to the actual command names, to
|
||||
# avoid guesswork on the user's part.
|
||||
gzip -9c < $CWD/ssss.1 > $PKGMAN1/ssss.1.gz
|
||||
ln -s ssss.1.gz $PKGMAN1/ssss-split.1.gz
|
||||
ln -s ssss.1.gz $PKGMAN1/ssss-combine.1.gz
|
||||
|
||||
gzip -9 $PKG/usr/man/man1/ssss.1
|
||||
|
||||
cp -a HISTORY LICENSE doc.html $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/ssss.1.html > $PKG/usr/doc/$PRGNAM-$VERSION/ssss.1.html
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
# 20230709 bkw: ssss.1.html is the same content as the man page, don't
|
||||
# really need, but it's been in the package for ~11 years, so leave it.
|
||||
cp -a HISTORY LICENSE THANKS doc.html $PKGDOC
|
||||
cat $CWD/ssss.1.html > $PKGDOC/ssss.1.html
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
|
|
@ -6,5 +6,5 @@ MD5SUM="24227252aa195a146d09de1df10357a1"
|
|||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="markus reichelt"
|
||||
EMAIL="slackbuilds@mareichelt.de"
|
||||
MAINTAINER="B. Watson"
|
||||
EMAIL="urchlay@slackware.uk"
|
||||
|
|
Loading…
Reference in a new issue