forked from ublue-os/akmods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile.extra
62 lines (51 loc) · 2.04 KB
/
Containerfile.extra
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
###
### Containerfile.extra - used to build extra kmods
###
#Build from base, simpley because it's the smallest image
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-base}"
ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops}"
ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG KERNEL_FLAVOR="{KERNEL_FLAVOR:-main}"
ARG KERNEL_VERSION=""
ARG RPMFUSION_MIRROR=""
COPY build*.sh /tmp
COPY certs /tmp/certs
# files for akmods
COPY ublue-os-akmods-addons.spec /tmp/ublue-os-akmods-addons/ublue-os-akmods-addons.spec
ADD https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/repo/fedora-${FEDORA_MAJOR_VERSION}/ublue-os-akmods-fedora-${FEDORA_MAJOR_VERSION}.repo \
/tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo
ADD https://negativo17.org/repos/fedora-multimedia.repo \
/tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/negativo17-fedora-multimedia.repo
RUN /tmp/build-prep.sh
# Set kernel name
RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \
export KERNEL_NAME="kernel" \
; else \
export KERNEL_NAME="kernel-surface" \
; fi && \
if grep -qv "asus" <<< "${KERNEL_FLAVOR}"; then \
/tmp/build-kmod-zenergy.sh \
; fi && \
if grep -qv "fsync" <<< "${KERNEL_FLAVOR}"; then \
/tmp/build-kmod-openrgb.sh \
; fi && \
/tmp/build-kmod-ayaneo-platform.sh && \
/tmp/build-kmod-ayn-platform.sh && \
/tmp/build-kmod-bmi260.sh && \
/tmp/build-kmod-facetimehd.sh && \
/tmp/build-kmod-gcadapter_oc.sh && \
/tmp/build-kmod-nct6687d.sh && \
/tmp/build-kmod-rtl8814au.sh && \
/tmp/build-kmod-rtl88xxau.sh && \
/tmp/build-kmod-ryzen-smu.sh && \
/tmp/build-kmod-vhba.sh && \
/tmp/build-kmod-VirtualBox.sh
RUN for RPM in $(find /var/cache/akmods/ -type f -name \*.rpm); do \
cp "${RPM}" /var/cache/rpms/kmods/; \
done
RUN find /var/cache/rpms
FROM scratch
COPY --from=builder /var/cache/rpms /rpms