GNUmakefile.in 2.98 KB
Newer Older
Leigh B. Stoller's avatar
Leigh B. Stoller committed
1
2
#
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
Leigh B. Stoller's avatar
Leigh B. Stoller committed
4
5
6
7
8
9
10
11
12
13
# All rights reserved.
#

SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
SUBDIR		= collab/mailman

include $(OBJDIR)/Makeconf

14
SBIN_SCRIPTS		= addmmlist delmmlist setmmlistmembers mmsetup \
15
			  setmmpasswd mmlistmembership mmmodifymember \
16
17
			  addmmuser delmmuser \
			  addprojadminlist closeprojadminlist
18
19
LIBEXEC_SCRIPTS		= webaddmmlist webdelmmlist websetmmpasswd mmxlogin \
			  webmmlistmembership
Leigh B. Stoller's avatar
Leigh B. Stoller committed
20
21
22
23
CTRL_LIBEXEC_SCRIPTS	= genaliases
CTRL_LIB_FILES		= mmscript.py
CTRL_SBIN_SCRIPTS	= mailmanproxy

24
25
26
27
# These scripts installed setuid, with sudo. 
SETUID_BIN_SCRIPTS   = 
SETUID_SBIN_SCRIPTS  = addmmuser delmmuser addmmlist delmmlist \
			setmmlistmembers setmmpasswd mmlistmembership \
28
			mmmodifymember addprojadminlist closeprojadminlist
29
SETUID_SUEXEC_SCRIPTS  = mmxlogin
30

Leigh B. Stoller's avatar
Leigh B. Stoller committed
31
32
33
34
35
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
all:	$(SBIN_SCRIPTS) $(CTRL_SBIN_SCRIPTS) $(CTRL_LIBEXEC_SCRIPTS) \
36
	$(CTRL_LIB_FILES) $(LIBEXEC_SCRIPTS)
Leigh B. Stoller's avatar
Leigh B. Stoller committed
37
38
39
40

include $(TESTBED_SRCDIR)/GNUmakerules

install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
41
	 $(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS)) \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
42
43
44
45
46
47
48
	 $(addprefix $(INSTALL_DIR)/opsdir/libexec/mailman/, $(CTRL_LIBEXEC_SCRIPTS)) \
	 $(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(CTRL_SBIN_SCRIPTS)) \
	 $(addprefix $(INSTALL_DIR)/opsdir/lib/mailman/, $(CTRL_LIB_FILES))

boss-install: install

post-install: 
49
50
51
52
	chown root $(INSTALL_SBINDIR)/addmmuser
	chmod u+s $(INSTALL_SBINDIR)/addmmuser
	chown root $(INSTALL_SBINDIR)/delmmuser
	chmod u+s $(INSTALL_SBINDIR)/delmmuser
Leigh B. Stoller's avatar
Leigh B. Stoller committed
53
54
	chown root $(INSTALL_SBINDIR)/addmmlist
	chmod u+s $(INSTALL_SBINDIR)/addmmlist
55
56
	chown root $(INSTALL_SBINDIR)/delmmlist
	chmod u+s $(INSTALL_SBINDIR)/delmmlist
Leigh B. Stoller's avatar
Leigh B. Stoller committed
57
58
	chown root $(INSTALL_SBINDIR)/setmmlistmembers
	chmod u+s $(INSTALL_SBINDIR)/setmmlistmembers
59
60
	chown root $(INSTALL_SBINDIR)/setmmpasswd
	chmod u+s $(INSTALL_SBINDIR)/setmmpasswd
61
62
	chown root $(INSTALL_SBINDIR)/mmlistmembership
	chmod u+s $(INSTALL_SBINDIR)/mmlistmembership
63
64
	chown root $(INSTALL_LIBEXECDIR)/mmxlogin
	chmod u+s $(INSTALL_LIBEXECDIR)/mmxlogin
65
66
	chown root $(INSTALL_SBINDIR)/mmmodifymember
	chmod u+s $(INSTALL_SBINDIR)/mmmodifymember
67
68
	chown root $(INSTALL_SBINDIR)/mmmodifymember
	chmod u+s $(INSTALL_SBINDIR)/addprojadminlist
Leigh B. Stoller's avatar
Leigh B. Stoller committed
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95

#
# Control node installation (okay, plastic)
#
control-install:	\
	$(addprefix $(INSTALL_SBINDIR)/, $(CTRL_SBIN_SCRIPTS)) \
	$(addprefix $(INSTALL_LIBDIR)/mailman/, $(CTRL_LIB_FILES)) \
	$(addprefix $(INSTALL_LIBEXECDIR)/mailman/, $(CTRL_LIBEXEC_FILES))

clean:
	rm -f *.o core

$(INSTALL_DIR)/opsdir/sbin/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/sbin
	$(INSTALL) $< $@

$(INSTALL_DIR)/opsdir/lib/mailman/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/lib/mailman
	$(INSTALL_DATA) $< $@

$(INSTALL_DIR)/opsdir/libexec/mailman/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/libexec/mailman
	$(INSTALL) $< $@