source: emailtotracscript/0.9/Makefile @ 8

Last change on this file since 8 was 8, checked in by bas, 17 years ago

EmailtoTracScript?:

Makefile:

  • Use gcc and use default values for all settings
File size: 992 bytes
Line 
1# email2trac Makefile
2#
3# defaullt values are:
4#
5# MTA_USER "nobody"
6# TRAC_USER "www-data"
7# TRAC_SCRIPT_NAME "email2trac.py"
8# INSTALL_DIR "/usr/bin"
9#
10#MTA_USER=daemon
11#TRAC_USER=apache
12#TRAC_SCRIPT_NAME=email2trac.py
13#INSTALL_DIR=/www/Web/servers/trac/site-config/scripts
14#PYTHON_BIN=/usr/local/Python/pro/bin/python
15
16CC=gcc
17DEBUG=0
18CFLAGS=-DMTA_USER=\"$(MTA_USER)\" -DTRAC_USER=\"$(TRAC_USER)\" -DTRAC_SCRIPT_NAME=\"$(TRAC_SCRIPT_NAME)\" -DTRAC_SCRIPT_PATH=\"$(INSTALL_DIR)\" -DDEBUG=$(DEBUG)
19
20PYTHON_FILES=delete_spam.py email2trac.py
21WRAPPER_SRC=run_email2trac.c run_email2trac.h
22
23all: run_email2trac
24
25run_email2trac: $(WRAPPER_SRC)
26        $(CC) $(CFLAGS) -o $@ run_email2trac.c
27
28install: all
29        cp run_email2trac $(INSTALL_DIR)
30        chmod u+s $(INSTALL_DIR)/run_email2trac
31        chown root $(INSTALL_DIR)/run_email2trac
32        for script in $(PYTHON_FILES) ; \
33        do \
34          sed -e "s%^\#\!/usr/bin/python%\#\!$(PYTHON_BIN)%" $$script > $(INSTALL_DIR)/$$script ; \
35          chmod a+x $(INSTALL_DIR)/$$script ; \
36        done
Note: See TracBrowser for help on using the repository browser.