update packaging

This commit is contained in:
Zsombor Barna 2024-04-15 15:25:13 +02:00
parent a823bc42c6
commit 23f1d73c27
25 changed files with 72 additions and 242 deletions

View File

@ -1,6 +1,6 @@
Sun Feb 28 09:43:13 CET 2024 - Zsombor Barna <unibro@mailo.com>
* Release 0.2.9
* Added Guile as the extension language, updated sample config.
* rewrote actkbd in Gerbil. It is also an extension language.
* Pruned features that are unneeded for macro keyboards or if guile
can replace them. Removed the CLI options. Added one for auto-grabbing.
* Merged all source files into one.

View File

@ -1,6 +1,6 @@
* Items in the ToDo list (in order of importance)
- A guile library for use in config. Possibilities:
- A library for use in config. Possibilities:
- connecting to preferred editor without an external process for low
latency (bonus: quoting lisp in lisp)
- a tcp variant of the above could control programs on *other machines*

View File

@ -1,9 +1,5 @@
#!/bin/sh -e
# See http://jdebp.uk./FGA/slashpackage.html
if test \! -d package || test \! -d source
then
echo "You are not in the right directory." 1>&2
exit 100
fi
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
rm -rf build/

View File

@ -1 +0,0 @@
actkbd

14
package/common Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
export commands1=actkbd
export extra_manpages=actkbd.scm
export docs="example-config.scm COPYING actkbd.service"
pseudo_atomic_cp()
{
src=$1
dest="${2}$(basename "$1")"
shift 2
rm -f -- "${dest}{new}" # delete old
install -p "$@" -- "${src}" "${dest}{new}" # copy new
mv -f -- "${dest}{new}" "${dest}" # rename new
}

View File

@ -1,10 +1,7 @@
#!/bin/sh -e
# See http://jdebp.eu./FGA/slashpackage.html
if [ \! -d package ] || [ \! -d source ]
then
echo "You are not in the right directory." 1>&2
exit 100
fi
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
./package/prepare
./package/make
exec ./package/makeinstall

View File

@ -1,10 +0,0 @@
actkbd (0.3.2) UNRELEASED; urgency=low
* Release 0.3.2
* Added manual pages
* Updated sample config
* Made passing a config file non-optional
* Removed C23 code, actkbd (for now) is C89-only.
* Fixed grabbing issues with re-entrancy
-- Zsombor Barna <unibro@mailo.com> Mon, 05 Feb 2024 00:38:08 +0100

View File

@ -1,12 +0,0 @@
Source: actkbd
Section: lisp
Priority: optional
Maintainer: Zsombor Barna <unibro@mailo.com>
Build-Depends: perl, guile-3.0-dev
Package: actkbd
Architecture: amd64
Depends: ${shlibs:Depends}, guile-3.0
Suggests:
Recommends:
Description: A daemon that binds scheme functions to keyboard events.

View File

@ -1,14 +0,0 @@
Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
Name: actkbd
Maintainer: Zsombor Barna <unibro@mailo.com>
Copyright: 2024 Zsombor Barna
License: see source/COPYING
Files: source/*
Copyright: 2024 Zsombor Barna
License: see source/COPYING
Files: package/*
Copyright: 2024 Zsombor Barna
License: see package/COPYING

View File

@ -1,21 +0,0 @@
#!/bin/sh -e
if [ \! -d package -o \! -d source ]
then
echo "You are not in the right directory." 1>&2
exit 100
fi
# Create and populate the debian directory.
mkdir -p debian
(
cd package/debian && find . -type f
) | (
cd debian # The syntax of ln -s makes more sense if we are in the target directory.
while read i
do
dir="`dirname $i`"
# Try to create a hard link, and fall back to a symbolic link.
# The package and debian directories aren't necessarily on the same disc volume.
ln -f ../package/debian/"$i" "${dir}"/"$i" 2>/dev/null || ln -s -f ../package/debian/"$i" "${dir}"/"$i"
done
)

View File

@ -1,22 +0,0 @@
#!/usr/bin/make -sf
DIR=debian/actkbd
.PHONY: build binary install clean
build:
package/compile
binary: install
${RM} debian/files debian/substvars
dpkg-shlibdeps "${DIR}"/usr/local/bin/*
dpkg-gencontrol -pactkbd -P"${DIR}"
dpkg -b "${DIR}" ../
install:
install -d -m 0755 "${DIR}"/DEBIAN
package/export "${DIR}"/usr/local/
clean:
${RM} debian/files debian/substvars
package/clean

View File

@ -1,9 +1,5 @@
#!/bin/sh -e
# See http://jdebp.uk./FGA/slashpackage.html
if test \! -d package || test \! -d source
then
echo "You are not in the right directory." 1>&2
exit 100
fi
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
rm -rf build/ command/ manual/ bsd/ debian/ doc/ config/ info/
rm -rf build/ command/ manual/ doc/ config/ info/

View File

@ -1,3 +0,0 @@
COPYING
example-config.scm
actkbd.service

View File

@ -1,40 +1,23 @@
#!/bin/sh -e
# See http://jdebp.uk./FGA/slashpackage.html
if test \! -d package || test \! -d source
then
echo "You are not in the right directory." 1>&2
exit 100
fi
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
# shellcheck source=./common
. package/common
root="${1-/usr/local/}"
user="`id -un`"
group="`id -gn`"
user="$(id -un)"
group="$(id -gn)"
install -d -m 0755 "${root}"bin "${root}"man/man1 "${root}"man/man5 "${root}"share/info
do_man()
{
rm -f "${root}"man/man${2}/"${1}.${2}"{new}
install -p -m 0644 -o "${user}" -g "${group}" -- manual/"${1}.${2}" "${root}"man/man${2}/"${1}.${2}"{new}
mv -f -- "${root}"man/man${2}/"${1}.${2}"{new} "${root}"man/man${2}/"$1.${2}"
}
cat package/commands1 | while read i
for i in $commands1
do
rm -f "${root}"bin/"$i"{new}
install -m 0755 -o "${user}" -g "${group}" -- command/"$i" "${root}"bin/"$i"{new}
mv -f -- "${root}"bin/"$i"{new} "${root}"bin/"$i"
do_man $i 1
pseudo_atomic_cp command/"$i" "${root}"bin/ -m 0755 -o "${user}" -g "${group}"
pseudo_atomic_cp manual/"$i".1 "${root}"man/man1/ -m 0644 -o "${user}" -g "${group}"
pseudo_atomic_cp manual/"$i".info "${root}"share/info/ -m 0644 -o "${user}" -g "${group}"
done
cat package/extra-manpages5 | while read -r i
for i in $extra_manpages5
do
do_man $i 5
done
cat package/info | while read i
do
rm -f -- "${root}"share/info/"$i".info{new}
install -p -m 0644 -- build/"$i".info "${root}"share/info/"$i".info{new}
mv -f -- "${root}"share/info/"$i".info{new} "${root}"share/info/"$i".info
pseudo_atomic_cp manual/"$i".5 "${root}"man/man5/ -m 0644 -o "${user}" -g "${group}"
done

View File

@ -1 +0,0 @@
actkbd

View File

@ -1 +0,0 @@
actkbd.scm

View File

@ -1 +0,0 @@
actkbd

View File

@ -1 +0,0 @@
actkbd.scm

View File

@ -1 +0,0 @@
actkbd

View File

@ -1,22 +1,14 @@
#!/bin/sh -e
# See http://jdebp.eu./FGA/slashpackage.html
if test \! -d package || test \! -d source
then
echo "You are not in the right directory." 1>&2
exit 100
fi
if test \! -d build
then
echo "You have not prepared the build area." 1>&2
exit 100
fi
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
[ -d build ] || echo "You have not prepared the build area." 1>&2 || exit 100
# Rebuild.
if ! > /dev/null expr "${MAKEFLAGS}" : "--jobs"
then
case "`uname`" in
Linux) cpus="`fgrep -c processor /proc/cpuinfo`" ;;
*BSD) cpus="`sysctl -n hw.ncpu`" ;;
case "$(uname)" in
Linux) cpus="$(grep -F -c processor /proc/cpuinfo)" ;;
*BSD) cpus="$(sysctl -n hw.ncpu)" ;;
esac
fi
exec make -C build ${cpus:+--jobs "${cpus}"} all

View File

@ -1,52 +1,31 @@
#!/bin/sh -e
# See http://jdebp.eu./FGA/slashpackage.html
if [ \! -d package -o \! -d source ]
then
echo "You are not in the right directory." 1>&2
exit 100
fi
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
# Atomically update the release directories ./command, ./library, ./include, and so forth.
# shellcheck source=common
. package/common
# "Atomically" update the release directories ./command, ./library, ./include, and so forth.
# The build and release directories need not be on the same disc volume.
# And the files released must not be potentially overwritable and truncatable by the compiler/linker during subsequent builds.
install -d -- command manual doc info
# ##############################################################################
# Build all of the ...{new} files in ./command, ./config, and ./manual.
do_man()
{
rm -f -- manual/"$1.$2"{new}
install -p -m 0644 -- build/"$1.$2" manual/"$1.$2"{new}
mv -f -- manual/"$1.$2"{new} manual/"$1.$2"
}
cat package/commands1 | while read i
for i in $commands1
do
rm -f -- command/"$i"{new}
install -p -m 0755 -- build/"$i" command/"$i"{new}
if objdump -a command/"$i"{new} >/dev/null 2>&1
then
strip command/"$i"{new}
fi
# Rename the ...{new} files in ./command, ./config, and ./manual.
mv -f -- command/"$i"{new} command/"$i"
do_man $i 1
pseudo_atomic_cp build/"$i" command/ -m 0755
objdump -a command/"$i" >/dev/null 2>&1 \
&& strip command/"$i"
pseudo_atomic_cp build/"$i.1" manual/ -m 0644
pseudo_atomic_cp build/"$i.info" info/ -m 0644
done
# All of the commands that have their own manual and guide pages
cat package/extra-manpages5 | while read i
for i in $extra_manpages
do
do_man $i 5
pseudo_atomic_cp build/"$i.5" manual/ -m 0644
done
cat package/docs | while read i
for i in $docs
do
rm -f -- doc/"$i"{new}
install -p -m 0644 -- build/"$i" doc/"$i"{new}
mv -f -- doc/"$i"{new} doc/"$i"
done
cat package/info | while read i
do
rm -f -- info/"$i".info{new}
install -p -m 0644 -- build/"$i".info info/"$i".info{new}
mv -f -- info/"$i".info{new} info/"$i".info
pseudo_atomic_cp build/"$i" doc/ -m 0644
done

View File

@ -1,34 +1,9 @@
#!/bin/sh -e
# See http://jdebp.eu./FGA/slashpackage.html
if [ \! -d package -o \! -d source ]
then
echo "You are not in the right directory." 1>&2
exit 100
fi
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
export CDPATH=
# Create and populate the build directory.
install -d -m 0755 build
(
cd source && find . -type d
) | (
cd build
while read i
do
mkdir -p "$i"
done
)
(
cd source && find . -type f
) | (
cd build # The syntax of ln -s makes more sense if we are in the target directory.
while read i
do
dir="`dirname $i`"
# Try to create a hard link, and fall back to a symbolic link.
# The source and build directories aren't necessarily on the same disc volume.
ln -f ../source/"$i" "${dir}" 2>/dev/null || ln -s -f ../source/"$i" "${dir}"
done
)
( cd source && ( 2>/dev/null pax -w -r -l -u -- * ../build/ || true ) )

View File

@ -1,15 +1,9 @@
#!/bin/sh -e
# See http://jdebp.uk./FGA/slashpackage.html
if test \! -d package || test \! -d source
then
echo "You are not in the right directory." 1>&2
exit 100
fi
cwd="`/bin/pwd`"
base_plus_version="`basename "${cwd}"`"
case "`uname`" in
Linux) ext=bz2 ; opt=-j ;;
*BSD) ext=gz ; opt=-z ;;
esac
pax -w ${opt} > "${base_plus_version}.tar.${ext}.new" source package
mv "${base_plus_version}.tar.${ext}.new" "${base_plus_version}.tar.${ext}"
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
cwd=$(/bin/pwd)
base_plus_version=$(basename "${cwd}")
pax -w -z > "${base_plus_version}.tar.gz.new" source package
mv "${base_plus_version}.tar.gz.new" "${base_plus_version}.tar.gz"

View File

@ -1,34 +1,26 @@
#!/bin/sh -e
# See http://jdebp.uk./FGA/slashpackage.html
if test \! -d package || test \! -d source
then
echo "You are not in the right directory." 1>&2
exit 100
fi
if ! test $# -ge 2
then
echo "Two arguments are required." 1>&2
exit 100
fi
[ -d package ] && [ -d source ] || echo "You are not in the right directory." 1>&2 || exit 100
[ $# -eq 2 ] || echo "Two arguments are required." 1>&2 || exit 100
# shellcheck source=common
. package/common
src="${1}"
dest="${2}"
root="${dest}"/actkbd/usr/local
dest="${2}"/actkbd/usr/local
# binaries and doco
install -d -m 0755 "${root}"/bin "${root}"/man/man1 "${root}"/man/man5 "${root}"/share/info
cat package/export-manifests/actkbd.commands1 | while read j ;
for j in $commands1
do
ln -f -- "${src}"/bin/"$j" "${root}"/bin/
ln -f -- "${src}"/man/man1/"$j".1 "${root}"/man/man1/
ln -f -- "${src}"/share/info/"$j".info "${root}"/share/info/"$j".info
done
cat package/export-manifests/actkbd.extra-manpages5 | while read j ;
for j in $extra_manpages5
do
ln -f -- "${src}"/man/man5/"$j".5 "${root}"/man/man5/
done
cat package/export-manifests/actkbd.info | while read j
do
ln -f -- "${src}"/share/info/"$j".info "${root}"/share/info/"$j".info
done