diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-09-23 22:40:05 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-09-23 22:40:05 +0200 |
commit | d662147bbe4bccfac2307dab0ae8f62c0c36a118 (patch) | |
tree | 55b2a813c37526218d44efc6e56bf6b65535d9f4 | |
parent | 4ad8d09ad4d0b74970f98b11f019001925370bb4 (diff) |
added man pages for perl modules
-rwxr-xr-x | configure | 12 | ||||
-rw-r--r-- | confninja.sh | 42 |
2 files changed, 45 insertions, 9 deletions
@@ -45,18 +45,21 @@ if readlink /sbin/init | grep -q systemd then JWM_INIT=systemd fi +eval PERL_PATH="$(perl -V::installsitelib)" + allargs="$*" -while getopts 'c:d:e:i:hm:p:' opt +while getopts 'c:d:e:i:hm:p:P:' opt do case $opt in (e) JWM_MAILDIR_EXTRACTOR="$OPTARG";; (m) JWM_MODE="$OPTARG";; (c) JWM_LOGIN_SCHEME="$OPTARG";; (d) DESTDIR="$OPTARG";; (p) PREFIX="$OPTARG";; + (P) PERL_PATH="$OPTARG";; (i) JWM_INIT="$OPTARG";; (h) t="$(printf '\t')" - expand -t 37 <<END + expand -t 38,68 <<END usage: $0 configure [options...] OPTIONS @@ -66,7 +69,8 @@ usage: $0 configure [options...] -c LOGIN_SCHEME plain {plain,cram_md5} The login scheme (don't use plain unless over TLS) -d DESTDIR / Install root -p PREFIX usr/local {usr,usr/local} Install prefix - -i INIT $JWM_INIT$t {,systemd} Init system to install service files for + -P PATH $PERL_PATH$t$t Perl install path + -i INIT $JWM_INIT $t{,systemd} Init system to install service files for END exit ;; @@ -86,6 +90,7 @@ PATH="$(pwd)/node_modules/.bin${PATH:+:$PATH}" check_command perl check_perl_deps v5.24 check_command prove +check_command pod2man check_command morbo check_command hypnotoad check_command npm @@ -132,6 +137,7 @@ export JWM_MODE export JWM_INIT export DESTDIR export PREFIX +export PERL_PATH perl -pe 's/@(\w+)@/$ENV{$1}/ga' lib/JWebmail/Config.pm.in >|lib/JWebmail/Config.pm sh confninja.sh >|build.ninja diff --git a/confninja.sh b/confninja.sh index 2da51ab..93df808 100644 --- a/confninja.sh +++ b/confninja.sh @@ -29,6 +29,10 @@ rule perltest command = prove -l t/ description = PERLTEST +rule perlman + command = pod2man $in >$out + description = POD2MAN + rule configure command = ./configure $confargs description = CONFIGURE @@ -50,7 +54,7 @@ case "$JWM_MODE" in (production) echo 'bundle_mode = --minify' echo 'sass_mode = --style=compress --no-source-maps' - echo 'rust_mode = --profile release-small --target x86_64-unknown-linux-musl' + echo 'rust_mode = --profile release-small --target x86_64-unknown-linux-musl -q' echo 'rs_bin = target/x86_64-unknown-linux-musl/release-small/jwebmail-extract' ;; esac @@ -118,13 +122,14 @@ echo "destdir = $DESTDIR" echo "prefix = $PREFIX" echo "bindir = \$prefix/bin" echo "scriptdir = \$prefix/bin" -echo "perldir = \$prefix/lib/perl5" +echo "perldir = $PERL_PATH" if [ "$PREFIX" = usr ] then echo "confdir = \$prefix/../etc" else echo "confdir = \$prefix/etc" fi echo "datadir = \$prefix/share/jwebmail" echo "docdir = \$prefix/share/doc/jwebmail" +echo "man3dir = \$prefix/share/man/man3" ALL_INST= @@ -138,8 +143,7 @@ install_file instexec scriptdir script jwebmail install_file instexec scriptdir script testauthenticator.pl while read f -do - install_file instdata perldir lib "$f" +do install_file instdata perldir lib "$f" done <<'END' JWebmail/Controller/Webmail.pm JWebmail/I18N/de.pm @@ -162,6 +166,33 @@ JWebmail/I18N.pm JWebmail.pm END +while read f +do + manname="$(echo -n "${f%.pm}"| sed 's!/!$:$:!g').3perl" + echo "build \$destdir/\$man3dir/$manname: perlman lib/$f" + ALL_INST="$ALL_INST \$destdir/\$man3dir/$manname" +done <<'END' +JWebmail/Controller/Webmail.pm +JWebmail/I18N/de.pm +JWebmail/Model/ReadMails/QMailAuthuser.pm +JWebmail/Model/ReadMails/Role.pm +JWebmail/Model/WriteMails.pm +JWebmail/Plugin/I18N2/Role.pm +JWebmail/Plugin/I18N2.pm +JWebmail/Plugin/INIConfig.pm +JWebmail/Plugin/Paginate.pm +JWebmail/Plugin/ServerSideSessionData.pm +JWebmail/Plugin/TOMLConfig.pm +JWebmail/View/RenderMail.pm +JWebmail/View/Webmail.pm +JWebmail/Config.pm +JWebmail/I18N.pm +JWebmail.pm +END +#JWebmail/I18N/en.pm +#JWebmail/Plugin/I18N2/Maketext.pm +#JWebmail/Plugin/I18N2/INI.pm + install_file instdata datadir . public/css/my_bulma.css [ "$JWM_MODE" = development ] && install_file instdata datadir . public/css/my_bulma.css.map install_file instdata datadir . public/src/displayheaders.js @@ -176,8 +207,7 @@ then fi while read f -do - install_file instdata datadir . "$f" +do install_file instdata datadir . "$f" done <<'END' templates/displayheaders/_bot_nav.html.ep templates/displayheaders/_folders.html.ep |