GNUmakefile.in 2.01 KB
Newer Older
1 2
#
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
4 5 6 7 8 9 10 11 12 13 14
# All rights reserved.
#

SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= bugdb

include $(OBJDIR)/Makeconf

SBIN_SCRIPTS		= addbugdbproj addbugdbuser setbugdbgroups \
15
			  bugdbsetup 
16
LIBEXEC_SCRIPTS		= bugdbxlogin
17

18
CTRL_SBIN_SCRIPTS	= bugdbproxy bugdbgateway exporttickets
19

20 21 22 23 24
# These scripts installed setuid, with sudo. 
SETUID_BIN_SCRIPTS   = 
SETUID_SBIN_SCRIPTS  = addbugdbproj addbugdbuser setbugdbgroups 
SETUID_LIBX_SCRIPTS  = bugdbxlogin

25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
#
# 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) $(LIBEXEC_SCRIPTS)

include $(TESTBED_SRCDIR)/GNUmakerules

install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
	 $(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS)) \
	 $(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(CTRL_SBIN_SCRIPTS))

boss-install: install

post-install: 
	chown root $(INSTALL_SBINDIR)/addbugdbproj
	chmod u+s $(INSTALL_SBINDIR)/addbugdbproj
	chown root $(INSTALL_SBINDIR)/addbugdbuser
	chmod u+s $(INSTALL_SBINDIR)/addbugdbuser
	chown root $(INSTALL_SBINDIR)/setbugdbgroups
	chmod u+s $(INSTALL_SBINDIR)/setbugdbgroups
46 47
	chown root $(INSTALL_LIBEXECDIR)/bugdbxlogin
	chmod u+s $(INSTALL_LIBEXECDIR)/bugdbxlogin
48 49
	chown nobody $(INSTALL_DIR)/opsdir/sbin/bugdbgateway
	chmod u+s $(INSTALL_DIR)/opsdir/sbin/bugdbgateway
50 51 52 53 54 55 56 57 58

#
# Control node installation (okay, plastic)
#
control-install:	$(addprefix $(INSTALL_SBINDIR)/, $(CTRL_SBIN_SCRIPTS))

clean:
	rm -f *.o core

59 60
$(INSTALL_DIR)/opsdir/sbin/bugdbgateway: bugdbgateway
	echo "Installing (setuid) $<"
61
	-mkdir -p $(INSTALL_DIR)/opsdir/sbin
62
	$(SUDO) $(INSTALL) -o nobody -m 4755 $< $@
63 64 65 66 67

$(INSTALL_DIR)/opsdir/sbin/bugdbproxy: bugdbproxy
	echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/sbin
	$(INSTALL_PROGRAM) $< $@
68 69 70 71 72

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