1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
$NetBSD: patch-aa,v 1.7 2010/09/23 23:30:38 jnemeth Exp $
--- Makefile.orig 2010-06-10 20:35:06.000000000 +0000
+++ Makefile
@@ -126,19 +126,6 @@ DEBUG=-g3
# Define standard directories for various platforms
# These apply if they are not redefined in asterisk.conf
-ifeq ($(OSARCH),SunOS)
- ASTETCDIR=/var/etc/asterisk
- ASTLIBDIR=/opt/asterisk/lib
- ASTVARLIBDIR=/var/opt/asterisk
- ASTDBDIR=$(ASTVARLIBDIR)
- ASTKEYDIR=$(ASTVARLIBDIR)
- ASTSPOOLDIR=/var/spool/asterisk
- ASTLOGDIR=/var/log/asterisk
- ASTHEADERDIR=/opt/asterisk/include
- ASTSBINDIR=/opt/asterisk/sbin
- ASTVARRUNDIR=/var/run/asterisk
- ASTMANDIR=/opt/asterisk/man
-else
ASTETCDIR=$(sysconfdir)/asterisk
ASTLIBDIR=$(libdir)/asterisk
ASTHEADERDIR=$(includedir)/asterisk
@@ -147,19 +134,11 @@ else
ASTLOGDIR=$(localstatedir)/log/asterisk
ASTVARRUNDIR=$(localstatedir)/run/asterisk
ASTMANDIR=$(mandir)
-ifneq ($(findstring BSD,$(OSARCH)),)
ASTVARLIBDIR=$(prefix)/share/asterisk
- ASTVARRUNDIR=$(localstatedir)/run/asterisk
ASTDBDIR=$(localstatedir)/db/asterisk
-else
- ASTVARLIBDIR=$(localstatedir)/lib/asterisk
- ASTDBDIR=$(ASTVARLIBDIR)
-endif
ASTKEYDIR=$(ASTVARLIBDIR)
-endif
-ifeq ($(ASTDATADIR),)
ASTDATADIR:=$(ASTVARLIBDIR)
-endif
+ ASTEXAMPLEDIR=$(ASTETCDIR)
# Asterisk.conf is located in ASTETCDIR or by using the -C flag
# when starting Asterisk
@@ -245,10 +224,6 @@ ifeq ($(AST_DEVMODE),yes)
_ASTCFLAGS+=-Wformat=2
endif
-ifneq ($(findstring BSD,$(OSARCH)),)
- _ASTCFLAGS+=-isystem /usr/local/include
-endif
-
ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),)
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)
@@ -493,7 +468,6 @@ datafiles: _all
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \
done
mkdir -p $(DESTDIR)$(AGI_DIR)
- $(MAKE) -C sounds install
doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
@printf "Building Documentation For: "
@@ -539,9 +513,10 @@ NEWHEADERS=$(notdir $(wildcard include/a
OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
installdirs:
+ mkdir -p $(DESTDIR)$(AGI_DIR)
mkdir -p $(DESTDIR)$(MODULES_DIR)
mkdir -p $(DESTDIR)$(ASTSBINDIR)
- mkdir -p $(DESTDIR)$(ASTETCDIR)
+ mkdir -p $(DESTDIR)$(ASTEXAMPLEDIR)
mkdir -p $(DESTDIR)$(ASTVARRUNDIR)
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/dictate
@@ -549,6 +524,7 @@ installdirs:
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
+ mkdir -p $(DESTDIR)$(ASTDBDIR)
bininstall: _all installdirs $(SUBDIRS_INSTALL)
$(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/
@@ -650,22 +626,22 @@ upgrade: bininstall
# XXX why *.adsi is installed first ?
adsi:
@echo Installing adsi config files...
- @mkdir -p $(DESTDIR)$(ASTETCDIR)
+ @mkdir -p $(DESTDIR)$(ASTEXAMPLEDIR)
@for x in configs/*.adsi; do \
- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
+ dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x`" ; \
if [ -f $${dst} ] ; then \
echo "Overwriting $$x" ; \
else \
echo "Installing $$x" ; \
fi ; \
- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \
+ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x` ; \
done
samples: adsi
@echo Installing other config files...
- @mkdir -p $(DESTDIR)$(ASTETCDIR)
+ @mkdir -p $(DESTDIR)$(ASTEXAMPLEDIR)
@for x in configs/*.sample; do \
- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`" ; \
+ dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x .sample`" ; \
if [ -f $${dst} ]; then \
if [ "$(OVERWRITE)" = "y" ]; then \
if cmp -s $${dst} $$x ; then \
@@ -681,10 +657,10 @@ samples: adsi
echo "Installing file $$x"; \
$(INSTALL) -m 644 $$x $${dst} ;\
done
- @if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \
+ @if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf ]; then \
echo "Creating asterisk.conf"; \
( \
- echo "[directories](!) ; remove the (!) to enable this" ; \
+ echo "[directories]" ; \
echo "astetcdir => $(ASTETCDIR)" ; \
echo "astmoddir => $(MODULES_DIR)" ; \
echo "astvarlibdir => $(ASTVARLIBDIR)" ; \
@@ -745,7 +721,7 @@ samples: adsi
echo "pbx_realtime=1.6" ; \
echo "res_agi=1.6" ; \
echo "app_set=1.6" ; \
- ) > $(DESTDIR)$(ASTCONFPATH) ; \
+ ) > $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf ; \
else \
echo "Skipping asterisk.conf creation"; \
fi
@@ -773,7 +749,7 @@ samples: adsi
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
+ $(INSTALL) contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail
mkdir -p $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk
for x in images/*.gif; do \
$(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \
@@ -889,7 +865,7 @@ uninstall-all: _uninstall
rm -rf $(DESTDIR)$(ASTVARLIBDIR)
rm -rf $(DESTDIR)$(ASTDATADIR)
rm -rf $(DESTDIR)$(ASTSPOOLDIR)
- rm -rf $(DESTDIR)$(ASTETCDIR)
+ rm -rf $(DESTDIR)$(ASTEXAMPLEDIR)
rm -rf $(DESTDIR)$(ASTLOGDIR)
menuconfig: menuselect
@@ -964,6 +940,7 @@ asterisk.txt:
$(MAKE) -C doc/tex asterisk.txt
.PHONY: menuselect
+.PHONY: menuselect.makeopts
.PHONY: main
.PHONY: sounds
.PHONY: clean
|