
## installing statically compiled s u l a
## this Makefile works on linux. See ../INSTALL for info on compiling.
##
##     info: http://www.geocities.com/SiliconValley/Peaks/8771
##		fotang@techie.com
##	24 Mar 1998

BINMODE = u=rwx,go=rx

## where to install the program:
BIN_DIR = /usr/local/X11/bin
## where to install the sulahp (external program for sula):
BIN_DIR2= /usr/local/bin
## for sulahp
MAN_DIR= /usr/local/man

## where to install help files and a few other things.
## the program doesnt use this value. instead it will look
## for an entry in an X resource file (e.g.
## ~/.Xdefaults, ~/.Xdefaults-hostname)
## sula.Directory.Libraries:
## See sula.app-defaults for examples. 
LIB_DIR = /usr/local/lib/sula

## where to install the system-wide resource file
## the program doesnt use this value. it will only look
## in the files and directories suggested by X11, e.g.
## ~/.Xdefaults, /usr/lib/X11/app-defaults etc.
RESOURCE_DIR =  /usr/lib/X11/app-defaults

# -- stop here -- stop here --
## private stuff.. ~/P_HOME
P_HOME=.sula

BIN = sula
FBIN = sula.bin
AUXBIN =sulahp
install:
	-@printf "\n\nStarting installation..\n\n"
	-@test -d ~/$(BIN_DIR)  || mkdir -p ~/$(BIN_DIR)
	-@if test -f $(BIN_DIR)/$(BIN); then \
		cp -f $(BIN_DIR)/$(BIN) $(BIN_DIR)/$(BIN).old; \
	fi
	@cp -f $(FBIN) $(BIN_DIR)/$(BIN) && chmod -v $(BINMODE) $(BIN_DIR)/$(BIN)
	-@echo
	-@printf "\nCopying configuration and help files..\n"
	-@echo Use X resource files \(\~/.Xdefaults etc\) to customarize your client
	-@printf "See sula.app-defaults for entries.\n\n"
	-@cp -dpRf sula/* $(LIB_DIR)
	-@cp -f sula.app-defaults $(RESOURCE_DIR)/Sula
	-@printf "\n\n\"%s\" installed.\n\n" $(BIN)

	-@echo Copying $(AUXBIN) and $(AUXBIN).1
	-@test -d ~/$(BIN_DIR2)  || mkdir -p ~/$(BIN_DIR2)
	-cp -vf $(AUXBIN) $(BIN_DIR2) && chmod -v $(BINMODE) $(BIN_DIR2)/$(AUXBIN)
	-cp -vf $(AUXBIN).1 $(MAN_DIR)/man1

#install_home:
	-@printf "\nCopying files to \"%s\"\n" ~/$(P_HOME)
	-@test -d ~/$(P_HOME)  || mkdir -p ~/$(P_HOME)
	-@cp -dvRi conf/* ~/$(P_HOME)

