source: trunk/Makefile.in @ 325

Last change on this file since 325 was 325, checked in by bas, 13 years ago

configure, Makefile.in, configure.in:

  • added environment variable INSTALL_USER. if set use this user to chown:
    • email2trac.conf
    • run_email2trac ( is not needed when we it is not equal 'root' see #182
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1# Authors: Bas van der Vlies & Michel Jouvin
2# Date   : 13 Jan 2005
3# Desc.  : Simple Makefile
4#
5# SVN INFO:
6#      $Id: Makefile.in 325 2010-03-01 11:31:55Z bas $
7#
8#
9prefix=@prefix@
10EXEC_PREFIX=@exec_prefix@/bin
11PYTHON_BIN=@PYTHON@
12CONFIG=@sysconfdir@
13
14# User names
15#
16TRAC_USER=@trac_user@
17MTA_USER=@mta_user@
18INSTALL_USER=@INSTALL_USER@
19DEBUG=@DEBUG@
20
21TRAC_SCRIPT_NAME=email2trac
22
23CC=@CC@
24INSTALL=./install-sh
25CFLAGS=-DMTA_USER=\"$(MTA_USER)\" -DTRAC_USER=\"$(TRAC_USER)\" -DTRAC_SCRIPT_NAME=\"$(TRAC_SCRIPT_NAME)\" -DTRAC_SCRIPT_PATH=\"$(EXEC_PREFIX)\" -DDEBUG=$(DEBUG)
26
27PYTHON_FILES=delete_spam.py email2trac.py
28WRAPPER_SRC=run_email2trac.c run_email2trac.h
29
30all: run_email2trac
31
32run_email2trac: $(WRAPPER_SRC) Makefile
33        $(CC) $(CFLAGS) -o $@ run_email2trac.c
34
35install: all install-conf
36        $(INSTALL) -d $(DESTDIR)$(EXEC_PREFIX)
37        $(INSTALL) -m 4111 -o root run_email2trac $(DESTDIR)$(EXEC_PREFIX)
38        for script in $(PYTHON_FILES) ; \
39        do \
40          name=`basename $$script '.py'` ;\
41          $(INSTALL) -m 755 -o $(INSTALL_USER) $$script  $(DESTDIR)$(EXEC_PREFIX)/$$name ;\
42        done
43
44install-conf:
45        if [ ! -f  $(DESTDIR)/$(CONFIG)/email2trac.conf ] ; \
46        then \
47                $(INSTALL) -c -m 644 -o $(INSTALL_USER) email2trac.conf $(DESTDIR)/$(CONFIG)/email2trac.conf ;\
48        fi
49 
50clean:
51        rm run_email2trac
52
53distclean:
54        rm run_email2trac email2trac.py delete_spam.py config.log config.status Makefile
Note: See TracBrowser for help on using the repository browser.