From 74f18e34d3983ba8a3da9211add436b99c1db562 Mon Sep 17 00:00:00 2001 From: DTB Date: Tue, 5 Dec 2023 21:01:07 -0700 Subject: [PATCH] license functionality and good, also man-pages-posix2017 --- soft/macchanger | 7 ++++++- soft/man-pages-posix2017 | 16 ++++++++++++++++ soft/soft | 21 +++++++++++++++------ 3 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 soft/man-pages-posix2017 diff --git a/soft/macchanger b/soft/macchanger index 780ab10..d6d1bbc 100644 --- a/soft/macchanger +++ b/soft/macchanger @@ -1,8 +1,13 @@ #!/bin/sh +ARCH=all +DESCRIPTION="Utility that changes apparent MAC addresses." +LICENSE=gpl30 NAME=macchanger -VERSION=nightly +PROVIDES=macchanger +REL=0 UPSTREAM=https://github.com/alobbs/macchanger.git +VERSION=nightly . soft # depends on diff --git a/soft/man-pages-posix2017 b/soft/man-pages-posix2017 new file mode 100644 index 0000000..c14ef48 --- /dev/null +++ b/soft/man-pages-posix2017 @@ -0,0 +1,16 @@ +#!/bin/sh + +ARCH=all +DESCRIPTION="POSIX.1-2017 manual pages" +LICENSE=custom +NAME=man-pages-posix2017 +PROVIDES=man-pages-posix +REL=0 +UPSTREAM=https://git.kernel.org/pub/scm/docs/man-pages/man-pages-posix.git +VERSION=nightly +stream_licesne(){ + cat "$SRC"/POSIX-COPYRIGHT +} +. soft + +cp "$SRC"/man0p "$SRC"/man1p "$SRC"/man3p "$MAN" diff --git a/soft/soft b/soft/soft index 4485b46..254fc5a 100644 --- a/soft/soft +++ b/soft/soft @@ -3,13 +3,21 @@ set -e GMAKE=gmake -PREFIX=/usr/local +PREFIX=/usr/local/soft BIN="$PREFIX/bin" SHARE="$PREFIX"/share FONTS="$SHARE"/fonts +LICENSES="$PREFIX"/licenses +MAN="$PREFIX"/man SRC="$PREFIX/src/$NAME" +soft_advise(){ + printf "\ +%s: %s: It is advised to run the following, or the system equivalent: + %s\n" soft "$NAME" "$*" >&2 +} + case "$UPSTREAM_TYPE" in custom) ;; *) get_upstream(){ @@ -28,8 +36,9 @@ custom) ;; } ;; esac; get_upstream -soft_advise(){ - printf "\ -%s: %s: It is advised to run the following, or the system equivalent: - %s\n" soft "$NAME" "$*" >&2 -} +if test "$LICENSE" = custom || ! test -e "$LICENSES/$LICENSE" +then case "$LICENSE" in + gpl30) curl -o "$LICENSES/$LICENSE" \ + 'https://www.gnu.org/licenses/gpl-3.0.txt' ;; + *) stream_license >"$LICENSES/$LICENSE" ;; +esac