[Asterisk-bsd] Update FreeBSD to verion 6?

Kim Culhan w8hdkim at gmail.com
Sun Jan 8 13:01:19 CST 2006


On 1/8/06, Randy Bush <randy at psg.com> wrote:

> last successfully built about 1 oct.  current builds fail in zaptel
> as posted earlier

As Luigi pointed out, zaptel doesn't work on FBSD -current

> but this is 7-current.  it may work on 6.  no harm in trying.

It will work on 6 :)

> the problem i have with trying the cvs of the week is that it
> does not install in the same dir structure as the port.  so one
> can not easily test and switch back.  major pita.

You won't want to switch back, but it you want to change the dir structure
it can be done in the Makefile.

Take a look at the effort taken to cause it to install in the 'standard FreeBSD
places':

# 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
  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

endif # FreeBSD

While you're there, take a look at all the other work they've done to make it
Do The Right Thing on FreeBSD:

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_SA
FE"; fi)
  LIBS+=$(shell if test  $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else ech
o "-pthread"; fi)
  ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp),)
    ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp
  endif
  MPG123TARG=freebsd

With all these measures taken to enable pain-free compilation on FreeBSD
who needs the port ?

-kim


More information about the Asterisk-BSD mailing list