Skip to content

Commit 8401067

Browse files
committed
Add Dockerfile
1 parent c62bae0 commit 8401067

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM devkitpro/devkitppc:latest
2+
3+
LABEL maintainer="Extrems <extrems@extremscorner.org>" \
4+
org.opencontainers.image.source="https://github.com/extremscorner/libogc2"
5+
6+
SHELL ["/bin/bash", "-c"]
7+
RUN rm /etc/apt/sources.list.d/devkitpro.list && \
8+
wget -O - https://packages.extremscorner.org/devkitpro.gpg | dkp-pacman-key --add - && \
9+
dkp-pacman-key --lsign-key C8A2759C315CFBC3429CC2E422B803BA8AA3D7CE && \
10+
sed -i '/^\[dkp-libs\]$/,$d' /opt/devkitpro/pacman/etc/pacman.conf && \
11+
echo -e '[extremscorner-devkitpro]\nServer = https://packages.extremscorner.org/devkitpro/linux/$arch' >> /opt/devkitpro/pacman/etc/pacman.conf && \
12+
dkp-pacman -Syy && \
13+
dkp-pacman -S --noconfirm --ask 4 gamecube-dev gamecube-portlibs ppc-portlibs wii-dev wii-portlibs && \
14+
dkp-pacman -Scc --noconfirm

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export LIBOGC_PATCH := 0
1818

1919
include $(DEVKITPPC)/base_rules
2020

21-
DATESTRING := $(shell date +%Y%m%d)
21+
DATESTRING := $(shell date -u +%Y%m%d)
2222
VERSTRING := $(shell printf "r%s.%s" "$$(git rev-list --count HEAD)" "$$(git rev-parse --short=7 HEAD)")
2323

2424
#---------------------------------------------------------------------------------
@@ -263,7 +263,7 @@ $(BTELIB).a: $(BTEOBJ)
263263
$(WIIUSELIB).a: $(WIIUSEOBJ)
264264
#---------------------------------------------------------------------------------
265265

266-
.PHONY: libs wii cube install-headers install uninstall dist docs
266+
.PHONY: libs wii cube install-headers install uninstall dist docs docker
267267

268268
#---------------------------------------------------------------------------------
269269
install-headers:
@@ -341,4 +341,9 @@ docs: install-headers
341341
#---------------------------------------------------------------------------------
342342
VERSTRING="$(VERSTRING)" doxygen Doxyfile
343343

344+
#---------------------------------------------------------------------------------
345+
docker:
346+
#---------------------------------------------------------------------------------
347+
docker build --no-cache -t ghcr.io/extremscorner/libogc2:$(DATESTRING) -t ghcr.io/extremscorner/libogc2:latest .
348+
344349
-include $(DEPSDIR)/*.d

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ sudo (dkp-)pacman -S libogc2-cmake
7373

7474
`DKP_OGC_PLATFORM_LIBRARY` may be set to `libogc` or `libogc2` to build projects using either thereafter.
7575

76+
### GitHub Actions
77+
78+
```diff
79+
- container: devkitpro/devkitppc:latest
80+
+ container: ghcr.io/extremscorner/libogc2:latest
81+
```
82+
7683
## Building
7784

7885
1. Existing packages should first be uninstalled if already installed.

0 commit comments

Comments
 (0)