mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-27 06:10:36 +00:00
24 lines
508 B
Bash
Executable File
24 lines
508 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
DEB_SUFFIX="$1"
|
|
DEB_PACKAGE="darling-${DEB_SUFFIX}"
|
|
|
|
ARGS_FILE="$(mktemp)"
|
|
|
|
if [ -d "debian/tmp/${DEB_SUFFIX}" ]; then
|
|
find "debian/tmp/${DEB_SUFFIX}" -type f -exec tools/debian/make-shlibdeps-file "${ARGS_FILE}" {} \;
|
|
else
|
|
touch "${ARGS_FILE}"
|
|
fi
|
|
|
|
OUT="$(mktemp)"
|
|
DUMMY="$(mktemp)"
|
|
clang "${DUMMY}" -x c -shared -o "${OUT}"$(cat ${ARGS_FILE})
|
|
dpkg-shlibdeps -T"debian/${DEB_PACKAGE}.substvars" -p"macho" -e"${OUT}" > /dev/null 2>&1
|
|
|
|
rm -f "${ARGS_FILE}"
|
|
rm -f "${OUT}"
|
|
rm -f "${DUMMY}"
|