diff options
author | Manuel Argüelles <manuel.arguelles@gmail.com> | 2021-02-06 05:03:53 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-02-07 01:39:51 +0700 |
commit | 8c5e80a9396e6dae0455c96ebe4b5af8a761039e (patch) | |
tree | 2d39c0bdc64ce2225f6b3f365575c180563a9980 | |
parent | 62e99b442dd6f714d15daaac7cb5cb14bb24c978 (diff) |
system/scdoc: Added (small man page generator)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/scdoc/README | 3 | ||||
-rw-r--r-- | system/scdoc/fix-makefile.patch.gz | bin | 0 -> 689 bytes | |||
-rw-r--r-- | system/scdoc/scdoc.SlackBuild | 97 | ||||
-rw-r--r-- | system/scdoc/scdoc.info | 10 | ||||
-rw-r--r-- | system/scdoc/slack-desc | 19 |
5 files changed, 129 insertions, 0 deletions
diff --git a/system/scdoc/README b/system/scdoc/README new file mode 100644 index 0000000000000..3c4b288e2509e --- /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 Binary files differnew file mode 100644 index 0000000000000..a9918c14cc644 --- /dev/null +++ b/system/scdoc/fix-makefile.patch.gz diff --git a/system/scdoc/scdoc.SlackBuild b/system/scdoc/scdoc.SlackBuild new file mode 100644 index 0000000000000..fb7418e537a00 --- /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 0000000000000..fd8e496116cec --- /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 0000000000000..1f56aa5e3976f --- /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: |