commit 0c704e48724a3884384ae25657c74cac66d9d5db Author: Kris Lamoureux Date: Mon Oct 6 20:01:17 2025 -0400 Add containerized xstow static build diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4cd95ca --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM rockylinux:8 + +RUN dnf -y install epel-release && \ + /usr/bin/crb enable && \ + dnf -y install \ + git \ + autoconf \ + automake \ + libtool \ + make \ + gettext \ + texinfo \ + gcc-c++ \ + glibc-static \ + libstdc++-static \ + && dnf clean all + +RUN git clone --recurse-submodules \ + https://github.com/majorkingleo/xstow.git /src + +WORKDIR /src +RUN cp README.md README && \ + autoreconf -fi && \ + ./configure --enable-static && \ + make diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e12b56f --- /dev/null +++ b/LICENSE @@ -0,0 +1,12 @@ +Copyright (C) 2025 by Kris Lamoureux + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..178ad95 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# xstow-builder + +Reproducible static build of `xstow` for systems where `stow` or `xstow` isn't +already available. Unlike `stow`, which requires Perl and it's dependencies, +this statically-linked `xstow` binary is self-contained and can be dropped into +`~/.local/bin` without any installation requirements. + +## Build + +Running the `docker-compose.yml` will spin up a Rocky Linux container, compile +`xstow` with static linking, and output the binary to `./build/xstow` in your +local repository. + +Podman: + + podman-compose up --build + +Docker: + + docker compose up --build + +Binary output: `./build/xstow` + +## License + +This project is released under the 0BSD license, which allows for unrestricted +use, modification, and distribution. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8f2ef51 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + xstow-builder: + build: + context: . + volumes: + - ./build:/build + command: > + bash -c "cp /src/src/xstow-static /build/xstow"