diff options
author | Eric Wong <e@80x24.org> | 2022-12-16 14:39:32 +0000 |
---|---|---|
committer | Eric Wong <mwrap-perl@80x24.org> | 2022-12-16 20:54:00 +0000 |
commit | 0e7427bb42160552b5e37424b89970a20d93fcfd (patch) | |
tree | ffaa90b8fb593f57460fd6cb34a18b406868579e | |
parent | 6b3e8c55e455d5bd407c66c189c8dbcf9881b4b6 (diff) | |
download | mwrap-0e7427bb42160552b5e37424b89970a20d93fcfd.tar.gz |
This is useful for users w/o root permissions.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | INSTALL | 44 | ||||
-rw-r--r-- | MANIFEST | 2 | ||||
-rw-r--r-- | Makefile.PL | 12 | ||||
-rw-r--r-- | README | 10 | ||||
-rwxr-xr-x | exe.sh | 8 |
6 files changed, 72 insertions, 5 deletions
@@ -3,6 +3,7 @@ /MYMETA. /MYMETA.* /MANIFEST.gen +/Makefile.old /Makefile /Mwrap.bs /Mwrap.c @@ -0,0 +1,44 @@ +Dependencies: liburcu (Userspace RCU) is required at runtime. + +`pkg-config', GNU make, and standard Perl build tools are also required. + + FreeBSD: pkg install pkg-config liburcu +Debian-based systems: apt-get install pkg-config liburcu-dev + + +Newer versions of xxhash can unlock a small bit of performance: + + pkg install xxhash + apt-get install libxxhash-dev + + +If using mwrap-rproxy, Plack is also required: + + pkg install p5-Plack p5-Plack-Middleware-Deflater + apt-get install libplack-perl libplack-middleware-deflater-perl + +symlink-install +--------------- + +For users who lack permissions and/or wish to minimize their +installation footprint, the "symlink-install" target is available. +The following commands installs symlinks to $HOME/bin +pointing to the source tree: + + perl Makefile.PL + make symlink-install prefix=$HOME + +standard MakeMaker installation (Perl) +-------------------------------------- + +To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available. +This is typically installed with Perl, but RPM-based systems will likely +need to install the `perl-ExtUtils-MakeMaker' package. + +Once the dependencies are installed, you should be able to build and +install the system (into /usr/local) with: + + perl Makefile.PL + make + make check + make install # root permissions may be needed @@ -1,5 +1,6 @@ .gitignore COPYING +INSTALL MANIFEST Makefile.PL Mwrap.xs @@ -7,6 +8,7 @@ README check.h dlmalloc_c.h examples/mwrap.psgi +exe.sh gcc.h httpd.h jhash.h diff --git a/Makefile.PL b/Makefile.PL index e7e24cf..f953d51 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -123,5 +123,17 @@ pure_all :: build.env check:: all check-manifest prove -bvw -j\$(N) + +# Install symlinks to ~/bin (which is hopefuly in PATH) which point to +# this source tree. +# prefix + bindir matches git.git Makefile: +prefix = \$(HOME) +bindir = \$(prefix)/bin +symlink-install : all + mkdir -p \$(bindir) + exe=\$\$(realpath exe.sh) && cd \$(bindir) && \\ + for x in \$(EXE_FILES); do \\ + ln -sf "\$\$exe" \$\$(basename "\$\$x"); \\ + done EOF } @@ -19,15 +19,15 @@ require rebuilding Perl. Tested on the `perl' package distributed with: -* Debian GNU/Linux 10 +* Debian GNU/Linux 10 and 11 -It may work on FreeBSD, NetBSD, OpenBSD and DragonFly BSD. +* FreeBSD 12.x -== Install +It may work on NetBSD, OpenBSD and DragonFly BSD. - # FreeBSD: pkg install pkg-config liburcu +== Install - # Debian-based systems: apt-get install pkg-config liburcu-dev +See `INSTALL' document == Usage @@ -0,0 +1,8 @@ +#!/bin/sh -e +# symlink this file to a directory in PATH to run anything in script/* +# without needing perms to install globally. Used by "make symlink-install" +p=$(realpath "$0" || readlink "$0") # neither is POSIX, but common +p=$(dirname "$p") c=$(basename "$0") # both are POSIX +exec ${PERL-perl} -w -I"$p"/blib/lib -I"$p"/blib/arch \ + "$p"/script/"${c%.sh}" "$@" +: this script is too short to copyright |