aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <slackbuilds@jaxartes.net>2020-04-04 10:51:34 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-11 09:29:58 +0700
commit30787b6352a16f2f9d555e7bda6b7030a25d1471 (patch)
treea707807404d264c0a54f90d3437d4e7902487677
parent3ec297b7fe238b8e13969cc3354cd20ebebbdcb1 (diff)
development/nim: Updated for version 1.2.0.
Signed-off-by: Benjamin Trigona-Harany <slackbuilds@jaxartes.net> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--development/nim/doinst.sh27
-rw-r--r--development/nim/nim.SlackBuild7
-rw-r--r--development/nim/nim.info6
3 files changed, 35 insertions, 5 deletions
diff --git a/development/nim/doinst.sh b/development/nim/doinst.sh
new file mode 100644
index 0000000000000..f10f578c2dd5e
--- /dev/null
+++ b/development/nim/doinst.sh
@@ -0,0 +1,27 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/nim/nim.cfg.new
+preserve_perms etc/nim/nimdoc.cfg.new
+preserve_perms etc/nim/nimdoc.tex.cfg.new
diff --git a/development/nim/nim.SlackBuild b/development/nim/nim.SlackBuild
index bcd2076189f6c..6add559102f96 100644
--- a/development/nim/nim.SlackBuild
+++ b/development/nim/nim.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=nim
-VERSION=${VERSION:-1.0.6}
+VERSION=${VERSION:-1.2.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -92,7 +92,9 @@ mkdir -p $PKG/usr/include
mv $PKG/usr/lib/nim/*.h $PKG/usr/include/
mkdir -p $PKG/etc/nim
-mv pkg/nim/config/* $PKG/etc/nim/
+mv pkg/nim/config/nim.cfg $PKG/etc/nim/nim.cfg.new
+mv pkg/nim/config/nimdoc.cfg $PKG/etc/nim/nimdoc.cfg.new
+mv pkg/nim/config/nimdoc.tex.cfg $PKG/etc/nim/nimdoc.tex.cfg.new
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
@@ -105,6 +107,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/nim/nim.info b/development/nim/nim.info
index 9c506614f9a6d..28c4710278f12 100644
--- a/development/nim/nim.info
+++ b/development/nim/nim.info
@@ -1,8 +1,8 @@
PRGNAM="nim"
-VERSION="1.0.6"
+VERSION="1.2.0"
HOMEPAGE="https://nim-lang.org"
-DOWNLOAD="https://nim-lang.org/download/nim-1.0.6.tar.xz"
-MD5SUM="b417109c46540411d96d08c370cff6a9"
+DOWNLOAD="https://nim-lang.org/download/nim-1.2.0.tar.xz"
+MD5SUM="66340fb3f424535a33a66c4557923124"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""