Skip to content

Commit

Permalink
Fix Make system, VERSION, and naming
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucker committed Nov 20, 2023
1 parent ba9e21c commit 5f69340
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 184 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend-and-models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- ubuntu-20.04
- ubuntu-latest
raku-version:
- '2023.02'
- '2023.04'
runs-on: ${{ matrix.os }}

services:
Expand Down
12 changes: 8 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@

AUTOMAKE_OPTIONS = foreign


SUBDIRS = thirdparty etc frontend
SUBDIRS = thirdparty etc frontend lib bin

PUB := $(shell find -L public -type d \( -name ".??*" -o -name transpiled \) -prune -o -not -name "*db.json" -a -not -name "*.map" -a -not -name "*~" -a -not -name transpiled -a -not -name "*.tmp" -a -type f -print )

TEMPL := $(shell test -d templates && find -L templates -type f -name "*.ep")
SHARE := $(shell test -d share && find -L share -type d -name ".??*" -prune -o -not -name ".*" -a -not -name "*~" -a -not -name "*.tmp" -a -type f -print)
SHARE := $(shell test -d share && find -L share -type d -name ".??*" -prune -o -not -name ".*" -a -not -name "*~" -a -not -wholename "*/Docu/*" -a -not -name "*.tmp" -a -type f -print)

PERLTESTS := $(shell find t -name "*.t")
PM := $(shell find lib -name "*.pm")

EXTRA_DIST = VERSION cpanfile COPYRIGHT LICENSE CHANGES AUTHORS bootstrap $(PUB) $(wildcard t/*.t) $(POD) $(TEMPL) $(PERLTESTS) $(SHARE) Dockerfile
EXTRA_DIST = VERSION cpanfile COPYRIGHT CHANGELOG.md README.md bootstrap $(PUB) $(wildcard t/*.t) $(POD) $(TEMPL) $(PERLTESTS) $(SHARE) META6.json

datadir = $(prefix)
nobase_data_DATA = $(PUB) $(TEMPL) $(SHARE)

VERSION:
jq '.version' < META6.json | tr -d '"\n' > VERSION
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ CREATE DATABASE agrammon OWNER agrammon;

Load a database dump (auto creation not yet implemented)

## Installation Web App
## Setup Web App

Install npm and jq from your distro and then run
Install npm, jq, and libperl-dev from your distro and then run

mkdir -p public # first time only
./bootstrap
Expand All @@ -62,3 +62,18 @@ and point your browser to the shown URL (defaults to localhost:20000)

The Agrammon model can be accessed via a REST interface, for details see the
[online documentation](https://redocly.github.io/redoc/?url=https://model.agrammon.ch/single/api/v1/openapi.yaml)

## Server Installation

./bootstrap
./make dist
scp agrammon-$VERSION.tar.gz server:sources/
ssh server
cd sources
tar zxf agrammon-$VERSION.tar.gz
cd agrammon-$VERSION
./configure --prefix=DESTDIR
make
make install

(Re-) start agrammon service with appropriate config file
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.4.0
6.4.0
6 changes: 5 additions & 1 deletion bin/agrammon.raku
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env perl6
#!/usr/bin/env raku

BEGIN my $root = $*PROGRAM.resolve.parent(2);
use lib "$root/lib".Str;
use lib:from<Perl5> "$root/Inline/perl5";

use Agrammon::UI::CommandLine;
18 changes: 13 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) 2020 Oetiker+Partner AG

AC_INIT([agrammon],m4_esyscmd([jq '.version' < META6.json | tr -d '""' ]),[[email protected]])
AC_INIT([agrammon],m4_esyscmd([jq '.version' < META6.json | tr -d '"\n']),[[email protected]])
AC_PREREQ([2.59])
AC_CONFIG_AUX_DIR(conftools)

Expand Down Expand Up @@ -31,6 +31,14 @@ AC_PATH_PROG(NPX, npx, npx-not-found)
AC_PATH_PROG(XGETTEXT, xgettext, xgettext-not-found)
AC_PATH_PROG(MSGMERGE, msgmerge, msgmerge-not-found)

AC_PATH_PROG(JQ, jq, no)
if test ! -x "$JQ"; then
AC_MSG_ERROR(jq not found - cannot get version from META6.json without it)
fi
AC_PATH_PROG(TR, tr, no)
if test ! -x "$TR"; then
AC_MSG_ERROR(tr not found - cannot get version from META6.json without it)
fi

URL_CAT="neither curl nor wget found"

Expand Down Expand Up @@ -148,11 +156,11 @@ fi
AC_ARG_VAR(RAKULIB, [Colon separated list of raku library directories])
AC_SUBST(RAKULIB)

# lib/Makefile
# bin/Makefile
AC_CONFIG_FILES([
Makefile
etc/Makefile
bin/Makefile
lib/Makefile
frontend/Makefile
thirdparty/Makefile
])
Expand Down Expand Up @@ -182,8 +190,8 @@ if test "$mod_ok" = "0"; then

** SOME PERL MODULES ARE MISSING ******************************

If you know where perl can find the missing modules, set
the RAKULIB environment variable accordingly. Otherwise
If you know where raku can find the missing modules, set
the PERL5LIB environment variable accordingly. Otherwise
just proceed and the missing modules will be installed
automatically.

Expand Down
166 changes: 0 additions & 166 deletions lib/Agrammon/OutputFormatter/ExcelFast.pm6

This file was deleted.

6 changes: 2 additions & 4 deletions thirdparty/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,5 @@ distclean-local:
ls -1 | grep -v Makefile | grep -v cpanfile | xargs rm -rf

install-exec-hook:
cp -fr lib/perl5/* $(DESTDIR)$(libdir)
cp -f bin/cover $(DESTDIR)$(bindir)
$(AM_V_at)echo "** Patching cover command"
$(PERL) -i -p -e 's{use warnings;}{use warnings;\nuse lib qw($(libdir));}' $(DESTDIR)$(bindir)/cover
mkdir -p "$(prefix)/Inline/perl5"
cp -fr lib/perl5/* "$(prefix)/Inline/perl5"

0 comments on commit 5f69340

Please sign in to comment.