From 8c5e80a9396e6dae0455c96ebe4b5af8a761039e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Arg=C3=BCelles?= Date: Sat, 6 Feb 2021 05:03:53 +0000 Subject: system/scdoc: Added (small man page generator) Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- system/scdoc/README | 3 ++ system/scdoc/fix-makefile.patch.gz | Bin 0 -> 689 bytes system/scdoc/scdoc.SlackBuild | 97 +++++++++++++++++++++++++++++++++++++ system/scdoc/scdoc.info | 10 ++++ system/scdoc/slack-desc | 19 ++++++++ 5 files changed, 129 insertions(+) create mode 100644 system/scdoc/README create mode 100644 system/scdoc/fix-makefile.patch.gz create mode 100644 system/scdoc/scdoc.SlackBuild create mode 100644 system/scdoc/scdoc.info create mode 100644 system/scdoc/slack-desc (limited to 'system') diff --git a/system/scdoc/README b/system/scdoc/README new file mode 100644 index 0000000000..3c4b288e25 --- /dev/null +++ b/system/scdoc/README @@ -0,0 +1,3 @@ +scdoc is a simple man page generator for POSIX systems written in C99. + +It requires the input files to be UTF-8 encoded. diff --git a/system/scdoc/fix-makefile.patch.gz b/system/scdoc/fix-makefile.patch.gz new file mode 100644 index 0000000000..a9918c14cc Binary files /dev/null and b/system/scdoc/fix-makefile.patch.gz differ diff --git a/system/scdoc/scdoc.SlackBuild b/system/scdoc/scdoc.SlackBuild new file mode 100644 index 0000000000..fb7418e537 --- /dev/null +++ b/system/scdoc/scdoc.SlackBuild @@ -0,0 +1,97 @@ +#!/bin/sh + +# Slackware build script for scdoc + +# Copyright 2021 Manuel Argüelles Panama City, Panama +# 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. + +PRGNAM=scdoc +VERSION=${VERSION:-1.11.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +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 + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$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 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +zcat $CWD/fix-makefile.patch.gz | patch -p1 + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +PREFIX=/usr \ +make +make install DESTDIR=$PKG PREFIX=/usr MANDIR=/usr/man + +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 + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING \ + README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/scdoc/scdoc.info b/system/scdoc/scdoc.info new file mode 100644 index 0000000000..fd8e496116 --- /dev/null +++ b/system/scdoc/scdoc.info @@ -0,0 +1,10 @@ +PRGNAM="scdoc" +VERSION="1.11.1" +HOMEPAGE="https://git.sr.ht/~sircmpwn/scdoc" +DOWNLOAD="https://git.sr.ht/~sircmpwn/scdoc/archive/1.11.1.tar.gz" +MD5SUM="ce8369cb5d2406786f61cf805ceae66f" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Manuel Argüelles" +EMAIL="manuel.arguelles@gmail.com" diff --git a/system/scdoc/slack-desc b/system/scdoc/slack-desc new file mode 100644 index 0000000000..1f56aa5e39 --- /dev/null +++ b/system/scdoc/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +scdoc: scdoc (small man page generator) +scdoc: +scdoc: Simple man page generator for POSIX systems written in C99. +scdoc: +scdoc: +scdoc: +scdoc: +scdoc: +scdoc: +scdoc: +scdoc: -- cgit v1.2.3