summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/kc/README9
-rw-r--r--system/kc/kc.SlackBuild55
-rw-r--r--system/kc/kc.info6
-rw-r--r--system/kc/slack-desc2
4 files changed, 62 insertions, 10 deletions
diff --git a/system/kc/README b/system/kc/README
index b8b8f0ef4d..b88731412b 100644
--- a/system/kc/README
+++ b/system/kc/README
@@ -12,3 +12,12 @@ Features include (but not limited to):
* compiles and works on *BSD and Linux
* editline (libedit) and readline support
* clean and simple CLI with command and keychain completion
+
+This SlackBuild has build options to control some of its behavior:
+LIBSCRYPT: If this variable is set, kc will be built with scrypt
+ encrypted passwords support. It needs the libscrypt library
+ for this, that is also available from SBo.
+EDITLINE: If this variable is set, kc will use editline for its
+ command line interface. Otherwise readline will be used.
+ It needs the libedit library for this, that is also available
+ from SBo.
diff --git a/system/kc/kc.SlackBuild b/system/kc/kc.SlackBuild
index 269e3ea54a..cf762d80ae 100644
--- a/system/kc/kc.SlackBuild
+++ b/system/kc/kc.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (c) 2011-2013 LEVAI Daniel
+# Copyright (c) 2011-2018 LEVAI Daniel
# All rights reserved.
#
# * Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=kc
-VERSION=${VERSION:-2.3.2}
+VERSION=${VERSION:-2.4.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -57,12 +57,46 @@ fi
set -e
+
+# XXX Upgrade incompatibility notice
+if [ -f /var/log/packages/kc-*_SBo ];then
+ typeset -i KC_MINOR=$( ls -1 /var/log/packages/kc-*_SBo |cut -d- -f2 |cut -d. -f2 )
+ if [ ${KC_MINOR} -lt 4 ];then
+ echo ""
+ echo "!!! Incompatibility notice !!!"
+ echo ""
+ echo "This SlackBuild has detected a version of kc older than 2.4 on your system."
+ echo "Starting with version 2.4, kc uses a newer database format."
+ echo "What this means is that starting from kc-2.4, it will not be"
+ echo "able to open older databases, and an older kc will not be able"
+ echo "to open newer databases."
+ echo "The recommended upgrade path is detailed in the kc-2.4 package's"
+ echo "Changelog file:"
+ echo "https://github.com/levaidaniel/kc/blob/2.4/Changelog"
+ echo "... but here is a shallow outline of the procedure:"
+ echo "1) Dump your database as an XML file with your old kc."
+ echo " See the dump command's description."
+ echo "2) Upgrade kc to version 2.4 or later."
+ echo "3) Create a new empty database."
+ echo "4) Import your XML dump into your empty database."
+ echo "5) Shred your XML export."
+ echo ""
+ echo "But really, you should check the Changelog file for detailed instructions."
+ echo ""
+ echo -n "Type in UPGRADE, if you are ready to upgrade: "; read
+
+ if [ "${REPLY}" != 'UPGRADE' ];then
+ echo "Not ready to upgrade!"
+ exit 1;
+ fi
+ fi
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-[ -e $CWD/$VERSION.tar.gz ] && tar xvf $CWD/$VERSION.tar.gz
-[ -e $CWD/$PRGNAM-$VERSION.tar.gz ] && tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -71,8 +105,17 @@ 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 {} \;
-CFLAGS="$SLKCFLAGS" make -f GNUMakefile HAVE_PCRE=y
-make -f GNUMakefile install DESTDIR=$PKG PREFIX=/usr
+
+if [ -n "${LIBSCRYPT}" ];then
+ LIBSCRYPT="HAVE_LIBSCRYPT=y"
+fi
+
+if [ -n "${EDITLINE}" ];then
+ EDITLINE="EDITLINE=y"
+fi
+
+CFLAGS="$SLKCFLAGS" make -f Makefile.linux HAVE_PCRE=y ${LIBSCRYPT} ${EDITLINE}
+make -f Makefile.linux install DESTDIR=$PKG PREFIX=/usr
strip --strip-unneeded $PKG/usr/bin/kc
gzip -9 $PKG/usr/man/man1/kc.1
diff --git a/system/kc/kc.info b/system/kc/kc.info
index 81735120da..be573e9711 100644
--- a/system/kc/kc.info
+++ b/system/kc/kc.info
@@ -1,8 +1,8 @@
PRGNAM="kc"
-VERSION="2.3.2"
+VERSION="2.4.2"
HOMEPAGE="https://github.com/levaidaniel/kc"
-DOWNLOAD="https://github.com/levaidaniel/kc/archive/2.3.2.tar.gz"
-MD5SUM="efb9369e6f44ba254d4e1a5c0d4443a5"
+DOWNLOAD="https://github.com/levaidaniel/kc/releases/download/2.4.2/kc-2.4.2.tar.bz2"
+MD5SUM="c75a1a06677f40abc319c83c80cccc4b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libbsd"
diff --git a/system/kc/slack-desc b/system/kc/slack-desc
index 1aaf055c89..6a39d94441 100644
--- a/system/kc/slack-desc
+++ b/system/kc/slack-desc
@@ -11,7 +11,7 @@ kc:
kc: A console based password storing application using an encrypted XML
kc: document as its database.
kc:
-kc: Homepage: http://keychain.googlecode.com
+kc: Homepage: https://github.com/levaidaniel/kc
kc:
kc:
kc: