-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 @@ | ||
output/ |
This file contains 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,22 @@ | ||
#!/bin/bash -e | ||
|
||
# Install extra dependencies that were provided for the build (if any) | ||
# Note: dpkg can fail due to dependencies, ignore errors, and use | ||
# apt-get to install those afterwards | ||
[[ -d /dependencies ]] && dpkg -i /dependencies/*.deb || apt-get -f install -y --no-install-recommends | ||
|
||
# Make read-write copy of source code | ||
mkdir -p /build | ||
cp -a /source-ro /build/source | ||
cd /build/source | ||
|
||
# Install build dependencies | ||
mk-build-deps -ir -t "apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends" | ||
|
||
# Build packages | ||
debuild -b -uc -us | ||
|
||
# Copy packages to output dir with user's permissions | ||
chown -R $USER:$GROUP /build | ||
cp -a /build/*.deb /output/ | ||
|
This file contains 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,12 @@ | ||
#!/bin/bash -e | ||
|
||
SCRIPT=`realpath $0` | ||
PWD=`dirname $SCRIPT` | ||
OUTPUT=${PWD}/../output/ | ||
if [ ! -d "$OUTPUT" ]; then | ||
mkdir $OUTPUT | ||
fi | ||
docker build -t docker-deb-builder:stretsh -f ${PWD}/dockerfile_hw_mgmt ${PWD}/ | ||
docker run -it -v ${PWD}/../:/source-ro:ro -v ${OUTPUT}:/output -v ${PWD}/build-helper.sh:/build-helper.sh:ro -e USER=5616 -e GROUP=101 --rm docker-deb-builder:stretsh /build-helper.sh | ||
cd ${OUTPUT} | ||
echo $(pwd)/$(ls) |
This file contains 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,15 @@ | ||
FROM debian:stretch | ||
MAINTAINER Oleksandr Shamray <[email protected]> | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
devscripts \ | ||
equivs \ | ||
fakeroot \ | ||
debhelper \ | ||
automake \ | ||
autotools-dev \ | ||
pkg-config \ | ||
ca-certificates \ | ||
&& apt-get clean \ | ||
&& rm -rf /tmp/* /var/tmp/* |