aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-12-25 22:14:36 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-12-25 22:14:36 +0800
commita49505b39f680d910148f5678a5b31cb3f8e3db4 (patch)
treed2eefa58393b9d079a931a01afb6a3a695ff9485
parent8bc336fa6fae5b7c7dde2afa70750f089a04c843 (diff)
downloadautils-a49505b39f680d910148f5678a5b31cb3f8e3db4.tar.gz
autils-a49505b39f680d910148f5678a5b31cb3f8e3db4.zip
updates
-rw-r--r--INSTALL.sh11
-rwxr-xr-xapkg3
-rw-r--r--doc/apkg.conf.readme9
-rwxr-xr-xrevdep9
4 files changed, 28 insertions, 4 deletions
diff --git a/INSTALL.sh b/INSTALL.sh
new file mode 100644
index 0000000..e665442
--- /dev/null
+++ b/INSTALL.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+BINDIR=${DESTDIR}${BINDIR:-/usr/bin}
+CONFDIR=${DESTDIR}${CONFDIR:-/etc}
+
+mkdir -p ${BINDIR} ${CONFDIR}
+
+install -m755 apkg ${BINDIR}
+install -m755 apkg-* ${BINDIR}
+install -m755 revdep updateconf ${BINDIR}
+install -m644 doc/apkg.conf.readme ${CONFDIR}/apkg.conf
diff --git a/apkg b/apkg
index 6e0f9e2..28926a4 100755
--- a/apkg
+++ b/apkg
@@ -822,7 +822,7 @@ options:
-g <pkg> update package checksum
-k <pkg> update package files
-s <pattern> search packages
- -s <pattern> search files
+ -S <pattern> search files
-h print this help message
environment variables:
@@ -850,7 +850,6 @@ main() {
msg "Package '$p' not found"
continue
}
- #printf "%s\n" "[$p] package build starts..."
(cd "$(pkg_path "$p")" && $APKG "$@") || exit 1
done
exit 0
diff --git a/doc/apkg.conf.readme b/doc/apkg.conf.readme
index dd33863..397218f 100644
--- a/doc/apkg.conf.readme
+++ b/doc/apkg.conf.readme
@@ -29,6 +29,15 @@ APKG_SOURCE_DIR=<path to source directory>
# skip user prompt when using '-I' and '-U' options (disable interactive mode, good to use in scripting)
#APKG_NOPROMPT=1
+# package dependencies alias
+# example: point openssl to libressl, so when installing package that depends on openssl will pull libressl instead
+# format: '<realpkg>:<aliasedpkg>'
+#APKG_ALIAS="openssl:libressl pkg1:pkg2"
+
+# package mask
+# avoid package(s) from get upgraded
+#APKG_MASK="musl gcc linux"
+
# you can define and export whatever needed variable here as long its safe and not conflicting with other important
# build variable, example, keep_* can be used here to set globally
#keep_static=1
diff --git a/revdep b/revdep
index 4ca65c6..d9cd903 100755
--- a/revdep
+++ b/revdep
@@ -24,8 +24,13 @@ while read -r line; do
fi
case "$(file -bi "$line")" in
*application/x-sharedlib* | *application/x-executable* | *application/x-pie-executable*)
- missinglib=$(ldd /$line 2>&1 | grep "Error loading shared library" | awk '{print $5}' | sed 's/://' | sort | uniq)
- #missinglib=$(ldd /$line 2>&1 | grep "not found" | awk '{print $1}' | sort | uniq)
+ if [ -e /lib/ld-musl-x86_64.so.1 ] || [ -e /usr/lib/ld-musl-x86_64.so.1 ]; then
+ # musl system
+ missinglib=$(ldd /$line 2>&1 | grep "Error loading shared library" | awk '{print $5}' | sed 's/://' | sort | uniq)
+ else
+ # glibc system
+ missinglib=$(ldd /$line 2>&1 | grep "not found" | awk '{print $1}' | sort | uniq)
+ fi
if [ "$missinglib" ]; then
for i in $missinglib; do
objdump -p /$line | grep NEEDED | awk '{print $2}' | grep -qx $i && {