DEST=@prefix@
prefix=@prefix@
EXEC=@exec_prefix@
INCLUDE=@LIB_ROOT@
CGIPATH=@cgipath@
USER=@bsuser@
WEBROOT=@webroot@
SCRINSTALL=./install.sh
INSTALL=@INSTALL@
PERLEXT=@perlext@
PERL=@perl@
SPEEDY=@speedypath@
CHKCONFIG=@chkconfig@

UXMON_DIR=@UXMON_DIR@
BIN_DIR=@BIN_DIR@
VAR_DIR=@VAR_DIR@
ETC_DIR=@ETC_DIR@
ADM_DIR=@ADM_DIR@
WEB_DIR=@WEB_DIR@
CGI_DIR=@CGI_DIR@
DOC_DIR=@DOC_DIR@
USER_SBIN_DIR=@USER_SBIN_DIR@
USER_BIN_DIR=@USER_BIN_DIR@
RUN_DIR=@RUN_DIR@
INIT_DIR=@INIT_DIR@
RPM_DIRECTORY=@RPM_DIRECTORY@
CRON_DIR=@crondir@
MAN_DIR=@MAN_DIR@
HELP_DIR=@HELP_DIR@

SYSTEM_TYPE=@systemtype@

DESTDIR=

all:
	@echo "use 'make install' to install"

install: install-server install-client install-win32 install-reporting install-modules install-doc

install-agent: install-client

bin: check modules
	#
	# copy all files subject to be modified to scratch dir
	rm -rf scratch
	find . -name '*.pl' -print > tmp2
	echo "tools/bs_boot.sh" >> tmp2
	mkdir -p scratch
	tar -cf - `cat tmp2` | (cd scratch; tar -xf -)
	cp common.pm perlpath scratch
	#
	perl -pi -e "s|bsuser.*=.*#bsuser|bsuser = \"${USER}\";    #bsuser|" scratch/tools/bb_start.pl
	perl -pi -e "s|^bs_instdir=.*|bs_instdir=${EXEC}|" \
		scratch/tools/bs_boot.sh
	perl -pi -e "s|$bs_instdir=\".*\"|$bs_instdir=\"${EXEC}\"|" \
		scratch/common.pm
	cd scratch; \
	perl -pi -e 's|^use lib.*#inslib|use lib "\$$ENV{BIGSISTER_CHROOT}${INCLUDE}/bin"; use lib "\$$ENV{BIGSISTER_CHROOT}${INCLUDE}/uxmon"; #inslib|' \
		`cat ../tmp2`
	cd scratch; perl -pi -e "s|^#!.*perl.*|#!${PERL}|" \
	    `cat ../tmp2`
	perl -pi -e "s|^#!.*|#!${SPEEDY}|" \
	    scratch/bshistory.pl scratch/bswebalarm.pl scratch/bswebadmin.pl scratch/tools/bsgraph.pl
					 
	rm -f tmp tmp2
	echo "${CGIPATH}/bshistory${PERLEXT}\\" > skins/default/HISTORY_PATH.inc
	echo "${CGIPATH}/bswebalarm${PERLEXT}\\" > skins/default/ALARM_PATH.inc
	echo "${CGIPATH}/bswebadmin${PERLEXT}\\" > skins/default/ADMIN_PATH.inc
	echo "${CGIPATH}/bsgraph${PERLEXT}\\" > skins/default/GRAPH_PATH.inc
	echo "${WEBROOT}\\" > skins/default/WEBROOT.inc
	#perl -pi -e "s|^#!.*|#!${PERL} -I${INCLUDE}/bin -I${INCLUDE}/uxmon|" `cat ../tmp2`
	./install_links . symbolic_links


install-common: bin
	[ -d ${DESTDIR}${DEST} ] || ./install.sh ${USER} 755 -d ${DESTDIR}${DEST}
	./install.sh ${USER} 755 -d ${DESTDIR}${ADM_DIR}
	./install.sh ${USER} 755 -d ${DESTDIR}${VAR_DIR}
	./install.sh ${USER} 555 -d ${DESTDIR}${ETC_DIR}
	./install.sh ${USER} 555 -d ${DESTDIR}${CGI_DIR}
	./install.sh ${USER} 555 -d ${DESTDIR}${DOC_DIR}
	[ -d ${DESTDIR}${USER_BIN_DIR} ] || ./install.sh root 755 -d ${DESTDIR}${USER_BIN_DIR}
	[ -d ${DESTDIR}${USER_SBIN_DIR} ] || ./install.sh root 755 -d ${DESTDIR}${USER_SBIN_DIR}
	./install.sh ${USER} 555 -d ${DESTDIR}${ETC_DIR}/graphdef
	./install.sh ${USER} 555 -d ${DESTDIR}${ETC_DIR}/testdef
	./install.sh ${USER} 555 -d ${DESTDIR}${ETC_DIR}/mondef
	./install.sh ${USER} 555 -d ${DESTDIR}${ETC_DIR}/moduleinfo
	./install.sh ${USER} 555 -d ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 -d ${DESTDIR}${BIN_DIR}/BigSister
	if [ -d ${DESTDIR}${UXMON_DIR}/Monitor ] && [ ! -d ${DESTDIR}${BIN_DIR}/Monitor ]; then mv ${DESTDIR}${UXMON_DIR}/Monitor ${DESTDIR}${BIN_DIR}; else true; fi
	if [ -f ${DESTDIR}${ADM_DIR}/agent.log -a ! -f ${DESTDIR}${VAR_DIR}/agent.log ]; then mv ${DESTDIR}${ADM_DIR}/agent.log ${DESTDIR}${VAR_DIR}; else true; fi
	if [ -f ${DESTDIR}${ADM_DIR}/bb_event_generator.state -a ! -f ${DESTDIR}${VAR_DIR}/bb_event_generator.state ]; then mv ${DESTDIR}${ADM_DIR}/bb_event_generator.state ${DESTDIR}${VAR_DIR}; else true; fi
	if [ -f ${DESTDIR}${WEB_DIR}/grouping -a ! -f ${DESTDIR}${VAR_DIR}/grouping ]; then mv ${DESTDIR}${WEB_DIR}/grouping ${DESTDIR}${VAR_DIR}; else true; fi
	if [ -f ${DESTDIR}${WEB_DIR}/logs/history/display.history -a ! -f ${DESTDIR}${VAR_DIR}/display.history ]; then mv ${DESTDIR}${WEB_DIR}/logs/history/display.history* ${DESTDIR}${VAR_DIR}; else true; fi
	if [ -f ${DESTDIR}${WEB_DIR}/logs/history/status.log -a ! -f ${DESTDIR}${VAR_DIR}/status.log ]; then mv ${DESTDIR}${WEB_DIR}/logs/history/status.log* ${DESTDIR}${VAR_DIR}; else true; fi
	./install.sh ${USER} 555 tools/bb_start.pl ${DESTDIR}${BIN_DIR}/bb_start
	if [ "${INIT_DIR}" != "" -a ! -d "${DESTDIR}${INIT_DIR}" ]; then ./install.sh root 555 -d ${DESTDIR}${INIT_DIR}; else true; fi
	if [ "${INIT_DIR}" != "" ]; then ./install.sh ${USER} 555 tools/bs_boot.sh ${DESTDIR}${INIT_DIR}/bigsister; else true; fi
	if [ "${INIT_DIR}" != "" ] && [ "${CHKCONFIG}" != "" ]; then ${CHKCONFIG} --add bigsister ; else true; fi
	./install.sh ${USER} 555 bb_start32.pl ${DESTDIR}${BIN_DIR}/bb_start32
	./install.sh ${USER} 555 bb_stop32.pl ${DESTDIR}${BIN_DIR}/bb_stop32
	./install.sh ${USER} 555 platforms/Platforms.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 platforms/BS_win32.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 platforms/BS_unix.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 common.pm ${DESTDIR}${BIN_DIR}/BigSister
	if test -f ${DESTDIR}${BIN_DIR}/common.pm; then rm -f ${DESTDIR}${BIN_DIR}/common.pm; fi
	./install.sh ${USER} 555 snmp.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 RotatingLog.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 Schedule.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/parse.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/cfgfile.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/Tar.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/MicroTime.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/HTTPDownload.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/CheckSig.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/CWorker.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/bsadmin.pl ${DESTDIR}${USER_SBIN_DIR}/bsadmin
	./install.sh ${USER} 555 tools/module.pl ${DESTDIR}${USER_SBIN_DIR}/bsmodule
	./install.sh ${USER} 555 tools/bbecho.pl ${DESTDIR}${BIN_DIR}/bbecho
	./install.sh ${USER} 644 etc/etc_resources ${DESTDIR}${ETC_DIR}/resources
	./install.sh ${USER} 444 etc/keys ${DESTDIR}${ETC_DIR}/keys
	echo "*.fs_uxmon=@EX_UXMON_DIR@" ${DESTDIR}${ETC_DIR}/resources
	echo "*.fs_bin=@EX_BIN_DIR@" >> ${DESTDIR}${ETC_DIR}/resources
	echo "*.fs_var=@EX_VAR_DIR@" >> ${DESTDIR}${ETC_DIR}/resources
	echo "*.fs_etc=@EX_ETC_DIR@" >> ${DESTDIR}${ETC_DIR}/resources
	echo "*.fs_adm=@EX_ADM_DIR@" >> ${DESTDIR}${ETC_DIR}/resources
	echo "*.fs_web=@EX_WEB_DIR@" >> ${DESTDIR}${ETC_DIR}/resources
	echo "*.fs_run=@EX_RUN_DIR@" >> ${DESTDIR}${ETC_DIR}/resources
	./install.sh ${USER} 555 -d ${DESTDIR}${BIN_DIR}/Monitor
	./install.sh ${USER} 555 uxmon/Monitor/Monitor.pm ${DESTDIR}${BIN_DIR}/Monitor
	./install.sh ${USER} 555 uxmon/Monitor/bb.pm ${DESTDIR}${BIN_DIR}/Monitor
	[ -f ${DESTDIR}${ADM_DIR}/resources ] || ./install.sh ${USER} 644 etc/adm_resources ${DESTDIR}${ADM_DIR}/resources

install-server: install-server-bin install-skins install-bsmon

install-server-bin: bin install-common
	# remove cached graph indexes - they will be re-generated on startup
	rm -f ${DESTDIR}${WEB_DIR}/graphs/*.html > /dev/null 2>&1 || true
	./install.sh ${USER} 755 -d ${DESTDIR}${WEB_DIR}
	./install.sh ${USER} 755 -d ${DESTDIR}${WEB_DIR}/logs
	./install.sh ${USER} 755 -d ${DESTDIR}${WEB_DIR}/html
	./install.sh ${USER} 755 -d ${DESTDIR}${WEB_DIR}/logs/history
	[ -f ${DESTDIR}${ADM_DIR}/permissions ] || ./install.sh ${USER} 644 permissions ${DESTDIR}${ADM_DIR}
	[ -f ${DESTDIR}${ADM_DIR}/bb-display.cfg ] || ./install.sh ${USER} 644 etc/bb-display.cfg ${DESTDIR}${ADM_DIR}
	[ -f ${DESTDIR}${ADM_DIR}/notify.cfg ] || ./install.sh ${USER} 644 deprecated/notify.cfg ${DESTDIR}${ADM_DIR}
	[ -f ${DESTDIR}${ADM_DIR}/bb_event_generator.cfg ] || ./install.sh ${USER} 644 bb_event_generator.cfg ${DESTDIR}${ADM_DIR}
	[ -f ${DESTDIR}${ADM_DIR}/httpd.conf ] || ./install.sh ${USER} 644 etc/httpd.conf ${DESTDIR}${ADM_DIR}
	./install.sh ${USER} 444 etc/graphtemplates ${DESTDIR}${ETC_DIR}
	./install.sh ${USER} 555 bbd.pl ${DESTDIR}${BIN_DIR}/bbd
	./install.sh ${USER} 555 bbdisp.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 access.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 display_map.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 deprecated/log_mail.pl ${DESTDIR}${BIN_DIR}/log_mail
	./install.sh ${USER} 555 tools/smtpmail.pl ${DESTDIR}${BIN_DIR}/smtpmail
	./install.sh ${USER} 555 deprecated/notify.pl ${DESTDIR}${BIN_DIR}/notify
	./install.sh ${USER} 555 bshistory.pl ${DESTDIR}${CGI_DIR}/bshistory${PERLEXT}
	./install.sh ${USER} 555 bswebalarm.pl ${DESTDIR}${CGI_DIR}/bswebalarm${PERLEXT}
	./install.sh ${USER} 555 bswebadmin.pl ${DESTDIR}${CGI_DIR}/bswebadmin${PERLEXT}
	./install.sh ${USER} 555 tools/bsgraph.pl ${DESTDIR}${CGI_DIR}/bsgraph${PERLEXT}
	./install.sh ${USER} 555 bscgi.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 compile_skin.pl ${DESTDIR}${BIN_DIR}/compile_skin
	./install.sh ${USER} 555 tools/page_meridian.pl ${DESTDIR}${BIN_DIR}/page_meridian

install-bsmon: install-common bin
	./install.sh ${USER} 555 bsmonitor/bsmon.pl ${DESTDIR}${BIN_DIR}/bsmon
	./install.sh ${USER} 444 bsmonitor/bsmon.cfg ${DESTDIR}${ETC_DIR}
	touch ${DESTDIR}${ADM_DIR}/bsmon_site.cfg
	./install.sh ${USER} 755 -d ${DESTDIR}${BIN_DIR}/Statusmon
	./install.sh ${USER} 555 bsmonitor/Statusmon/* ${DESTDIR}${BIN_DIR}/Statusmon
	test "${CRON_DIR}" = "" || [ -d ${DESTDIR}${CRON_DIR} ] || ./install.sh ${USER} 755 -d ${DESTDIR}${CRON_DIR}
	test "${CRON_DIR}" = "" || ./install.sh ${USER} 555 etc/cron.bigsister_logs ${DESTDIR}${CRON_DIR}/bigsister_logs


install-skins: install-common bin
	./install.sh ${USER} 755 -d ${DESTDIR}${WEB_DIR}
	./install.sh ${USER} 755 -d ${DESTDIR}${WEB_DIR}/skins
	BIGSISTER_CHROOT=${DESTDIR}; export BIGSISTER_CHROOT; \
	for d in skins/*; do \
	    echo installing $$d; \
	    ./install.sh ${USER} 755 -d ${DESTDIR}${WEB_DIR}/$$d; \
	    ./install.sh ${USER} 444 $$d/* ${DESTDIR}${WEB_DIR}/$$d; \
	    [ -d ${DESTDIR}${WEB_DIR}/$$d ] && perl -I. -I./platforms scratch/compile_skin.pl `basename $$d`; \
	done


install-client: bin install-common
	./install.sh ${USER} 755 -d ${DESTDIR}${UXMON_DIR}
	./install.sh ${USER} 755 -d ${DESTDIR}${UXMON_DIR}/Monitor
	./install.sh ${USER} 755 -d ${DESTDIR}${UXMON_DIR}/Requester
	./install.sh ${USER} 755 -d ${DESTDIR}${UXMON_DIR}/Config
	./install.sh ${USER} 555 bstrapd.pl ${DESTDIR}${BIN_DIR}/bstrapd
	./install.sh ${USER} 555 uxmon/uxmon.pl ${DESTDIR}${UXMON_DIR}/uxmon
	./install.sh ${USER} 555 uxmon/uxmon-rules-generic.pl ${DESTDIR}${UXMON_DIR}/uxmon-rules.pl
	uxmonnet=etc/uxmon-net; [ -f "etc/uxmon-net.${SYSTEM_TYPE}" ] && uxmonnet="etc/uxmon-net.${SYSTEM_TYPE}"; \
	[ -f ${DESTDIR}${ADM_DIR}/uxmon-net ] || ./install.sh ${USER} 444 $$uxmonnet ${DESTDIR}${ADM_DIR}/uxmon-net
	[ -f ${DESTDIR}${ETC_DIR}/mibs.txt ] || ./install.sh ${USER} 444 etc/mibs.txt ${DESTDIR}${ETC_DIR}
	[ -f ${DESTDIR}${ETC_DIR}/syslog ] || ./install.sh ${USER} 444 etc/syslog ${DESTDIR}${ETC_DIR}
	[ -f ${DESTDIR}${ETC_DIR}/OV ] || ./install.sh ${USER} 444 etc/OV ${DESTDIR}${ETC_DIR}
	[ -f ${DESTDIR}${ETC_DIR}/snmp_trap ] || ./install.sh ${USER} 444 etc/snmp_trap ${DESTDIR}${ETC_DIR}
	[ -f ${DESTDIR}${ETC_DIR}/eventlog ] || ./install.sh ${USER} 444 etc/eventlog ${DESTDIR}${ETC_DIR}
	./install.sh ${USER} 444 etc/perf ${DESTDIR}${ETC_DIR}
	./install.sh ${USER} 444 etc/perfslow ${DESTDIR}${ETC_DIR}
	./install.sh ${USER} 444 etc/tests.cfg ${DESTDIR}${ETC_DIR}
	./install.sh ${USER} 555 uxmon/Monitor/* ${DESTDIR}${BIN_DIR}/Monitor
	./install.sh ${USER} 444 uxmon/Config/* ${DESTDIR}${UXMON_DIR}/Config
	./install.sh ${USER} 555 uxmon/Requester/* ${DESTDIR}${UXMON_DIR}/Requester
	./install_links ${DESTDIR}${UXMON_DIR}/Config config_links
	./install.sh ${USER} 555 tools/TestWorker.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/CmdWorker.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 tools/testers.pl ${DESTDIR}${BIN_DIR}/testers
	@echo ""
	@echo "     You might also want to run 'make install-modules'"
	@echo ""

install-win32:
	./install.sh ${USER} 755 tools/install32.pl ${DESTDIR}${BIN_DIR}/install32
	
# GNU id exits nonzero on success.  sigh.
check:
	@test `id ${USER} 2>/dev/null | wc -l` = 1 || { \
	     echo "" >&2; \
	     echo "user ${USER} does not exist on this system" >&2; \
	     echo "please use 'make install USER=login if" >&2; \
	     echo "you'd like to run Big Sister as another user" >&2; \
	     echo "called login rather than ${USER}" >&2; \
	     echo "" >&2; \
	     exit 2; \
	}
	@[ -d ${DESTDIR}${WEB_DIR}/gifs ] && { \
	     echo "" >&2; \
	     echo "***************************" >&2; \
	     echo "You can remove ${DESTDIR}${WEB_DIR}/gifs and ${DESTDIR}${WEB_DIR}/template.proto" >&2; \
	     echo "manually if you want. They are no longer used by Big Sister" >&2; \
	     echo "since in release 0.29 'skins' have been introduced. Anyway I" >&2; \
	     echo "will not remove the files for myself ..." >&2; \
	     echo "" >&2; \
	     echo "The same applies to bin/www.pl and bin/cgi.pl ..." >&2; \
	     echo "***************************" >&2; \
	     echo "" >&2; \
	}; exit 0
	@echo "************************************"
	@echo "*                                  *"
	@echo "* BUILD with:                      *"
	@echo "*"
	@echo "* DEST=${DEST}"
	@echo "* EXEC=${EXEC}"
	@echo "* INCLUDE=${INCLUDE}"
	@echo "* CGIPATH=${CGIPATH}"
	@echo "* USER=${USER}"
	@echo "* WEBROOT=${WEBROOT}"
	@echo "* PERL=${PERL}"
	@echo "* PERLEXT=${PERLEXT}"
	@echo "*"
	@echo "*                                  *"
	@echo "************************************"
	@echo ""


install-reporting: bin install-common
	./install.sh ${USER} 755 -d ${DESTDIR}${ADM_DIR}/reporting
	./install.sh ${USER} 755 -d ${DESTDIR}${BIN_DIR}/Reader
	./install.sh ${USER} 555 reporting/StatusLog.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 reporting/ReportCommon.pm ${DESTDIR}${BIN_DIR}
	./install.sh ${USER} 555 reporting/report_day.pl ${DESTDIR}${BIN_DIR}/report_day
	./install.sh ${USER} 555 reporting/report_consolidate.pl ${DESTDIR}${BIN_DIR}/report_consolidate
	./install.sh ${USER} 555 reporting/report_read.pl ${DESTDIR}${BIN_DIR}/report_read
	for conf in reporting/conf/*; do \
	    file=`basename $$conf`; \
	    [ -f ${ADM_DIR}/reporting/$$file ] || ./install.sh ${USER} 555 $$conf ${DESTDIR}${ADM_DIR}/reporting; \
	done
	./install.sh ${USER} 555 reporting/Reader/* ${DESTDIR}${BIN_DIR}/Reader

make-modules:
	cd modules && for dir in *; do \
	    test "$$dir" = "CVS" && continue; \
	    [ -d "$$dir" ] || continue; \
	    tar cf "$$dir.mod" "$$dir"; \
	done

install-modules: make-modules install-common
	BIGSISTER_CHROOT=${DESTDIR}; export BIGSISTER_CHROOT; \
	${DESTDIR}${USER_SBIN_DIR}/bsmodule -n -s -q -f install `pwd`/modules/*.mod


install-doc:
	for file in [A-Z][A-Z]*; do \
	    test "${DOC_DIR}" != "" && \
	    ./install.sh ${USER} 444 $$file ${DESTDIR}${DOC_DIR}; \
	done
	if test "${HELP_DIR}" != ""; then \
	    test -d "${DESTDIR}${HELP_DIR}" || ./install.sh ${USER} 755 -d ${DESTDIR}${HELP_DIR}; \
	    for sub in docu/help/*; do \
	    	sub=`echo "$$sub" | sed 's#docu/help/##'`; \
		if test -d docu/help/$$sub; then \
		    ./install.sh ${USER} 755 -d ${DESTDIR}${HELP_DIR}/$$sub; \
		    ./install.sh ${USER} 444 docu/help/$$sub/* ${DESTDIR}${HELP_DIR}/$$sub; \
		else \
		    ./install.sh ${USER} 444 docu/help/$$sub ${DESTDIR}${HELP_DIR}/$$sub; \
		fi \
	    done \
	fi
	if test "${MAN_DIR}" != ""; then \
	    test -d "${DESTDIR}${MAN_DIR}" || ./install.sh ${USER} 755 -d ${DESTDIR}${MAN_DIR}; \
	    for sub in docu/man/*; do \
			sub=`echo "$$sub" | sed s#.*/##`; \
			test -d "${DESTDIR}${MAN_DIR}/$$sub" || ./install.sh ${USER} 755 -d ${DESTDIR}${MAN_DIR}/$$sub; \
			./install.sh ${USER} 444 docu/man/$$sub/* ${DESTDIR}${MAN_DIR}/$$sub; \
	    done; \
	fi
		    


#########################################################
#
#   RPM
#
#########################################################

rpm:	
	if test "$(RPM_DIRECTORY)" = ""; then \
	    echo "RPM build directory unknown"; \
	    false; \
	fi
	[ -L bigsister-@BIGSISTER_VERSION@ ] && rm -f bigsister-@BIGSISTER_VERSION@; true
	ln -s . bigsister-@BIGSISTER_VERSION@
	tar cjf $(RPM_DIRECTORY)/SOURCES/bigsister-@BIGSISTER_VERSION@.tar.bz2 bigsister-@BIGSISTER_VERSION@/. --exclude bigsister-@BIGSISTER_VERSION@/./scratch
	$(INSTALL) -o root -m 444 etc/bigsister.spec $(RPM_DIRECTORY)/SPECS
	rpm -ba $(RPM_DIRECTORY)/SPECS/bigsister.spec
