From 201e3bd09a511a2ab612e67a9b571276614d0d6a Mon Sep 17 00:00:00 2001 From: Jason Woodward Date: Tue, 17 Jan 2023 20:01:53 -0500 Subject: [PATCH] add man page, packaging --- data/man/tater.1 | 46 +++++++++++++++++++++++++++++++ debian/README.Debian | 6 +++++ debian/README.source | 10 +++++++ debian/changelog | 5 ++++ debian/control | 19 +++++++++++++ debian/copyright | 33 +++++++++++++++++++++++ debian/rules | 26 ++++++++++++++++++ debian/source/format | 1 + debian/tater-docs.docs | 2 ++ debian/upstream/metadata | 2 ++ meson.build | 1 + tater.Slackbuild | 58 ++++++++++++++++++++++++++++++++++++++++ 12 files changed, 209 insertions(+) create mode 100644 data/man/tater.1 create mode 100644 debian/README.Debian create mode 100644 debian/README.source create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/tater-docs.docs create mode 100644 debian/upstream/metadata create mode 100755 tater.Slackbuild diff --git a/data/man/tater.1 b/data/man/tater.1 new file mode 100644 index 0000000..3934a7c --- /dev/null +++ b/data/man/tater.1 @@ -0,0 +1,46 @@ +.TH tater 1 2023-01-16 + +.SH NAME +tater \- simple scripting language for tot lovers + +.SH SYNOPSIS +.B tater +[\fIOPTION\fR]... [\fIFILE\fR] +.LP +.B options: +\fB-d\fR, +\fB-s\fR, +\fB-t\fR, +\fB-h\fR, +\fB-v\fR, +.LP + +.SH DESCRIPTION +.B tater +is a simple scripting language based upon the excellent work of Robert Nystrom. + +If a file is note passed on the command line the \fBREPL\fR will be started. + +.SH OPTIONS +.TP +\fB\-d\fR +Enable debug mode +.TP +\fB\-s\fR +Garbage collection stress mode +.TP +\fB\-t\fR +Garbage collection tracing +.TP +\fB\-h\fR +Help +.TP +\fB\-v\fR +Version and license information + +.SH NOTES +.PP +\fBtater\fR is \fBALPHA\fR quality. + +.SH AUTHOR +Jason Woodward diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..fa301ad --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +tater for Debian +--------------- + + + + -- Jason Woodward Mon, 16 Jan 2023 19:17:19 -0500 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..dd1f387 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,10 @@ +tater for Debian +--------------- + + + + + + -- Jason Woodward Mon, 16 Jan 2023 19:17:19 -0500 + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..1478aec --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +tater (0.1-1) UNRELEASED; urgency=medium + + * Initial release. + + -- Jason Woodward Mon, 16 Jan 2023 19:17:19 -0500 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..24e79a0 --- /dev/null +++ b/debian/control @@ -0,0 +1,19 @@ +Source: tater +Section: interpreters +Priority: optional +Maintainer: Jason Woodward +Rules-Requires-Root: no +Build-Depends: + debhelper-compat (= 13), +Standards-Version: 4.6.1 +Homepage: https://software.jaos.org +Vcs-Browser: https://software.jaos.org/git/tater +Vcs-Git: https://software.jaos.org/git/tater + +Package: tater +Architecture: any +Depends: + ${shlibs:Depends}, + ${misc:Depends}, +Description: Simple scripting language because everyone loves tots. + Simple scripting language because everyone loves tots. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..eef4b09 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,33 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://software.jaos.org/git/tater +Upstream-Name: tater +Upstream-Contact: woodwardj@jaos.org + +Files: + * +Copyright: + 2022-2023 Jason Woodward +License: GPL-2.0+ + +Files: + debian/* +Copyright: + 2023 Jason Woodward +License: GPL-2.0+ + +License: GPL-2.0+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see +Comment: + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..f1d1d25 --- /dev/null +++ b/debian/rules @@ -0,0 +1,26 @@ +#!/usr/bin/make -f + +# See debhelper(7) (uncomment to enable). +# Output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# See FEATURE AREAS in dpkg-buildflags(1). +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# See ENVIRONMENT in dpkg-buildflags(1). +# Package maintainers to append CFLAGS. +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# Package maintainers to append LDFLAGS. +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + + +# dh_make generated override targets. +# This is an example for Cmake (see ). +#override_dh_auto_configure: +# dh_auto_configure -- \ +# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tater-docs.docs b/debian/tater-docs.docs new file mode 100644 index 0000000..7319041 --- /dev/null +++ b/debian/tater-docs.docs @@ -0,0 +1,2 @@ +README.source +README.Debian diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..2c38866 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,2 @@ +Repository-Browse: https://software.jaos.org/git/tater +Repository: https://software.jaos.org/git/tater diff --git a/meson.build b/meson.build index 2ad242f..3c61271 100644 --- a/meson.build +++ b/meson.build @@ -89,3 +89,4 @@ datadocs = [ install_data_dir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name() + '-' + meson.project_version()) install_data(datadocs, install_dir: install_data_dir) install_subdir('data/vim', install_dir: install_data_dir) +install_man(['data/man/tater.1']) diff --git a/tater.Slackbuild b/tater.Slackbuild new file mode 100755 index 0000000..dbd55b6 --- /dev/null +++ b/tater.Slackbuild @@ -0,0 +1,58 @@ +#!/bin/sh +set -fexuo pipefail +# Slackware build script for tater +# Copyright (C) 2022-2023 Jason Woodward +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +VERSION=${1:-$(grep '^\s*version:' meson.build | cut -f2 -d\')} +BUILD=${BUILD:-1} + +if [ -z "${ARCH:=}" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + aarch64*) ARCH=aarch64 ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +TOP="${PWD}" +DESTDIR="${TOP}/pkg" +rm -rf "${DESTDIR}" + +meson setup slackbuild --prefix=/usr --sysconfdir=/etc --mandir=/usr/man --buildtype=debugoptimized +meson compile -C slackbuild +meson install -C slackbuild --destdir="${DESTDIR}" +# meson >= 1.0 also has --strip build into install + +find "${DESTDIR}" -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 "${DESTDIR}/usr/man" -type f -exec gzip -9 {} \; || true + +mkdir -p "${DESTDIR}/install" +cat < "${DESTDIR}"/install/slack-desc +tater: tater (a simple scripting lanaguage for tot lovers) +tater: +tater: tater is a simple scripting language. +tater: +tater: https://software.jaos.org/git/tater +tater: +tater: +tater: +tater: +tater: +tater: +EOF +(cd "${DESTDIR}" && /sbin/makepkg -l y -c n "${TOP}/tater-${VERSION}-${ARCH}-${BUILD}.txz")