va-netbox/Makefile

32 lines
1.4 KiB
Makefile

02firstboot = $(CHROOT)/usr/local/bin/02firstboot.start
cert-renew.sh = $(CHROOT)/etc/ssl/cert-renew.sh
nginx_conf = $(CHROOT)/etc/nginx/nginx.conf.orig
systemd-units: appliance/PostgreSQL-Backup.sh appliance/backup.service appliance/backup.timer appliance/cert-renew.service appliance/cert-renew.timer appliance/override-systemd-networkd-wait-online.conf
mkdir -p $(CHROOT)/usr/local/bin
cp appliance/PostgreSQL-Backup.sh $(CHROOT)/usr/local/bin/
cp appliance/backup.service appliance/backup.timer appliance/cert-renew.service appliance/cert-renew.timer $(CHROOT)/etc/systemd/system/
mkdir -p $(CHROOT)/etc/systemd/system/systemd-networkd-wait-online.service.d
cp appliance/override-systemd-networkd-wait-online.conf $(CHROOT)/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf
$(02firstboot): appliance/02firstboot.start
mkdir -p $(CHROOT)/usr/local/bin
cp $< $@
touch $(CHROOT)/02firstboot
$(cert-renew.sh): appliance/cert-renew.sh
mkdir -p $(CHROOT)/etc/ssl
cp $< $@
$(nginx_conf): nginx/nginx.conf
mv $(CHROOT)/etc/nginx/nginx.conf $@
cp $< $(CHROOT)/etc/nginx/nginx.conf
preinstall:
postinstall: systemd-units $(02firstboot) $(cert-renew.sh) $(nginx_conf)
# configure postgresql
sed -i 's#^PG_INITDB_OPTS=.*#PG_INITDB_OPTS="--encoding=UTF8 --locale=de_DE.UTF-8"#' $(CHROOT)/etc/conf.d/postgresql-*
rm -rf $(CHROOT)/var/lib/postgresql/*
RUN emerge --config dev-db/postgresql