41 lines
1.5 KiB
Makefile
41 lines
1.5 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
|
||
|
trytond.conf = $(CHROOT)/etc/trytond/trytond.conf
|
||
|
trytond.service = $(CHROOT)/lib/systemd/system/trytond.service
|
||
|
|
||
|
systemd-units: appliance/cert-renew.service appliance/cert-renew.timer
|
||
|
cp appliance/cert-renew.service appliance/cert-renew.timer $(CHROOT)/etc/systemd/system/
|
||
|
|
||
|
$(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
|
||
|
|
||
|
$(trytond.conf):
|
||
|
mkdir -p $(CHROOT)/etc/trytond
|
||
|
echo "[database]" > $(CHROOT)/etc/trytond/trytond.conf
|
||
|
echo "uri = postgresql://trytond:trytond@/" >> $(CHROOT)/etc/trytond/trytond.conf
|
||
|
echo "" >> $(CHROOT)/etc/trytond/trytond.conf
|
||
|
echo "[web]" >> $(CHROOT)/etc/trytond/trytond.conf
|
||
|
echo "root=/usr/share/sao" >> $(CHROOT)/etc/trytond/trytond.conf
|
||
|
|
||
|
$(trytond.service): trytond/trytond.service
|
||
|
cp $< $@
|
||
|
|
||
|
preinstall:
|
||
|
|
||
|
postinstall: systemd-units $(02firstboot) $(cert-renew.sh) $(nginx_conf) $(trytond.conf) $(trytond.service)
|
||
|
# 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
|