mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-23 04:09:43 +00:00
Merge pull request #825 from TheBrokenRail/better-deb
Use elfdep To get shlibdeps for DEB
This commit is contained in:
commit
2880f15a5d
@ -37,8 +37,7 @@ jobs:
|
||||
name: Build DSCs
|
||||
no_output_timeout: 30m
|
||||
command: |
|
||||
export DEB_DISTRO=$(lsb_release -cs)
|
||||
tools/makedeb --dsc
|
||||
tools/debian/make-deb --dsc
|
||||
- run:
|
||||
name: Move DSCs
|
||||
command: mkdir source && mv ../*~$(lsb_release -cs).* source
|
||||
@ -46,8 +45,7 @@ jobs:
|
||||
name: Build DEBs
|
||||
no_output_timeout: 30m
|
||||
command: |
|
||||
export DEB_DISTRO=$(lsb_release -cs)
|
||||
tools/makedeb
|
||||
tools/debian/make-deb
|
||||
- run:
|
||||
name: Move DEBs
|
||||
command: mkdir dist && mv ../*.deb dist
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -7,7 +7,7 @@ Build-Depends: cmake, clang | clang-9, bison, flex, libfuse-dev, libudev-dev, pk
|
||||
|
||||
Package: darling
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, fuse, darling-dkms
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${macho:Depends}, fuse, darling-dkms
|
||||
Description: Darling
|
||||
macOS emulation layer for Linux
|
||||
|
||||
|
3
debian/darling-dkms.lintian-overrides
vendored
3
debian/darling-dkms.lintian-overrides
vendored
@ -1,3 +0,0 @@
|
||||
package-contains-vcs-control-file usr/src/darling-mach-0.1/lkm/.gitignore
|
||||
executable-not-elf-or-script usr/src/darling-mach-0.1/lkm*
|
||||
extended-description-is-empty
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -11,7 +11,7 @@ override_dh_auto_build:
|
||||
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs
|
||||
# TODO: append ELF files referenced from Mach-Os into debian/darling.shlibs
|
||||
tools/debian/make-shlibdeps
|
||||
|
||||
override_dh_clean:
|
||||
dh_clean -X.orig -X.bak -X~
|
||||
|
6
debian/source/lintian-overrides
vendored
6
debian/source/lintian-overrides
vendored
@ -1,6 +0,0 @@
|
||||
darling source: configure-generated-file-in-source *
|
||||
darling source: autotools-pkg-config-macro-not-cross-compilation-safe *
|
||||
darling source: source-contains-prebuilt-windows-binary *
|
||||
darling source: maintainer-script-lacks-debhelper-token debian/*
|
||||
darling source: debhelper-but-no-misc-depends darling-dkms
|
||||
darling source: package-needs-versioned-debhelper-build-depends 10
|
@ -3,7 +3,7 @@ set -e
|
||||
|
||||
DATE=$(date +%Y%m%d)
|
||||
rm -f debian/changelog
|
||||
DISTRO=${DEB_DISTRO:-testing}
|
||||
DISTRO=${DEB_DISTRO:-"$(lsb_release -cs)"}
|
||||
VERSION=0.1.${DATE}~${DISTRO}
|
||||
EDITOR=true NAME="Darling build server" EMAIL=${DEB_EMAIL:-noreply@darlinghq.org} dch -u low -v ${VERSION} --create --distribution ${DISTRO} --package darling "Daily build"
|
||||
|
||||
@ -17,4 +17,4 @@ else
|
||||
ARG='-b'
|
||||
fi
|
||||
|
||||
debuild -us -uc ${ARG}
|
||||
debuild --no-lintian -us -uc ${ARG}
|
16
tools/debian/make-shlibdeps
Executable file
16
tools/debian/make-shlibdeps
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
DEB_PACKAGE='darling'
|
||||
|
||||
ARGS_FILE="$(mktemp)"
|
||||
|
||||
find "debian/${DEB_PACKAGE}" -type f -exec tools/debian/make-shlibdeps-file "${ARGS_FILE}" {} \;
|
||||
|
||||
OUT="$(mktemp)"
|
||||
clang -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}"
|
15
tools/debian/make-shlibdeps-file
Executable file
15
tools/debian/make-shlibdeps-file
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
PATH="$(pwd)/debbuild/src/buildtools:${PATH}"
|
||||
|
||||
if ! LIBS="$(elfdep "$2" 2>&1)"; then
|
||||
exit
|
||||
fi
|
||||
|
||||
ARGS=''
|
||||
|
||||
for lib in ${LIBS}; do
|
||||
printf " -l:${lib}" >> "$1"
|
||||
done
|
Loading…
Reference in New Issue
Block a user