diff options
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | clean-env.install | 7 | ||||
-rw-r--r-- | clenv.sh | 24 | ||||
-rw-r--r-- | clm-wrapper.sh | 2 | ||||
-rw-r--r-- | cpm-wrapper.sh | 4 |
7 files changed, 59 insertions, 23 deletions
@@ -1,8 +1,9 @@ pkgbase = clean-itasks-dev-bin pkgdesc = Provides the functional programming language Clean and the iTasks system. pkgver = 20191021 - pkgrel = 1 + pkgrel = 2 url = https://clean.cs.ru.nl + install = clean-env.install arch = x86_64 license = custom depends = bash @@ -16,10 +17,12 @@ pkgbase = clean-itasks-dev-bin source = clm-wrapper.sh source = cpm-wrapper.sh source = clenv.sh + source = README.md sha256sums = 2420fab49df9e325bd379659d9a3b86bbed7b420329330ee92e52a09a35a2c09 - sha256sums = fb1a94763518b7bc583ea29fc97d5accac1644da0bbee8f7b082fde904fe6bce - sha256sums = 353ae04913cd1c6a27e31738b8f69c35394180b0b3f083d30d21d4b636df8955 - sha256sums = 88ec2dd869af3e4a5beebde6878b0eb71a381932b885fb6b679a47c76d5e5c7b + sha256sums = 27ab09f375d07b2d05c2c4367a47c60b05593059d6e6edc0434ee7d66b5119b8 + sha256sums = f8303a73262dc163459019916f45bfeb558fb7bebbf2fde372fa839f44b0de03 + sha256sums = 6f839935dab80a4c687dc7bcb980682d56c1c2dadfff6937c1b69c04d36a5f9b + sha256sums = c26f925dfcd093674f35efc6e3d2c6e921dde292dd48aef3eed4f7af443ad378 pkgname = clean-itasks-dev-bin @@ -2,7 +2,7 @@ pkgname=clean-itasks-dev-bin pkgver=20191021 -pkgrel=1 +pkgrel=2 pkgdesc="Provides the functional programming language Clean and the iTasks system." arch=('x86_64') url="https://clean.cs.ru.nl" @@ -11,14 +11,17 @@ depends=('bash') conflicts=('clean-lang' 'clean-lang-bin') provides=('clean-lang' 'clean-lang-bin') replaces=('clean-lang' 'clean-lang-bin') +install=clean-env.install source=('https://ftp.cs.ru.nl/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz' 'clm-wrapper.sh' 'cpm-wrapper.sh' - 'clenv.sh') + 'clenv.sh' + 'README.md') sha256sums=('2420fab49df9e325bd379659d9a3b86bbed7b420329330ee92e52a09a35a2c09' - 'fb1a94763518b7bc583ea29fc97d5accac1644da0bbee8f7b082fde904fe6bce' - '353ae04913cd1c6a27e31738b8f69c35394180b0b3f083d30d21d4b636df8955' - '88ec2dd869af3e4a5beebde6878b0eb71a381932b885fb6b679a47c76d5e5c7b') + '27ab09f375d07b2d05c2c4367a47c60b05593059d6e6edc0434ee7d66b5119b8' + 'f8303a73262dc163459019916f45bfeb558fb7bebbf2fde372fa839f44b0de03' + '6f839935dab80a4c687dc7bcb980682d56c1c2dadfff6937c1b69c04d36a5f9b' + 'c26f925dfcd093674f35efc6e3d2c6e921dde292dd48aef3eed4f7af443ad378') pkgver() { cd "${pkgname/-itasks-dev-bin/}-bundle-complete" @@ -55,4 +58,7 @@ package() { # install license install -Dm644 CleanLicenseConditions.txt \ "$pkgdir/usr/share/licenses/${pkgname}/CleanLicenseConditions.txt" + # install readme + install -Dm644 README.md \ + "$pkgdir/usr/share/doc/$pkgname/README.md" } diff --git a/README.md b/README.md new file mode 100644 index 000000000000..338ed1489103 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +Clean/iTasks Distribution for ArchLinux +========= + +This AUR package creates an ArchLinux packages of the Clean/iTasks system. + +There are a few caveats to its usage, that need to be explained. + +- Normally Clean/iTasks needs to be locally installed (into the user's + home-directory). This is because at compile-time, the envirnment and library + files may be changed by the clm/cpm build systems. +- This package installed Clean/iTasks globally, which renders it unusable for + most tasks. +- As such the package provides two things, + # a script called `clenv` is provided that essentially creates a copy of the + distribution in the user's home directory. + # the clm/cpm binaries are wrapped in a script detects the _local clean environment_ + and correctly sets some environment variables to make the clm/cpm tools use + this. diff --git a/clean-env.install b/clean-env.install new file mode 100644 index 000000000000..1b0cb2aacf68 --- /dev/null +++ b/clean-env.install @@ -0,0 +1,7 @@ +post_install() { + echo "Please have a look at the README in /usr/share/doc, as this provides" + echo "some details on how to use this distribution of the Clean/iTasks System." + echo "" + echo "Hint: Use \`clenv init\` first *before* using either the \`clm\` or \`cpm\`" + echo " tools, otherwise compilations will fail!" +} @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# this script creates a copy of the current system-level -# StdEnv files of the Clean distribution and places them -# in the users home directory (under .cache) +# this script copies over the entire directory tree +# of the clean project into your homedirectory. _install_dir="$HOME/.cache/clean-itasks-dev-bin" +_source_dir=/opt/clean-itasks-dev-bin usage () { echo "USAGE: clenv [cmd]" >&2 @@ -19,32 +19,34 @@ fi case $1 in status) - if [ ! -d "$_install_dir/lib" ]; then + if [ ! -d "$_install_dir" ]; then echo "not initilised" else echo "initilised" fi ;; init) - if [ -d "$_install_dir/lib" ]; then + if [ -d "$_install_dir" ]; then echo -n "already initilised, overwrite? [Y/n]: " read -r yn - if [ "$yn" != "${yn#[Yy]}" ] ;then - rm -rf "$_install_dir" - cp -r /opt/clean-itasks-dev-bin/lib "$_install_dir/" + if [ -z "$yn" ] || [ "$yn" != "${yn#[Yy]}" ] ;then + rm -rf "${_install_dir:?}"/* + cp -r "${_source_dir:?}"/* "$_install_dir/" echo "done" + else + echo "skipped" fi else [ -d "$_install_dir" ] || mkdir -p "$_install_dir" - cp -r /opt/clean-itasks-dev-bin/lib "$_install_dir/" + cp -r "${_source_dir:?}"/* "$_install_dir/" echo "done" fi ;; deinit) - if [ ! -d "$_install_dir/lib" ]; then + if [ ! -d "$_install_dir" ]; then echo "not initilised, nothing to do :(" else - rm -rf "$_install_dir" + rm -rf "${_install_dir:?}" echo "done" fi ;; diff --git a/clm-wrapper.sh b/clm-wrapper.sh index e52ff4ee20ca..6fa2773353c9 100644 --- a/clm-wrapper.sh +++ b/clm-wrapper.sh @@ -15,4 +15,4 @@ else fi export CLEAN_HOME -exec /opt/clean-itasks-dev-bin/bin/clm "$@" +exec "$CLEAN_HOME/bin/clm" "$@" diff --git a/cpm-wrapper.sh b/cpm-wrapper.sh index b6cf56f33b11..814083ec3086 100644 --- a/cpm-wrapper.sh +++ b/cpm-wrapper.sh @@ -9,10 +9,10 @@ elif [ -d "$PWD/clean-itasks-dev-bin" ]; then echo "Notice: using CWD install of clean/itasks" CLEAN_HOME="$PWD/clean-itasks-dev-bin" else - echo "Warning: you are calling clm using the system install of Clean," >&2 + echo "Warning: you are calling cpm using the system install of Clean," >&2 echo " this can cause compilation to fail. Use the clenv tool" >&2 echo " to create a user specific checkout of Clean/iTasks." >&2 fi export CLEAN_HOME -exec /opt/clean-itasks-dev-bin/bin/cpm "$@" +exec "$CLEAN_HOME/bin/cpm" "$@" |