diff options
-rw-r--r-- | confninja.sh | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/confninja.sh b/confninja.sh index 93df808..eb68ea1 100644 --- a/confninja.sh +++ b/confninja.sh @@ -31,7 +31,7 @@ rule perltest rule perlman command = pod2man $in >$out - description = POD2MAN + description = POD2MAN $out rule configure command = ./configure $confargs @@ -115,7 +115,7 @@ echo "build public: phony $PUBLIC" # INSTALL -install_file () { echo "build \$destdir/\$$2/$4: $1 $3/$4"; ALL_INST="$ALL_INST \$destdir/\$$2/$4"; } +install_file () { echo "build \$destdir/$2/$4: $1 $3/$4"; ALL_INST="$ALL_INST \$destdir/$2/$4"; } echo "destdir = $DESTDIR" @@ -134,16 +134,16 @@ echo "man3dir = \$prefix/share/man/man3" ALL_INST= case "$MAILDIR_EXTRACTOR_NAME" in - (extractrs) install_file instexec bindir bin jwebmail-extract;; - (extractpy) install_file instexec scriptdir script extract.py;; - (extractpl) install_file instexec scriptdir script extract.pl;; + (extractrs) install_file instexec \$bindir bin jwebmail-extract;; + (extractpy) install_file instexec \$scriptdir script extract.py;; + (extractpl) install_file instexec \$scriptdir script extract.pl;; esac -install_file instexec scriptdir script jwebmail -install_file instexec scriptdir script testauthenticator.pl +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 @@ -193,21 +193,21 @@ END #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 -[ "$JWM_MODE" = development ] && install_file instdata datadir . public/src/displayheaders.js.map -install_file instdata datadir . public/src/rendermail.js -[ "$JWM_MODE" = development ] && install_file instdata datadir . public/src/rendermail.js.map +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 +[ "$JWM_MODE" = development ] && install_file instdata \$datadir . public/src/displayheaders.js.map +install_file instdata \$datadir . public/src/rendermail.js +[ "$JWM_MODE" = development ] && install_file instdata \$datadir . public/src/rendermail.js.map if [ "$LOGIN_SCHEME" = cram_md5 ] then - install_file instdata datadir . public/src/login_cram.js - [ "$JWM_MODE" = development ] && install_file instdata datadir . public/src/login_cram.js.map + install_file instdata \$datadir . public/src/login_cram.js + [ "$JWM_MODE" = development ] && install_file instdata \$datadir . public/src/login_cram.js.map 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 @@ -226,17 +226,20 @@ templates/exception_.html.ep templates/not_found.html.ep END -install_file instdata confdir . jwebmail.development.toml -install_file instdata confdir . jwebmail.production.toml +install_file instdata \$confdir . jwebmail.development.toml +install_file instdata \$confdir . jwebmail.production.toml for f in CHANGES.md LICENSE README.md -do install_file instdata docdir . "$f" +do install_file instdata \$docdir . "$f" done if [ "$JWM_INIT" = systemd ] then - echo "build \$destdir/\$confdir/systemd/system/jwebmail.service: instdata jwebmail.service" - ALL_INST="$ALL_INST \$destdir/\$confdir/systemd/system/jwebmail.service" + case "$PREFIX" in + (usr) install_file instdata etc/systemd/system . jwebmail.service;; + (usr/local) install_file instdata usr/local/lib/systemd/system . jwebmail.service;; + (*) echo 'unknown prefix' >&2; exit 1;; + esac fi echo "build install: phony $ALL_INST" |