aboutsummaryrefslogtreecommitdiffhomepage
path: root/.fmsbw/images/Makefile
blob: 678a05a83777e5c3096c542d21b60e93f1126dfd (plain)
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
62
63
64
65
66
67
# Don't build any image by default
all:

# Base image for building SciTECO on FreeBSD.
freebsd14-sciteco:
	buildah from --name $@-working --network=host quay.io/dougrabson/freebsd14.1-small
	buildah config --env ASSUME_ALWAYS_YES=yes $@-working
	buildah run $@-working pkg update
	buildah run $@-working pkg install FreeBSD-clang FreeBSD-lld FreeBSD-libcompiler_rt-dev FreeBSD-clibs-dev \
	                                   gmake pkgconf autoconf automake libtool \
	                                   glib gtk3 groff doxygen lowdown valgrind
	buildah run $@-working pkg clean -a
	buildah commit $@-working $@

freebsd14-msys-sciteco:
	buildah from --name $@-working --network=host freebsd14-sciteco
	buildah run $@-working pkg install llvm21 gnugrep gmake coreutils gsed gawk \
	                                   git wget gnupg bash groff zip autoconf automake libtool python3 \
	                                   wine
	#buildah run $@-working pkg remove FreeBSD-clang
	buildah run $@-working pkg clean -a
	# Cannot check out with --depth=1 as we need a particular commit.
	buildah run $@-working git clone https://github.com/HolyBlackCat/quasi-msys2.git /opt/quasi-msys2
	buildah config --workingdir /opt/quasi-msys2 $@-working
	buildah run $@-working git checkout e41c4d0f7dde15031132348875d1d01c8d0ea857
	buildah run $@-working ln -s /usr/local/bin/gpgv2 /usr/local/bin/gpgv
	buildah run $@-working ln -s /usr/local/bin/bash /bin/bash
	buildah run $@-working mkdir -p gnu-overrides
	buildah run $@-working ln -s /usr/local/bin/ggrep gnu-overrides/grep
	buildah run $@-working ln -s /usr/local/bin/gmake gnu-overrides/make
	buildah run $@-working ln -s /usr/local/bin/gsed gnu-overrides/sed
	buildah run $@-working ln -s /usr/local/bin/greadlink gnu-overrides/readlink
	buildah run $@-working ln -s /usr/local/bin/wine64 gnu-overrides/wine
	buildah run $@-working bash -c 'echo MINGW64 >msystem.txt'
	buildah copy $@-working msys-activate activate
	buildah run $@-working gmake install _autotools _gcc _libc++ _glib2 _pdcurses _gtk3 _librsvg
	buildah run $@-working ln -nfs "/opt/quasi-msys2/root/mingw64" /mingw64
	# The upstream _pdcurses package is often too outdated, so we also build from sources.
	# TOOD: Build this with -flto.
	buildah run $@-working git clone --depth=1 -b v4.5.4 https://github.com/Bill-Gray/PDCursesMod.git /opt/PDCursesMod
	buildah run $@-working bash -c '. /opt/quasi-msys2/activate && gmake -j2 -C /opt/PDCursesMod/wincon CC=$$CC AR=$$AR WIDE=Y UTF8=Y'
	buildah run $@-working bash -c '. /opt/quasi-msys2/activate && gmake -j2 -C /opt/PDCursesMod/wingui CC=$$CC AR=$$AR WIDE=Y UTF8=Y'
	buildah commit $@-working $@

freebsd14-osx-sciteco:
	false # TODO

APT_GET = apt-get -o APT::Cache-Start=100000000 --yes

ubuntu22-appimage:
	buildah from --name $@-working --network=host --os=linux ubuntu:22.04
	buildah run $@-working $(APT_GET) update
	buildah run $@-working $(APT_GET) install fuse libfuse2 imagemagick wget file binutils libglib2.0-bin
	buildah run $@-working $(APT_GET) clean
	buildah run $@-working mkdir -p ~/pkg2appimage
	buildah config --workingdir '~/pkg2appimage' $@-working
	buildah run $@-working wget -O pkg2appimage.AppImage \
	                       https://github.com/AppImageCommunity/pkg2appimage/releases/download/continuous/pkg2appimage-1eceb30-x86_64.AppImage
	buildah run $@-working chmod +x pkg2appimage.AppImage
	# FIXME: We could get automatic mounting to work with fusefs in the host and by exposing /dev/fuse.
	# FIXME: This does not run without /proc.
	buildah run $@-working ./pkg2appimage.AppImage --appimage-extract
	buildah commit $@-working $@

# Remove all temporary containers
clean:
	buildah rm --all