forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Fix rpm build; add a CI check for it.
- Loading branch information
Showing
6 changed files
with
74 additions
and
11 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
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,47 @@ | ||
FROM toxchat/c-toxcore:sources AS sources | ||
FROM fedora:39 | ||
|
||
RUN ["dnf", "install", "-y", \ | ||
"cmake", \ | ||
"g++", \ | ||
"gcc", \ | ||
"git", \ | ||
"libconfig-devel", \ | ||
"libsodium-devel", \ | ||
"libvpx-devel", \ | ||
"make", \ | ||
"opus-devel", \ | ||
"rpmdevtools", \ | ||
"rpmlint", \ | ||
"systemd-units"] | ||
|
||
ARG PROJECT_VERSION=master | ||
ARG PROJECT_COMMIT_ID=master | ||
ARG PROJECT_COMMIT_ID_SHORT=master | ||
|
||
COPY --from=sources /src/ /work/c-toxcore-${PROJECT_COMMIT_ID} | ||
WORKDIR /work/c-toxcore-${PROJECT_COMMIT_ID}/other/rpm | ||
|
||
RUN make toxcore.spec \ | ||
PROJECT_VERSION="$PROJECT_VERSION" \ | ||
PROJECT_COMMIT_ID="$PROJECT_COMMIT_ID" \ | ||
PROJECT_COMMIT_ID_SHORT="$PROJECT_COMMIT_ID_SHORT" \ | ||
PROJECT_GIT_ROOT="/work/c-toxcore-$PROJECT_COMMIT_ID_SHORT" | ||
|
||
WORKDIR /work | ||
RUN tar zcf "c-toxcore-${PROJECT_COMMIT_ID_SHORT}.tar.gz" "c-toxcore-${PROJECT_COMMIT_ID}" \ | ||
&& mv "c-toxcore-${PROJECT_COMMIT_ID_SHORT}.tar.gz" "c-toxcore-${PROJECT_COMMIT_ID}/other/rpm" | ||
WORKDIR /work/c-toxcore-${PROJECT_COMMIT_ID}/other/rpm | ||
RUN make srpm \ | ||
PROJECT_VERSION="$PROJECT_VERSION" \ | ||
PROJECT_COMMIT_ID="$PROJECT_COMMIT_ID" \ | ||
PROJECT_COMMIT_ID_SHORT="$PROJECT_COMMIT_ID_SHORT" \ | ||
PROJECT_GIT_ROOT="$PROJECT_GIT_ROOT" | ||
|
||
# Build the binary rpms. | ||
RUN rpmbuild --rebuild "toxcore-${PROJECT_VERSION}-1.fc39.src.rpm" | ||
|
||
# Install them and try running the bootstrap daemon. | ||
RUN rpm -i /root/rpmbuild/RPMS/x86_64/*.rpm | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN script tox-bootstrapd --help | grep Usage |
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,13 @@ | ||
#!/bin/sh | ||
|
||
set -eux | ||
PROJECT_VERSION="$(git describe | sed -e 's/^v//' -e 's/-/_/g')" | ||
PROJECT_COMMIT_ID="$(git rev-parse HEAD)" | ||
PROJECT_COMMIT_ID_SHORT="$(git rev-parse --short HEAD)" | ||
|
||
BUILD=rpm | ||
other/docker/sources/build | ||
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" . \ | ||
--build-arg="PROJECT_VERSION=$PROJECT_VERSION" \ | ||
--build-arg="PROJECT_COMMIT_ID=$PROJECT_COMMIT_ID" \ | ||
--build-arg="PROJECT_COMMIT_ID_SHORT=$PROJECT_COMMIT_ID_SHORT" |
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
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
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