CC = @CC@
CFLAGS = @CFLAGS@
prefix = @prefix@
exec_prefix = @exec_prefix@
libexecdir = @libexecdir@
sysconfdir = @sysconfdir@
sbindir = @sbindir@
APACHEDIR = /etc/httpd
SYSCATPATH = /usr/local/bin
trusteddir = /usr/libexec/scripts-trusted

all-local: static-cat

static-cat.c: static-cat.c.pre
	syscat_path=$(SYSCATPATH)/static-cat perl upd-execsys

install: all-local
	install -D -p -m644 execsys.conf $(DESTDIR)$(APACHEDIR)/conf.d/execsys.conf
	install -D -p -m755 execsys-binfmt $(DESTDIR)/etc/init.d/execsys-binfmt
	install -D -p -m755 static-cat $(DESTDIR)$(SYSCATPATH)/static-cat
	install -D -p -m755 ldapize.pl $(DESTDIR)$(sbindir)/ldapize.pl

	install -D -p -m755 svnproxy.pl $(DESTDIR)$(sbindir)/svnproxy.pl
	install -D -p -m755 svn $(DESTDIR)$(trusteddir)/svn
	install -D -p -m644 scripts-svn.xinetd $(DESTDIR)/etc/xinetd.d/scripts-svn

	install -D -p -m755 gitproxy.pl $(DESTDIR)$(sbindir)/gitproxy.pl
	install -D -p -m755 git $(DESTDIR)$(trusteddir)/git
	install -D -p -m644 scripts-git.xinetd $(DESTDIR)/etc/xinetd.d/scripts-git

clean:
	rm -f static-cat

distclean: clean
	rm -f configure config.* Makefile
	rm -rf auto*.cache
