Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
Created November 21, 2025 12:19
Show Gist options
  • Select an option

  • Save lidgnulinux/63309c82e073861fb4a4c3c69c60e74b to your computer and use it in GitHub Desktop.

Select an option

Save lidgnulinux/63309c82e073861fb4a4c3c69c60e74b to your computer and use it in GitHub Desktop.
bmake build example.
PREFIX=/usr
LIBDIR=/usr/lib
SYSCONFDIR=/etc
LIBEXECDIR=/usr/libexec
BINDIR=/usr/bin
GETSOURCE="wget"
MESON_CONFIGURE_ARGS = --prefix=${PREFIX} \
--libdir=${LIBDIR} \
--buildtype=release \
${BUILD_OPTIONS}
.PHONY: all fetch extract build install clean
all: build
fetch:
@echo "===> Fetching for ${PKGNAME}"
@if [ ! -f $(PWD)/${ARCHIVE} ]; then \
${GETSOURCE} -c ${SOURCE}; \
else \
echo "Source's package already downloaded"; \
fi
extract: fetch
@echo "===> extracting ${PKGNAME} source code."
@if [ ! -d $(PWD)/${BUILDDIR} ]; then \
tar -xvf ${ARCHIVE}; \
else \
echo "Source's package already extracted."; \
fi
build: extract
@echo "===> Start to build ${PKGNAME}."
@echo "===> Configure build."
meson setup ${MESON_CONFIGURE_ARGS} build ${BUILDDIR}
@echo "===> Build using ninja."
meson compile -C build
package:
@echo "===> begin packaging."
meson install --no-rebuild -C build --destdir package
tar -C build/package -cvf \
${PKGNAME}_${V}_${REVISION}_@${CATEGORIES}.tar.gz .
COMMENT = Wayland tiling compositor inspired by Ratpoison
V = 3.1.0
PKGNAME = cagebreak
REVISION = 0
CATEGORIES = wayland
U = https://github.com/project-repo/cagebreak
SOURCE = $U/archive/$V.tar.gz
ARCHIVE = $V.tar.gz
BUILD = meson
BUILDDIR = cagebreak-3.1.0
BUILD_OPTIONS = -Dman-pages=true \
-Dxwayland=true
.include <build.mk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment