aboutsummaryrefslogtreecommitdiff
path: root/misc/swege
diff options
context:
space:
mode:
authorIvan Kovmir <ikovmir@uninstance.cc>2022-08-19 19:15:52 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-08-20 10:06:43 +0700
commit692dd8b0940fb7cbc79f2a079e492c1dce4f4081 (patch)
treefb7ebf040171aa97e6885b9168160086209c892c /misc/swege
parent5c7ed69a6c13d40655ee7c33d3eb898db9d4e9ac (diff)
misc/swege: Added (Static WEbsite GEnerator)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/swege')
-rw-r--r--misc/swege/README23
-rw-r--r--misc/swege/slack-desc19
-rw-r--r--misc/swege/swege.SlackBuild91
-rw-r--r--misc/swege/swege.info10
4 files changed, 143 insertions, 0 deletions
diff --git a/misc/swege/README b/misc/swege/README
new file mode 100644
index 0000000000000..e62ec2e133628
--- /dev/null
+++ b/misc/swege/README
@@ -0,0 +1,23 @@
+swege is a Static WEbsite GEnerator written in C. It leverages the
+discount library for generating a website from a set of Markdown files.
+
+You can obtain a template project from /usr/share/swege-*/example.
+
+Copy the example directory to a location of choice:
+`cp -r /usr/share/swege-*/example ~/mycoolsite`
+
+Enter your directory, edit swege.ini and run swege:
+`cd ~/mycoolsite && $EDITOR swege.ini && swege`
+
+For FAQ, and other information read the project README.md, can be
+found in /usr/share/swege-*/repository-README.md.
+
+-----------------------------------------------------------------------
+
+You have to write two files: the header, and the footer. These get
+added to the top, and the bottom of the rest of the pages of your
+website.
+
+All the Markdown (*.md) files, prior to being copied into the output
+folder, are translated into HTML during "compilation". The rest of the
+files are simply copied to the output folder.
diff --git a/misc/swege/slack-desc b/misc/swege/slack-desc
new file mode 100644
index 0000000000000..b40ad4817ee0d
--- /dev/null
+++ b/misc/swege/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+swege: swege (Static WEbsite GEnerator)
+swege:
+swege: Bloat free static website generator written in C99.
+swege:
+swege:
+swege:
+swege:
+swege:
+swege:
+swege: https://github.com/sakhmatd/swege
+swege:
diff --git a/misc/swege/swege.SlackBuild b/misc/swege/swege.SlackBuild
new file mode 100644
index 0000000000000..771eca9d70052
--- /dev/null
+++ b/misc/swege/swege.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+# Slackware build script for swege
+
+# Copyright 2022 Ivan Kovmir <ikovmir@uninstance.cc>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd "$(dirname "$0")" ; CWD=$(pwd)
+
+PRGNAM=swege
+VERSION=${VERSION:-1.2.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$(uname -m) ;;
+ esac
+fi
+
+if [ -n "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP="${TMP:-/tmp/SBo}"
+SRC="$TMP/$PRGNAM-$VERSION"
+PKG="$TMP/package-$PRGNAM"
+OUTPUT="${OUTPUT:-/tmp}"
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+set -e
+
+rm -rf "$PKG"
+mkdir -p "$TMP" "$PKG" "$OUTPUT"
+cd "$TMP"
+rm -rf "$PRGNAM-$VERSION"
+tar xvf "$CWD/$PRGNAM-$VERSION.tar.gz"
+cd "$PRGNAM-$VERSION"
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+INSTALL_PREFIX="/usr"
+
+CFLAGS="$SLKCFLAGS" make
+DESTDIR="$PKG" PREFIX="$INSTALL_PREFIX" make install
+strip -s "$PKG$INSTALL_PREFIX/bin/$PRGNAM"
+
+mkdir -p "$PKG/install"
+mkdir -p "$PKG/usr/doc/$PRGNAM-$VERSION"
+mkdir -p "$PKG/usr/share/$PRGNAM-$VERSION"
+cp "$CWD/$PRGNAM.SlackBuild" "$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild"
+cp "$CWD/README" "$PKG/usr/doc/$PRGNAM-$VERSION/README"
+cp "$CWD/slack-desc" "$PKG/install/slack-desc"
+
+# Copy useful things directly from the repository folder.
+cp "$SRC/README.md" "$PKG/usr/share/$PRGNAM-$VERSION/repository-README.md"
+cp "$SRC/LICENSE" "$PKG/usr/share/$PRGNAM-$VERSION/LICENSE"
+cp -r "$SRC/example" "$PKG/usr/share/$PRGNAM-$VERSION/example"
+
+cd "$PKG"
+/sbin/makepkg -l y -c n "$OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
diff --git a/misc/swege/swege.info b/misc/swege/swege.info
new file mode 100644
index 0000000000000..0efe0563583cd
--- /dev/null
+++ b/misc/swege/swege.info
@@ -0,0 +1,10 @@
+PRGNAM="swege"
+VERSION="1.2.0"
+HOMEPAGE="https://github.com/sakhmatd/swege"
+DOWNLOAD="https://github.com/sakhmatd/swege/archive/1.2.0/swege-1.2.0.tar.gz"
+MD5SUM="948c56834c2b01447ed4fe57bb99a52b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="discount"
+MAINTAINER="Ivan Kovmir"
+EMAIL="ikovmir@uninstance.cc"