docs: add MAN page (section 8), README, user guide, admin guide, and developer guide

This commit is contained in:
soda64 committed 2026-10-02 12:37:13 +02:00
1 parent e1a99d7e6f
commit 507a3fd310
10 files changed
+835 -1

No files matched your search

+10
View File
@@ -101,6 +101,10 @@ class PackageBuilder:
str(tmp_root / "linux-updater.json.example"),
)
# Copy man page
if (self.source_root / "man").exists():
shutil.copytree(str(self.source_root / "man"), str(tmp_root / "man"))
# Archive the tree
with tarfile.open(str(out_path), "w:gz") as tar:
tar.add(str(tmp_root), arcname=f"linux-updater-{self.version}")
@@ -142,6 +146,10 @@ class PackageBuilder:
str(self.source_root / "linux-updater.json.example"),
str(etc_dir / "linux-updater.json"),
)
if (self.source_root / "man" / "linux-updater.8").exists():
man_dir = data_dir / "usr" / "share" / "man" / "man8"
man_dir.mkdir(parents=True, exist_ok=True)
shutil.copy2(str(self.source_root / "man" / "linux-updater.8"), str(man_dir / "linux-updater.8"))
# If dpkg-deb is available, use it; otherwise build native .deb
if shutil.which("dpkg-deb"):
@@ -193,6 +201,8 @@ class PackageBuilder:
str(self.source_root / "linux-updater.json.example"),
str(tmp_root / "linux-updater.json.example"),
)
if (self.source_root / "man").exists():
shutil.copytree(str(self.source_root / "man"), str(tmp_root / "man"))
with tarfile.open(str(tarball_path), "w:gz") as tar:
tar.add(str(tmp_root), arcname=f"linux-updater-{self.version}")
+6
View File
@@ -33,4 +33,10 @@ if [ ! -f "${SYSCONFDIR}/linux-updater.json" ] && [ -f "${SCRIPT_DIR}/linux-upda
chmod 644 "${SYSCONFDIR}/linux-updater.json"
fi
# Install man page
if [ -f "${SCRIPT_DIR}/man/linux-updater.8" ]; then
mkdir -p "${PREFIX}/share/man/man8"
install -m 644 "${SCRIPT_DIR}/man/linux-updater.8" "${PREFIX}/share/man/man8/linux-updater.8"
fi
echo "Installation complete! Run 'linux-updater --help' to verify."
+5
View File
@@ -32,6 +32,10 @@ mkdir -p $RPM_BUILD_ROOT/var/log/linux-updater
cp -r linux_updater $RPM_BUILD_ROOT/usr/lib/linux-updater/
install -m 755 bin/linux-updater $RPM_BUILD_ROOT/usr/bin/linux-updater
install -m 644 linux-updater.json.example $RPM_BUILD_ROOT/etc/linux-updater.json
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
if [ -f man/linux-updater.8 ]; then
install -m 644 man/linux-updater.8 $RPM_BUILD_ROOT%{_mandir}/man8/linux-updater.8
fi
%files
%defattr(-,root,root,-)
@@ -39,6 +43,7 @@ install -m 644 linux-updater.json.example $RPM_BUILD_ROOT/etc/linux-updater.json
/usr/lib/linux-updater
%config(noreplace) /etc/linux-updater.json
%dir %attr(0750, root, root) /var/log/linux-updater
%{_mandir}/man8/linux-updater.8*
%changelog
* Fri Oct 02 2026 Test Factory <admin@localhost> - 1.0.0-1