rate-engine-0.5.4-astcfg.diff 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- rate-engine-0.5.4/Makefile.orig 2005-02-21 04:42:24.046680160 +0100
  2. +++ rate-engine-0.5.4/Makefile 2005-02-21 04:47:38.049944408 +0100
  3. @@ -10,7 +10,7 @@
  4. DEBUG+= -g -fno-inline-functions
  5. -CFLAGS+= -O3 -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow \
  6. +CFLAGS+= -fPIC -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow \
  7. $(DEBUG) -D_REENTRANT -I/usr/include/pcre
  8. LDFLAGS+= $(DEBUG)
  9. LDLIBS+= -lpthread
  10. @@ -26,9 +26,9 @@
  11. OBJS:= $(SRCS:%.c=%.o)
  12. MOD= rate_engine.so
  13. -ASTLIBDIR= /usr/lib/asterisk/modules
  14. -ASTCONFDIR= /etc/asterisk
  15. -BINDIR= /usr/bin
  16. +ASTLIBDIR= $(shell /usr/bin/asterisk-config --modulesdir)
  17. +ASTCONFDIR= $(shell /usr/bin/asterisk-config --sysconfdir)
  18. +BINDIR= $(shell /usr/bin/asterisk-config --bindir)
  19. .PHONY: all
  20. @@ -50,12 +50,14 @@
  21. .PHONY: install
  22. install: all
  23. - install -m 755 $(MOD) $(ASTLIBDIR)
  24. + if [ ! -d $(DESTDIR)$(ASTLIBDIR) ]; then mkdir -p $(DESTDIR)$(ASTLIBDIR); fi
  25. + install -m 755 $(MOD) $(DESTDIR)$(ASTLIBDIR)
  26. .PHONY: samples
  27. samples:
  28. - install -m 644 rate_engine.conf.sample $(ASTCONFDIR)/rate_engine.conf
  29. + if [ ! -d $(DESTDIR)$(ASTCONFDIR) ]; then mkdir -p $(DESTDIR)$(ASTCONFDIR); fi
  30. + install -m 644 rate_engine.conf.sample $(DESTDIR)$(ASTCONFDIR)/rate_engine.conf
  31. ifneq ($(wildcard .depend),)
  32. include .depend