Skip to content

Commit 442afae

Browse files
committed
Add man pages to Mac installer
This PR adds the man1 pages to the mac installer. It also sticks a small configuration file into /usr/local/etc/man.d that allows macos and the man binary to look for the podman pages in /opt/podman/docs/man. Fixes #24756 Signed-off-by: Brent Baude <[email protected]>
1 parent c707cbe commit 442afae

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

contrib/pkginstaller/package.sh

+5
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@ tmpBin="contrib/pkginstaller/tmp-bin"
1414

1515
binDir="${BASEDIR}/root/podman/bin"
1616
libDir="${BASEDIR}/root/podman/lib"
17+
docDir="${BASEDIR}/root/podman/docs/man/man1"
1718

1819
version=$(cat "${BASEDIR}/VERSION")
1920
arch=$(cat "${BASEDIR}/ARCH")
2021

2122
function build_podman() {
2223
pushd "$1"
2324

25+
make docs
26+
mkdir -p "contrib/pkginstaller/out/packaging/${docDir}"
27+
cp -v docs/build/man/*.1 "contrib/pkginstaller/out/packaging/${docDir}"
28+
2429
case ${goArch} in
2530
universal)
2631
build_fat

contrib/pkginstaller/scripts/postinstall

+5
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ echo "/opt/podman/bin" > /etc/paths.d/podman-pkg
66

77
# make sure to ignore errors, this is not a hard requirement to use podman
88
/opt/podman/bin/podman-mac-helper install || :
9+
10+
# Add pointer to podman docs in manpath
11+
if [ ! -d "/usr/local/etc/man.d/podman.man.conf" ]; then
12+
echo "MANPATH /opt/podman/docs/man" > /usr/local/etc/man.d/podman.man.conf
13+
fi

contrib/pkginstaller/scripts/preinstall

+6
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ rm -rf /opt/podman
77
if [ ! -d "/etc/paths.d" ]; then
88
mkdir -p /etc/paths.d
99
fi
10+
11+
# Create directory to be able to add podman
12+
# man pages into the "man" path
13+
if [ ! -d "/usr/local/etc/man.d" ]; then
14+
mkdir -p /usr/local/etc/man.d
15+
fi

0 commit comments

Comments
 (0)