diff options
| author | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-12-25 22:14:36 +0800 |
|---|---|---|
| committer | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-12-25 22:14:36 +0800 |
| commit | a49505b39f680d910148f5678a5b31cb3f8e3db4 (patch) | |
| tree | d2eefa58393b9d079a931a01afb6a3a695ff9485 | |
| parent | 8bc336fa6fae5b7c7dde2afa70750f089a04c843 (diff) | |
| download | autils-a49505b39f680d910148f5678a5b31cb3f8e3db4.tar.gz autils-a49505b39f680d910148f5678a5b31cb3f8e3db4.zip | |
updates
| -rw-r--r-- | INSTALL.sh | 11 | ||||
| -rwxr-xr-x | apkg | 3 | ||||
| -rw-r--r-- | doc/apkg.conf.readme | 9 | ||||
| -rwxr-xr-x | revdep | 9 |
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 @@ -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 @@ -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 && { |