diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2007-04-13 08:06:06 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2007-04-13 08:06:06 +0000 |
commit | acc33b14df77f1bad1c2d0a2c775185fa9e864eb (patch) | |
tree | 861d5d09092cff4fbc720b4a04db22add91bf3d3 /net/asterisk/files/patch-Makefile | |
parent | 1409736de1222de37cb2e4296d6651803bc1eb80 (diff) | |
download | ports-acc33b14df77f1bad1c2d0a2c775185fa9e864eb.tar.gz ports-acc33b14df77f1bad1c2d0a2c775185fa9e864eb.zip |
Notes
Diffstat (limited to 'net/asterisk/files/patch-Makefile')
-rw-r--r-- | net/asterisk/files/patch-Makefile | 496 |
1 files changed, 110 insertions, 386 deletions
diff --git a/net/asterisk/files/patch-Makefile b/net/asterisk/files/patch-Makefile index 876ddddd5cd6..62dd952d9e74 100644 --- a/net/asterisk/files/patch-Makefile +++ b/net/asterisk/files/patch-Makefile @@ -1,300 +1,33 @@ ---- Makefile.orig Tue Sep 26 18:41:55 2006 -+++ Makefile Tue Sep 26 18:47:32 2006 -@@ -19,8 +19,8 @@ - # CROSS_COMPILE=/opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be- - # CROSS_COMPILE_BIN=/opt/montavista/pro/devkit/arm/xscale_be/bin/ - # CROSS_COMPILE_TARGET=/opt/montavista/pro/devkit/arm/xscale_be/target --CC=$(CROSS_COMPILE)gcc --HOST_CC=gcc -+CC?=$(CROSS_COMPILE)gcc -+HOST_CC=${CC} - # CROSS_ARCH=Linux - # CROSS_PROC=arm - # SUB_PROC=xscale # or maverick -@@ -47,14 +47,14 @@ - #K6OPT = -DK6OPT - - #Tell gcc to optimize the code --OPTIMIZE+=-O6 -+#OPTIMIZE+=-O6 - endif - - #Overwite config files on "make samples" --OVERWRITE=y -+OVERWRITE=n - - #Include debug and macro symbols in the executables (-g) and profiling info (-pg) --DEBUG=-g3 #-pg -+#DEBUG=-g3 #-pg - - #Set NOCRYPTO to yes if you do not want to have crypto support or - #dependencies -@@ -88,7 +88,7 @@ - - # Where to install asterisk after compiling - # Default -> leave empty --INSTALL_PREFIX?= -+INSTALL_PREFIX=$(PREFIX) - - # Staging directory - # Files are copied here temporarily during the install process -@@ -111,17 +111,17 @@ - BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE - - ifneq ($(OSARCH),SunOS) -- ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk -- ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk -+ ASTLIBDIR=$(INSTALL_PREFIX)/lib/asterisk -+ ASTVARLIBDIR=$(INSTALL_PREFIX)/share/asterisk - ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk -- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk -- ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk -- ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk -+ ASTSPOOLDIR=/var/spool/asterisk -+ ASTLOGDIR=/var/log/asterisk -+ ASTHEADERDIR=$(INSTALL_PREFIX)/include/asterisk - ASTCONFPATH=$(ASTETCDIR)/asterisk.conf -- ASTBINDIR=$(INSTALL_PREFIX)/usr/bin -- ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin -- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run -- ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man -+ ASTBINDIR=$(INSTALL_PREFIX)/bin -+ ASTSBINDIR=$(INSTALL_PREFIX)/sbin -+ ASTVARRUNDIR=/var/run -+ ASTMANDIR=$(INSTALL_PREFIX)/man - MODULES_DIR=$(ASTLIBDIR)/modules - AGI_DIR=$(ASTVARLIBDIR)/agi-bin - else -@@ -226,25 +226,25 @@ - endif - - INCLUDE+=-Iinclude -I../include --ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY --ASTCFLAGS+=$(OPTIMIZE) -+ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE -DMAKE_VALGRIND_HAPPY -+#ASTCFLAGS+=$(OPTIMIZE) - ASTOBJ=-o asterisk - - ifeq ($(findstring BSD,$(OSARCH)),BSD) - PROC=$(shell uname -m) -- ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib -+ ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)$(LOCALBASE)/include -L$(CROSS_COMPILE_TARGET)$(LOCALBASE)/lib - endif - - ifneq ($(PROC),ultrasparc) -- ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) -+# ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) - endif - - ifeq ($(PROC),ppc) - ASTCFLAGS+=-fsigned-char - endif - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h),) -- ASTCFLAGS+=-DOSP_SUPPORT -I$(CROSS_COMPILE_TARGET)/usr/local/include/osp -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/osp/osp.h),) -+ ASTCFLAGS+=-DOSP_SUPPORT -I$(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/osp - else - ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),) - ASTCFLAGS+=-DOSP_SUPPORT -I$(CROSS_COMPILE_TARGET)/usr/include/osp -@@ -253,27 +253,24 @@ - - ifeq ($(OSARCH),FreeBSD) - BSDVERSION=$(shell make -V OSVERSION -f $(CROSS_COMPILE_TARGET)/usr/share/mk/bsd.port.subdir.mk) -- ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) -- LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) -- ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),) -- ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp -+ ASTCFLAGS+=$(PTHREAD_CFLAGS) -+ LIBS+=$(PTHREAD_LIBS) -+ ifneq ($(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/spandsp),) -+ ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/spandsp - endif - MPG123TARG=freebsd - -- # XXX FreeBSD paths -- PREFIX?=/usr/local -- ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk -- ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk -- ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk -- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk -- ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk -- ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk -+ ASTLIBDIR=$(INSTALL_PREFIX)/lib/asterisk -+ ASTVARLIBDIR=$(INSTALL_PREFIX)/share/asterisk -+ ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk -+ ASTSPOOLDIR=/var/spool/asterisk -+ ASTLOGDIR=/var/log/asterisk -+ ASTHEADERDIR=$(INSTALL_PREFIX)/include/asterisk - ASTCONFPATH=$(ASTETCDIR)/asterisk.conf -- ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin -- ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin -- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run -- ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man -- # XXX end FreeBSD paths -+ ASTBINDIR=$(INSTALL_PREFIX)/bin -+ ASTSBINDIR=$(INSTALL_PREFIX)/sbin -+ ASTVARRUNDIR=/var/run -+ ASTMANDIR=$(INSTALL_PREFIX)/man - - endif # FreeBSD - -@@ -307,7 +304,7 @@ - - ifndef WITHOUT_ZAPTEL - --ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),) -+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),) - ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS - endif - -@@ -414,7 +411,7 @@ - endif - - # This is used when generating the doxygen documentation --ifneq ($(wildcard /usr/local/bin/dot)$(wildcard /usr/bin/dot),) -+ifneq ($(wildcard $(LOCALBASE)/bin/dot)$(wildcard /usr/bin/dot),) - HAVEDOT=yes - else - HAVEDOT=no -@@ -431,7 +428,7 @@ - @echo " + $(MAKE) install +" - @echo " +-------------------------------------------+" - --all: cleantest depend asterisk subdirs -+all: cleantest depend asterisk subdirs manpage - - #ifneq ($(wildcard tags),) - ctags: tags -@@ -450,13 +447,13 @@ - cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure - $(MAKE) -C editline libedit.a - --db1-ast/libdb1.a: FORCE -- @if [ -d db1-ast ]; then \ -- $(MAKE) -C db1-ast libdb1.a ; \ -- else \ -- echo "You need to do a cvs update -d not just cvs update"; \ -- exit 1; \ -- fi -+#db1-ast/libdb1.a: FORCE -+# @if [ -d db1-ast ]; then \ -+# $(MAKE) -C db1-ast libdb1.a ; \ -+# else \ -+# echo "You need to do a cvs update -d not just cvs update"; \ -+# exit 1; \ -+# fi - - ifneq ($(wildcard .depend),) - include .depend -@@ -480,10 +477,10 @@ - - manpage: asterisk.8 - --asterisk.8: asterisk.sgml -- rm -f asterisk.8 -- docbook2man asterisk.sgml -- mv ./*.8 asterisk.8 -+#asterisk.8: asterisk.sgml -+# rm -f asterisk.8 -+# docbook2man asterisk.sgml -+# mv ./*.8 asterisk.8 - - asterisk.pdf: asterisk.sgml - docbook2pdf asterisk.sgml -@@ -523,14 +520,14 @@ - cygwin_a: - $(MAKE) -C cygwin all - --asterisk: $(CYGLOADER) editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS) -+asterisk: $(CYGLOADER) editline/libedit.a stdtime/libtime.a $(OBJS) - build_tools/make_build_h > include/asterisk/build.h.tmp - if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \ - mv include/asterisk/build.h.tmp include/asterisk/build.h ; \ - fi - rm -f include/asterisk/build.h.tmp - $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c -- $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) -+ $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) stdtime/libtime.a $(LIBS) - - muted: muted.o - $(CC) $(AUDIO_LIBS) -o muted muted.o -@@ -552,38 +549,38 @@ - - datafiles: all - if [ x`$(ID) -un` = xroot ]; then sh mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros - for x in sounds/digits/*.gsm; do \ - if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits ; \ - else \ - echo "No description for $$x"; \ - exit 1; \ - fi; \ - done -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate - for x in sounds/dictate/*.gsm; do \ - if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate ; \ - else \ - echo "No description for $$x"; \ - exit 1; \ - fi; \ + +$FreeBSD$ + +--- Makefile.orig ++++ Makefile +@@ -371,15 +371,15 @@ + # Should static HTTP be installed during make samples or even with its own target ala + # webvoicemail? There are portions here that *could* be customized but might also be + # improved a lot. I'll put it here for now. +- mkdir -p $(DESTDIR)$(ASTDATADIR)/static-http ++ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/static-http + for x in static-http/*; do \ +- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \ ++ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \ done -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters - for x in sounds/letters/*.gsm; do \ - if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters ; \ - else \ - echo "No description for $$x"; \ - exit 1; \ - fi; \ - done -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic - for x in sounds/phonetic/*.gsm; do \ - if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic ; \ - else \ - echo "No description for $$x"; \ - exit 1; \ -@@ -591,18 +588,18 @@ - done - for x in sounds/demo-* sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-* sounds/spy-* sounds/priv-* sounds/screen-* sounds/hello-* sounds/hours* sounds/minute* sounds/second* ; do \ - if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \ - else \ - echo "No description for $$x"; \ - exit 1; \ - fi; \ - done -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/images -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/images +- mkdir -p $(DESTDIR)$(ASTDATADIR)/images ++ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/images for x in images/*.jpg; do \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/images ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTVARLIBDIR)/images ; \ +- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \ ++ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTDATADIR)/images ; \ done - mkdir -p $(DESTDIR)$(AGI_DIR) + $(MKDIR) $(DESTDIR)$(AGI_DIR) + $(MAKE) -C sounds install update: - @if [ -d .svn ]; then \ -@@ -631,47 +628,47 @@ +@@ -400,45 +400,45 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) - bininstall: all + bininstall: _all - mkdir -p $(DESTDIR)$(MODULES_DIR) - mkdir -p $(DESTDIR)$(ASTSBINDIR) - mkdir -p $(DESTDIR)$(ASTETCDIR) @@ -306,9 +39,7 @@ - mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp - mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme - mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor -- if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi -- if [ -f cygwin/asterisk.exe ]; then $(INSTALL) -m 755 cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi -- if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi +- $(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/ + $(MKDIR) $(DESTDIR)$(MODULES_DIR) + $(MKDIR) $(DESTDIR)$(ASTSBINDIR) + $(MKDIR) $(DESTDIR)$(ASTETCDIR) @@ -320,153 +51,121 @@ + $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/tmp + $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/meetme + $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/monitor -+ if [ -f asterisk ]; then $(BSD_INSTALL_PROGRAM) asterisk $(DESTDIR)$(ASTSBINDIR)/; fi -+ if [ -f cygwin/asterisk.exe ]; then $(BSD_INSTALL_PROGRAM) cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi -+ if [ -f asterisk.dll ]; then $(BSD_INSTALL_PROGRAM) asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi ++ $(BSD_INSTALL_PROGRAM) main/asterisk $(DESTDIR)$(ASTSBINDIR)/ $(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk - $(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/ -- $(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/ +- $(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/ + $(BSD_INSTALL_SCRIPT) contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/ -+ $(BSD_INSTALL_SCRIPT) contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/ ++ $(BSD_INSTALL_SCRIPT) contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/ if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \ cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\ chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\ fi - $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR) +- $(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(includedir) - $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) + $(MKDIR) $(DESTDIR)$(ASTHEADERDIR) ++ $(BSD_INSTALL_DATA) include/asterisk.h $(DESTDIR)$(includedir) + $(BSD_INSTALL_DATA) include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) if [ -n "$(OLDHEADERS)" ]; then \ rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\ fi -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds - mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv - mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax +- mkdir -p $(DESTDIR)$(ASTDATADIR)/keys +- mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware +- mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax - mkdir -p $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys -- $(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTVARLIBDIR)/keys -- $(INSTALL) -m 644 asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 +- $(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys +- $(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys +- $(INSTALL) -m 644 doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 - $(INSTALL) -m 644 contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8 - $(INSTALL) -m 644 contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8 - $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/sounds + $(MKDIR) $(DESTDIR)$(ASTLOGDIR)/cdr-csv + $(MKDIR) $(DESTDIR)$(ASTLOGDIR)/cdr-custom -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/keys -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/firmware -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax ++ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/keys ++ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/firmware ++ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/firmware/iax + $(MKDIR) $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys -+ $(BSD_INSTALL_DATA) keys/freeworlddialup.pub $(DESTDIR)$(ASTVARLIBDIR)/keys -+ $(BSD_INSTALL_DATA) asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 ++ $(BSD_INSTALL_DATA) keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys ++ $(BSD_INSTALL_DATA) keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys ++ $(BSD_INSTALL_DATA) doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 + $(BSD_INSTALL_DATA) contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8 + $(BSD_INSTALL_DATA) contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8 + $(BSD_INSTALL_DATA) contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 - if [ -d contrib/firmware/iax ]; then \ -- $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \ -+ $(BSD_INSTALL_DATA) contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \ - else \ - echo "You need to do cvs update -d not just cvs update" ; \ - fi -@@ -701,46 +698,28 @@ + if [ -f contrib/firmware/iax/iaxy.bin ] ; then \ +- $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \ ++ $(BSD_INSTALL_DATA) contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \ + fi + + $(SUBDIRS_INSTALL): +@@ -465,7 +465,7 @@ echo " WARNING WARNING WARNING" ;\ fi --install: all datafiles bininstall install-subdirs -+install: all datafiles bininstall install-subdirs samples +-install: datafiles bininstall $(SUBDIRS_INSTALL) ++install: datafiles bininstall $(SUBDIRS_INSTALL) samples @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -- @echo " +---- Asterisk Installation Complete -------+" -- @echo " + +" -- @echo " + YOU MUST READ THE SECURITY DOCUMENT +" -- @echo " + +" -- @echo " + Asterisk has successfully been installed. +" -- @echo " + If you would like to install the sample +" -- @echo " + configuration files (overwriting any +" -- @echo " + existing config files), run: +" -- @echo " + +" -- @echo " + $(MAKE) samples +" -- @echo " + +" -- @echo " +----------------- or ---------------------+" -- @echo " + +" -- @echo " + You can go ahead and install the asterisk +" -- @echo " + program documentation now or later run: +" -- @echo " + +" -- @echo " + $(MAKE) progdocs +" -- @echo " + +" -- @echo " + **Note** This requires that you have +" -- @echo " + doxygen installed on your local system +" -- @echo " +-------------------------------------------+" - @$(MAKE) -s oldmodcheck - - upgrade: all bininstall +@@ -495,31 +495,23 @@ + upgrade: bininstall adsi: - mkdir -p $(DESTDIR)$(ASTETCDIR) + $(MKDIR) $(DESTDIR)$(ASTETCDIR) for x in configs/*.adsi; do \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x`-dist; \ - if [ ! -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \ + if [ ! -f $(DESTDIR)$(ASTETCDIR)/$$x ]; then \ +- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \ ++ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \ fi ; \ ++ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`-dist ; \ done samples: adsi - mkdir -p $(DESTDIR)$(ASTETCDIR) -+ echo ADSI INSTALL $(BSD_INSTALL_DATA) + $(MKDIR) $(DESTDIR)$(ASTETCDIR) for x in configs/*.sample; do \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`-dist;\ - if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \ - if [ "$(OVERWRITE)" = "y" ]; then \ - if cmp -s $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $$x ; then \ -@@ -753,7 +732,7 @@ - continue; \ - fi ;\ +- if [ -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \ +- if [ "$(OVERWRITE)" = "y" ]; then \ +- if cmp -s $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $$x ; then \ +- echo "Config file $$x is unchanged"; \ +- continue; \ +- fi ; \ +- mv -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`.old ; \ +- else \ +- echo "Skipping config file $$x"; \ +- continue; \ +- fi ;\ ++ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`-dist ;\ ++ if [ ! -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \ ++ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`;\ fi ; \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\ +- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ;\ done - if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \ +- if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \ ++ if true; then \ ( \ -@@ -813,25 +792,25 @@ - echo "; Default: strict"; \ - echo ";"; \ - echo ";translation_algorithm = strict"; \ + echo "[directories]" ; \ + echo "astetcdir => $(ASTETCDIR)" ; \ +@@ -540,20 +532,23 @@ + echo ";astctlowner = root" ; \ + echo ";astctlgroup = apache" ; \ + echo ";astctl = asterisk.ctl" ; \ - ) > $(DESTDIR)$(ASTCONFPATH) ; \ + ) > $(DESTDIR)$(ASTCONFPATH)-dist ; \ ++ if [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \ ++ cp $(DESTDIR)$(ASTCONFPATH)-dist $(DESTDIR)$(ASTCONFPATH); \ ++ fi; \ else \ echo "Skipping asterisk.conf creation"; \ fi -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \ -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \ - for x in sounds/demo-*; do \ - if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \ - else \ - echo "No description for $$x"; \ - exit 1; \ - fi; \ - done -- mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \ -+ $(MKDIR) $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \ - for x in sounds/*.mp3; do \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \ - done - rm -f $(DESTDIR)$(ASTVARLIBDIR)/mohmp3/sample-hold.mp3 - mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX + $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX - :> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm - for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \ - cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \ -@@ -845,9 +824,9 @@ + build_tools/make_sample_voicemail $(DESTDIR)/$(ASTDATADIR) $(DESTDIR)/$(ASTSPOOLDIR) + + webvmail: @[ -d $(DESTDIR)$(HTTP_DOCSDIR)/ ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 ) @[ -d $(DESTDIR)$(HTTP_CGIDIR) ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 ) $(INSTALL) -m 4755 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi @@ -478,9 +177,9 @@ done @echo " +--------- Asterisk Web Voicemail ----------+" @echo " + +" -@@ -874,10 +853,10 @@ +@@ -580,10 +575,10 @@ - __rpm: include/asterisk/version.h spec + __rpm: include/asterisk/version.h include/asterisk/buildopts.h spec rm -rf /tmp/asterisk ; \ - mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \ + $(MKDIR) /tmp/asterisk/redhat/RPMS/i386 ; \ @@ -491,3 +190,28 @@ cp -f contrib/init.d/rc.redhat.asterisk /tmp/asterisk/etc/rc.d/init.d/asterisk ; \ rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec +@@ -594,19 +589,19 @@ + config: + @if [ "${OSARCH}" = "linux-gnu" ]; then \ + if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \ +- $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \ ++ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \ + /sbin/chkconfig --add asterisk; \ + elif [ -f /etc/debian_version ]; then \ +- $(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \ ++ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \ + /usr/sbin/update-rc.d asterisk start 10 2 3 4 5 . stop 91 2 3 4 5 .; \ + elif [ -f /etc/gentoo-release ]; then \ +- $(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \ ++ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \ + /sbin/rc-update add asterisk default; \ + elif [ -f /etc/mandrake-release ]; then \ +- $(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \ ++ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \ + /sbin/chkconfig --add asterisk; \ + elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \ +- $(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \ ++ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \ + /sbin/chkconfig --add asterisk; \ + elif [ -f /etc/slackware-version ]; then \ + echo "Slackware is not currently supported, although an init script does exist for it." \ |