From 8ba3c15259175ee64ece7ef620c58ada7994e60b Mon Sep 17 00:00:00 2001 From: emmett1 Date: Sat, 30 May 2026 00:18:25 +0800 Subject: removed APKG_BINMERGE --- README.md | 38 ++++++++++++++++++-------------------- apkg | 11 ----------- man/apkg.8 | 7 ------- 3 files changed, 18 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 8cb5623..699466e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # autils -Alice Linux Utilities — a collection of POSIX shell scripts for source-based package management on [Alice Linux](https://codeberg.org/emmett1/alicelinux). +Alice Linux Utilities: a collection of POSIX shell scripts for source-based package management on [Alice Linux](https://codeberg.org/emmett1/alicelinux). ## Overview @@ -74,7 +74,7 @@ updateconf | Tool | Description | |---|---| | `revdep` | Scan system binaries and libraries for missing library links (run after major upgrades) | -| `updateconf` | Interactive `.new` config file merge tool — diff, keep, discard, or edit | +| `updateconf` | Interactive `.new` config file merge tool: diff, keep, discard, or edit | | `reposync` | Git repo sync driven by `REPOSYNC_*` environment variables (no `/etc/apkg.conf` dependency) | ## The abuild recipe @@ -146,12 +146,12 @@ Without `build()`, optional `prebuild()` and `postbuild()` hooks run before and When no `build()` function is defined, apkg auto-detects the build system by checking for these files in order: -1. **meson.build** — `meson setup` with LTO, PIE, `wrap_mode=nodownload`, `buildtype=plain` -2. **configure** — `./configure --prefix=/usr --sysconfdir=/etc ...` -3. **CMakeLists.txt** — `cmake` with `Release` build type, prefers `ninja` -4. **setup.py** — `python3 setup.py build && install --root=$PKG` -5. **Makefile.PL** — `perl Makefile.PL && make && make install` -6. **Makefile / makefile / GNUmakefile** — raw `make` with standard prefix variables +1. **meson.build**: `meson setup` with LTO, PIE, `wrap_mode=nodownload`, `buildtype=plain` +2. **configure**: `./configure --prefix=/usr --sysconfdir=/etc ...` +3. **CMakeLists.txt**: `cmake` with `Release` build type, prefers `ninja` +4. **setup.py**: `python3 setup.py build && install --root=$PKG` +5. **Makefile.PL**: `perl Makefile.PL && make && make install` +6. **Makefile / makefile / GNUmakefile**: raw `make` with standard prefix variables See `doc/defaultbuildopts` for the exact flags used by each build system. @@ -162,22 +162,21 @@ After compilation, apkg automatically: - Removes common conflict files (`fonts.dir`, `fonts.scale`, `perllocal.pod`, `charset.alias`) - Removes static libraries (`*.a`), libtool archives (`*.la`), locales, and docs (unless kept via `keep_*`) - Strips ELF binaries (`--strip-all`), shared objects (`--strip-unneeded`), and static archives (`--strip-debug`) -- Merges `/bin`, `/sbin`, `/usr/sbin` into `/usr/bin` if `APKG_BINMERGE` is set ## Triggers After install or upgrade, apkg can automatically refresh system caches when the package provides relevant files: -- **fontconfig** — `fc-cache -sf` -- **GDK-Pixbuf** — `gdk-pixbuf-query-loaders --update-cache` -- **GIO modules** — `gio-querymodules /usr/lib/gio/modules` -- **GSettings schemas** — `glib-compile-schemas /usr/share/glib-2.0/schemas` -- **GTK2/GTK3 input methods** — `gtk-query-immodules-2.0/3.0 --update-cache` -- **Icon themes** — `gtk-update-icon-cache` -- **udev hardware database** — `udevadm hwdb --update` -- **X font indices** — `mkfontdir` / `mkfontscale` -- **Desktop MIME cache** — `update-desktop-database` -- **Shared MIME database** — `update-mime-database /usr/share/mime` +- **fontconfig**: `fc-cache -sf` +- **GDK-Pixbuf**: `gdk-pixbuf-query-loaders --update-cache` +- **GIO modules**: `gio-querymodules /usr/lib/gio/modules` +- **GSettings schemas**: `glib-compile-schemas /usr/share/glib-2.0/schemas` +- **GTK2/GTK3 input methods**: `gtk-query-immodules-2.0/3.0 --update-cache` +- **Icon themes**: `gtk-update-icon-cache` +- **udev hardware database**: `udevadm hwdb --update` +- **X font indices**: `mkfontdir` / `mkfontscale` +- **Desktop MIME cache**: `update-desktop-database` +- **Shared MIME database**: `update-mime-database /usr/share/mime` Run `apkg -t` to trigger these manually for all installed packages. @@ -196,7 +195,6 @@ Run `apkg -t` to trigger these manually for all installed packages. | `APKG_KEEP_WORKDIR` | (unset) | Keep build tree on failure (for debugging) | | `APKG_ALIAS` | (unset) | Dependency substitution: `real:alias` pairs | | `APKG_MASK` | (unset) | Packages to skip during `-l` and `-U` | -| `APKG_BINMERGE` | (unset) | Merge bin/sbin dirs into `/usr/bin` | | `APKG_LOG` | (unset) | Enable build logging | | `APKG_LOG_DIR` | (unset) | Log file directory (filename: `$name.log`) | diff --git a/apkg b/apkg index 74373d6..a536c8e 100755 --- a/apkg +++ b/apkg @@ -345,17 +345,6 @@ build_src() { esac done fi - - # usrmerge - if [ "$APKG_BINMERGE" ]; then - for b in bin sbin usr/sbin; do - if [ -d $PKG/$b ]; then - mkdir -p $PKG/usr/bin - mv $PKG/$b/* $PKG/usr/bin - rm -rf $PKG/$b - fi - done - fi # runit service for s in $sv; do diff --git a/man/apkg.8 b/man/apkg.8 index b810666..4eae6b6 100644 --- a/man/apkg.8 +++ b/man/apkg.8 @@ -236,9 +236,6 @@ Strips ELF executables (\fB\-\-strip-all\fR), shared objects (\fB\-\-strip-unneeded\fR), and static archives (\fB\-\-strip-debug\fR) unless \fBno_strip\fR is set .IP \- 2 -Merges \fI/bin\fR, \fI/sbin\fR, \fI/usr/sbin\fR into \fI/usr/bin\fR if -\fBAPKG_BINMERGE\fR is set -.IP \- 2 Installs runit service files from the \fBsv\fR variable into \fI/etc/sv\fR .SH ENVIRONMENT @@ -275,10 +272,6 @@ Space-separated list of \fIreal:alias\fR pairs for dependency substitution \fBAPKG_MASK\fR Space-separated list of packages to exclude from \fB\-l\fR and \fB\-U\fR. .TP -\fBAPKG_BINMERGE\fR -If set, merge \fI/bin\fR, \fI/sbin\fR, and \fI/usr/sbin\fR into -\fI/usr/bin\fR during packaging. -.TP \fBAPKG_LOG\fR If set, enable build logging. .TP -- cgit v1.2.3