65 lines
2.1 KiB
Makefile
65 lines
2.1 KiB
Makefile
# pornOS build system
|
|
# Make misery happen.
|
|
|
|
SHELL := /bin/bash
|
|
|
|
DESTDIR ?= /mnt
|
|
PREFIX ?= /usr
|
|
|
|
.PHONY: all install clean build-iso test
|
|
|
|
all:
|
|
@echo "pornOS build system v6.9"
|
|
@echo "Run 'make install' to install into $(DESTDIR)"
|
|
@echo "Run 'make build-iso' to build an ISO (requires archiso)"
|
|
@echo "Run 'make test' to run the test suite"
|
|
|
|
install:
|
|
@echo "Installing pornOS components..."
|
|
# holy porn
|
|
install -D -m 755 src/holyporn/holyporn.py "$(DESTDIR)$(PREFIX)/lib/holyporn/holyporn.py"
|
|
ln -sf "$(PREFIX)/lib/holyporn/holyporn.py" "$(DESTDIR)$(PREFIX)/bin/holyporn"
|
|
# pornpkg
|
|
install -D -m 755 src/pornpkg/pornpkg.hp "$(DESTDIR)$(PREFIX)/lib/pornpkg/pornpkg.hp"
|
|
install -D -m 755 src/pornpkg/pornpkg "$(DESTDIR)$(PREFIX)/bin/pornpkg"
|
|
# xvideos
|
|
install -D -m 755 src/xvideos/xvideos "$(DESTDIR)$(PREFIX)/bin/xvideos"
|
|
# porncli
|
|
install -D -m 755 src/porncli/porncli.py "$(DESTDIR)$(PREFIX)/bin/porncli"
|
|
# pornGUI
|
|
install -D -m 755 src/pornGUI/pornGUI.py "$(DESTDIR)$(PREFIX)/bin/pornGUI"
|
|
# porn init
|
|
install -D -m 755 src/porninit/porn "$(DESTDIR)$(PREFIX)/sbin/porn-init"
|
|
ln -sf "$(PREFIX)/sbin/porn-init" "$(DESTDIR)/sbin/init"
|
|
# misery daemon (pornOS has no systemd; install the init.d script)
|
|
install -D -m 755 src/misery-daemon/misery-daemon "$(DESTDIR)$(PREFIX)/bin/misery-daemon"
|
|
install -D -m 755 src/misery-daemon/init.d/misery-daemon "$(DESTDIR)/etc/init.d/misery-daemon"
|
|
# shell
|
|
install -D -m 755 src/scripts/pornsh "$(DESTDIR)$(PREFIX)/bin/pornsh"
|
|
# motd
|
|
install -D -m 644 config/motd "$(DESTDIR)/etc/motd"
|
|
@echo "pornOS installed. misery achieved."
|
|
|
|
build-iso:
|
|
@echo "Building pornOS rootfs + ISO (no archiso)..."
|
|
python3 build/build-pornos.py
|
|
|
|
cumfs:
|
|
@echo "Building cum kernel module..."
|
|
$(MAKE) -C src/cumfs
|
|
|
|
test:
|
|
@echo "Testing holy porn interpreter..."
|
|
python3 src/holyporn/holyporn.py tests/test.hp
|
|
@echo "Testing cum filesystem round-trip..."
|
|
python3 src/cumfs/mkfs.cum --label test --force /tmp/pornos-test.cum tests
|
|
python3 src/cumfs/cum-ls --info /tmp/pornos-test.cum
|
|
|
|
clean:
|
|
rm -rf build
|
|
|
|
install-chroot:
|
|
@echo "Run this inside a chroot of the target system"
|
|
@echo "make DESTDIR=/ install"
|
|
make DESTDIR=/ install
|