2006-05-15 11:41:00 +02:00
|
|
|
#
|
|
|
|
# Makefile for the cryptobox web-interface
|
|
|
|
#
|
|
|
|
# Copyright (c) 02006 senselab
|
|
|
|
#
|
|
|
|
|
|
|
|
CRYPTOBOX_ROOT = .
|
|
|
|
|
|
|
|
PREFIX = /usr/local
|
|
|
|
SHARE_DIR = $(PREFIX)/share/cryptobox
|
|
|
|
LIB_DIR = $(PREFIX)/lib/cryptobox
|
|
|
|
DOC_DIR = $(PREFIX)/share/doc/cryptobox
|
|
|
|
BUILD_DIR = build_dir
|
|
|
|
INSTALL = install
|
|
|
|
|
2006-05-17 11:54:22 +02:00
|
|
|
OS_TYPE=$(shell uname -o | tr [:upper:] [:lower:] | sed s/[^a-z0-9\._\-]/_/g)
|
|
|
|
|
2006-05-15 11:41:00 +02:00
|
|
|
.PHONY: install clean build
|
|
|
|
|
|
|
|
build:
|
|
|
|
$(INSTALL) -d -m 755 $(BUILD_DIR)/etc
|
2006-11-10 10:05:54 +01:00
|
|
|
$(INSTALL) -c -m 644 bin/cryptobox.conf $(BUILD_DIR)/etc/
|
2006-05-15 11:41:00 +02:00
|
|
|
@sed -i 's#^HTML_TEMPLATE_DIR=.*$$#HTML_TEMPLATE_DIR=$(SHARE_DIR)/templates#' $(BUILD_DIR)/etc/cryptobox.conf
|
|
|
|
@sed -i 's#^LANGUAGE_DIR=.*$$#LANGUAGE_DIR=$(SHARE_DIR)/lang#' $(BUILD_DIR)/etc/cryptobox.conf
|
|
|
|
@sed -i 's#^DOC_DIR=.*$$#DOC_DIR=$(DOC_DIR)/html#' $(BUILD_DIR)/etc/cryptobox.conf
|
|
|
|
@sed -i 's#^CONFIG_DEFAULTS_DIR=.*$$#CONFIG_DEFAULTS_DIR=$(SHARE_DIR)/defaults#' $(BUILD_DIR)/etc/cryptobox.conf
|
|
|
|
|
|
|
|
@touch $(BUILD_DIR)-stamp
|
|
|
|
|
|
|
|
|
|
|
|
install: $(BUILD_DIR)-stamp
|
|
|
|
$(INSTALL) -d -m 755 $(LIB_DIR)
|
2006-11-10 10:05:54 +01:00
|
|
|
$(INSTALL) -c -m 755 bin/*.py $(LIB_DIR)/
|
2006-05-15 11:41:00 +02:00
|
|
|
$(INSTALL) -d -m 755 $(SHARE_DIR)/lang
|
|
|
|
$(INSTALL) -c -m 644 lang/* $(SHARE_DIR)/lang/
|
|
|
|
$(INSTALL) -d -m 755 $(SHARE_DIR)/templates
|
|
|
|
$(INSTALL) -c -m 644 templates/*.cs $(SHARE_DIR)/templates
|
|
|
|
$(INSTALL) -d -m 755 $(SHARE_DIR)/html
|
|
|
|
$(INSTALL) -c -m 644 www-data/*.css $(SHARE_DIR)/html/
|
|
|
|
$(INSTALL) -c -m 644 www-data/*.png $(SHARE_DIR)/html/
|
|
|
|
$(INSTALL) -c -m 644 www-data/*.gif $(SHARE_DIR)/html/
|
2006-11-10 10:05:54 +01:00
|
|
|
$(INSTALL) -d -m 755 $(SHARE_DIR)/html/screenshots
|
|
|
|
$(INSTALL) -c -m 644 www-data/screenshots/*.png $(SHARE_DIR)/html/screenshots/
|
2006-05-15 11:41:00 +02:00
|
|
|
$(INSTALL) -d -m 755 $(DOC_DIR)/html/en
|
|
|
|
$(INSTALL) -d -m 755 $(DOC_DIR)/html/de
|
|
|
|
$(INSTALL) -c -m 644 doc/html/en/* $(DOC_DIR)/html/en/
|
|
|
|
$(INSTALL) -c -m 644 doc/html/de/* $(DOC_DIR)/html/de/
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2006-11-10 10:05:54 +01:00
|
|
|
#$(MAKE) -C bin clean
|
2006-05-15 11:41:00 +02:00
|
|
|
-rm -rf $(BUILD_DIR)
|
|
|
|
-rm -f $(BUILD_DIR)-stamp
|
|
|
|
|