-
-
Notifications
You must be signed in to change notification settings - Fork 115
Deb package for fake udev library #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ARG DISTRIB_IMAGE=ubuntu | ||
| ARG DISTRIB_RELEASE=22.04 | ||
| FROM ${DISTRIB_IMAGE}:${DISTRIB_RELEASE} | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
| build-essential \ | ||
| tar \ | ||
| gzip && \ | ||
ehfd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if [ "$(dpkg --print-architecture)" = "amd64" ]; then apt-get update && apt-get install --no-install-recommends -y gcc-multilib; fi && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/debconf/* /var/log/* /tmp/* /var/tmp/* | ||
|
|
||
| ARG PKG_NAME="libudev" | ||
| ARG PKG_VERSION="0.0.0" | ||
| ARG DEBFULLNAME="placeholder" | ||
| ARG DEBEMAIL="placeholder@users.noreply.github.com" | ||
|
|
||
| WORKDIR /opt/build | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN ./build.sh && \ | ||
| tar -czvf /opt/${PKG_NAME}_${PKG_VERSION}.tar.gz libudev*so* | ||
|
|
||
| CMD ["/bin/bash"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| # Create output directory | ||
| PKG_DIR="/opt/${PKG_NAME?missing env}_${PKG_VERSION?missing env}" | ||
| mkdir -p "${PKG_DIR}/DEBIAN" | ||
| # Handles normalising i.*86 values for native arch, if any | ||
| LIB_DIR="${PKG_DIR}/usr/lib/$(gcc -print-multiarch | sed -e 's/i.*86/i386/')" | ||
| mkdir -p "${LIB_DIR}" | ||
| export LIB_VERSION="${PKG_VERSION}-fake" | ||
| make | ||
| cp -f libudev.so.${PKG_VERSION}-fake "${LIB_DIR}/libudev.so.${PKG_VERSION}-fake" | ||
|
|
||
| if [ "$(dpkg --print-architecture)" = "amd64" ]; then | ||
| LIB_DIR="${PKG_DIR}/usr/lib/$(gcc -m32 -print-multiarch | sed -e 's/i.*86/i386/')" | ||
| mkdir -p "${LIB_DIR}" | ||
| make all32 | ||
| cp -f libudev_x86.so.${PKG_VERSION}-fake "${LIB_DIR}/libudev.so.${PKG_VERSION}-fake" | ||
| fi | ||
|
|
||
| PKG_SIZE="$(du -s "${PKG_DIR}/usr" | awk '{print $1}' | xargs)" | ||
|
|
||
| cat - > ${PKG_DIR}/DEBIAN/control <<EOF | ||
| Package: ${PKG_NAME?missing env} | ||
| Version: ${PKG_VERSION} | ||
| Section: custom | ||
| Priority: optional | ||
| Architecture: $(dpkg --print-architecture) | ||
| Essential: no | ||
| Installed-Size: ${PKG_SIZE?missing env} | ||
| Maintainer: ${DEBFULLNAME?missing env} <${DEBEMAIL?missing env}> | ||
| Description: Fake udev shared library for Selkies project. A dependency for Selkies joystick device interposer. | ||
| EOF | ||
|
|
||
| dpkg-deb --build ${PKG_DIR} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.