-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.rpm
More file actions
48 lines (40 loc) · 1.15 KB
/
Dockerfile.rpm
File metadata and controls
48 lines (40 loc) · 1.15 KB
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
# Dockerfile for building kate-code .rpm package
# Usage:
# docker build -f Dockerfile.rpm -t kate-code-rpm .
# docker run --rm -v $(pwd)/dist:/dist kate-code-rpm
FROM fedora:41
# Install build dependencies
RUN dnf install -y \
rpm-build \
cmake \
extra-cmake-modules \
gcc-c++ \
kf6-ktexteditor-devel \
kf6-ki18n-devel \
kf6-kcoreaddons-devel \
kf6-kxmlgui-devel \
kf6-syntax-highlighting-devel \
kf6-kwallet-devel \
kf6-kpty-devel \
qt6-qtwebengine-devel \
&& dnf clean all
WORKDIR /build
# Copy source
COPY . /build/
# Create tarball for rpmbuild
RUN mkdir -p /root/rpmbuild/{SOURCES,SPECS} && \
tar czf /root/rpmbuild/SOURCES/kate-code-1.0.0.tar.gz \
--transform 's,^,kate-code-1.0.0/,' \
--exclude='.git' \
--exclude='build' \
--exclude='dist' \
--exclude='*.tar.gz' \
--exclude='*.pkg.tar.zst' \
. && \
cp kate-code.spec /root/rpmbuild/SPECS/
# Build the package
RUN rpmbuild -ba /root/rpmbuild/SPECS/kate-code.spec
# Copy RPM to dist
RUN mkdir -p /dist && \
cp /root/rpmbuild/RPMS/*/*.rpm /dist/
CMD ["cp", "-r", "/dist/.", "/output/"]