--- a/Makefile Fri Mar 13 10:44:57 2009 +0100
+++ b/Makefile Fri Mar 13 11:33:39 2009 +0100
@@ -2,8 +2,10 @@
prefix = /usr/local
sbindir = ${prefix}/sbin
man8dir = ${prefix}/share/man/man8
+initdir = /etc/init.d
+defaultdir = /etc/default
-all: tele-watch tele-watch.8.gz
+all: tele-watch tele-watch.8.gz init.d
install: all
install -m 0755 -d ${DESTDIR}${sbindir}
install -m 0755 tele-watch ${DESTDIR}${sbindir}/
@@ -11,9 +13,17 @@
install -m 0755 -d ${DESTDIR}${man8dir}
install -m 0644 tele-watch.8.gz ${DESTDIR}${man8dir}
+ #test -f ${DESTDIR}${initdir}/tele-watcher \
+ #|| install -m 0755 init.d ${DESTDIR}${initdir}/tele-watcher
+ #test -f ${DESTDIR}${defaultdir}/tele-watcher \
+ #|| install -m 0644 default ${DESTDIR}${defaultdir}/tele-watcher
+
clean:
-rm -f tele-watch.8.gz tele-watch
+%: %.in
+ perl -pe 's{__sbindir__}{${sbindir}}g' <$< >$@
+
%: %.pl
perl -c $<
cp -f $< $@