GNUmakefile.in 3.38 KB
Newer Older
1
#
2
# Copyright (c) 2008-2014 University of Utah and the Flux Group.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# 
# {{{GENIPUBLIC-LICENSE
# 
# GENI Public License
# 
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Work, and to permit persons to whom the Work
# is furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Work.
# 
# THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
# IN THE WORK.
# 
# }}}
28 29 30 31 32 33
#

SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
SUBDIR		= protogeni/scripts
34
ISCLEARINGHOUSE = @PROTOGENI_ISCLEARINGHOUSE@
35
PGENISUPPORT    = @PROTOGENI_SUPPORT@
36 37 38

include $(OBJDIR)/Makeconf

39 40
SBIN_STUFF	= cleanupslice gencabundle cleanupticket aptssh-setup

Leigh B. Stoller's avatar
Leigh B. Stoller committed
41
PSBIN_STUFF	= register_resources expire_daemon gencrl postcrl \
42
		  addauthority getcacerts \
43
		  gencrlbundle shutdownslice remauthority listusage \
44
		  update reregister listhistory \
45
		  register_sliver sa_daemon genadmincredential \
46
		  getchcredential genallow_extcred advt-merge.py \
47
		  reservevlans delgeniuser delegatecredential \
48
		  updatecert fixcerts initcerts cacontrol webcacontrol \
49
		  genextendcred rspeclint chstats listactive \
50
		  maptoslice webmaptoslice setexpiration quickvm webquickvm
51

52
ifeq ($(ISCLEARINGHOUSE),1)
53
PSBIN_STUFF     += ch_daemon
54 55
endif

56 57
# These scripts installed setuid, with sudo. 
SETUID_BIN_SCRIPTS   = 
58
SETUID_SBIN_SCRIPTS  = cleanupslice gencabundle cleanupticket aptssh-setup
59 60 61 62 63 64
SETUID_LIBX_SCRIPTS  =

#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
65
all:	$(SBIN_STUFF) $(PSBIN_STUFF) \
66 67
	initsite resolve resolvenode resolve-ch getversion genspeaksfor \
	shellinabox.pl
68 69 70

include $(TESTBED_SRCDIR)/GNUmakerules

71 72
install: apt-install \
        $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_STUFF)) \
73
	$(addprefix $(INSTALL_SBINDIR)/protogeni/, $(PSBIN_STUFF)) \
74
	$(INSTALL_LIBEXECDIR)/webquickvm \
75 76
	$(INSTALL_LIBEXECDIR)/webcacontrol \
	$(INSTALL_LIBEXECDIR)/webmaptoslice
77
	-rm -f $(INSTALL_SBINDIR)/protogeni/cleanupticket
78

79
ifeq ($(PGENISUPPORT),1)
80 81
apt-install: $(addprefix $(INSTALL_DIR)/opsdir/cgi-bin/, shellinabox.pl) \
	     $(addprefix $(INSTALL_SBINDIR)/, aptssh-setup)
82 83 84
else
apt-install:
endif
85

86 87 88
control-install:

clean:
Leigh B. Stoller's avatar
Leigh B. Stoller committed
89 90 91 92 93 94
	rm -f *.o core *.pl *.pm *.py $(SBIN_STUFF) $(PSBIN_STUFF)

$(INSTALL_SBINDIR)/protogeni/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_SBINDIR)/protogeni
	$(INSTALL) $< $@
95

96 97 98 99 100 101 102 103
$(INSTALL_DIR)/opsdir/cgi-bin/shellinabox.pl: shellinabox.pl
	echo "Installing (link to wrapper) $<"
	mkdir -p $(INSTALL_DIR)/opsdir/cgi-bin
	-rm -f $@
	ln -s $(INSTALL_LIBEXECDIR)/runsuid $@
	echo "Installing (real script) $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/suidbin
	$(SUDO) $(INSTALL_PROGRAM) $< $(INSTALL_DIR)/opsdir/suidbin/$<