Build system and packaging changes.
The yate library is now versioned. git-svn-id: http://yate.null.ro/svn/yate/trunk@166 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
a82ce217e7
commit
9c69af7330
62
Makefile.in
62
Makefile.in
|
@ -19,7 +19,7 @@ LDCONFIG:=true
|
||||||
|
|
||||||
MKDEPS := ./config.status
|
MKDEPS := ./config.status
|
||||||
PROGS:= yate
|
PROGS:= yate
|
||||||
SLIBS:= libyate.so
|
SLIBS:= libyate.so.@PACKAGE_VERSION@ libyate.so
|
||||||
INCS := telengine.h telephony.h
|
INCS := telengine.h telephony.h
|
||||||
GENS := yateversn.h
|
GENS := yateversn.h
|
||||||
LIBS :=
|
LIBS :=
|
||||||
|
@ -32,7 +32,7 @@ ENGOBJS := TelEngine.o String.o DataBlock.o ObjList.o \
|
||||||
OBJS := main.o
|
OBJS := main.o
|
||||||
|
|
||||||
LIBOBJS := $(ENGOBJS) $(TELOBJS)
|
LIBOBJS := $(ENGOBJS) $(TELOBJS)
|
||||||
CLEANS = $(PROGS) $(SLIBS) $(LIBS) $(OBJS) $(LIBOBJS) core
|
CLEANS = $(PROGS) $(SLIBS) $(LIBS) $(OBJS) $(LIBOBJS) yatepaths.h core
|
||||||
COMPILE = $(CXX) $(DEFS) $(DEBUG) $(INCLUDES) $(CFLAGS)
|
COMPILE = $(CXX) $(DEFS) $(DEBUG) $(INCLUDES) $(CFLAGS)
|
||||||
LINK = $(CXX) $(LDFLAGS)
|
LINK = $(CXX) $(LDFLAGS)
|
||||||
|
|
||||||
|
@ -48,21 +48,42 @@ vardir = @localstatedir@/lib/yate
|
||||||
moddir = @libdir@/yate
|
moddir = @libdir@/yate
|
||||||
confdir = @sysconfdir@/yate
|
confdir = @sysconfdir@/yate
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all everything
|
||||||
all: engine modules
|
all: engine modules
|
||||||
|
|
||||||
.PHONY: clean
|
everything: all apidocs test
|
||||||
|
|
||||||
|
.PHONY: clean distclean cvsclean clean-config-files clean-tables clean-apidocs
|
||||||
clean:
|
clean:
|
||||||
-rm $(CLEANS) 2>/dev/null
|
-rm $(CLEANS) 2>/dev/null
|
||||||
$(MAKE) -C ./modules $@
|
$(MAKE) -C ./modules $@
|
||||||
$(MAKE) -C ./test $@
|
$(MAKE) -C ./test $@
|
||||||
$(MAKE) -C ./contrib/iax $@
|
$(MAKE) -C ./contrib/iax $@
|
||||||
$(MAKE) -C ./contrib/qt $@
|
$(MAKE) -C ./contrib/qt $@
|
||||||
|
$(MAKE) -C ./contrib/ysip $@
|
||||||
|
|
||||||
.PHONY: engine
|
check-topdir:
|
||||||
|
@test -f configure || (echo "Must make this target in the top source directory"; exit 1)
|
||||||
|
|
||||||
|
clean-config-files: check-topdir
|
||||||
|
-rm -rf auto*.cache
|
||||||
|
-rm -f @CONFIGURE_FILES@
|
||||||
|
|
||||||
|
clean-tables: check-topdir
|
||||||
|
-rm -f yate.spec
|
||||||
|
$(MAKE) -C ./tables -f Makefile.tables mrproper
|
||||||
|
|
||||||
|
clean-apidocs: check-topdir
|
||||||
|
-rm docs/api/*.html
|
||||||
|
|
||||||
|
distclean: check-topdir clean clean-config-files
|
||||||
|
|
||||||
|
cvsclean: check-topdir clean clean-tables clean-apidocs clean-config-files
|
||||||
|
-rm -f configure
|
||||||
|
|
||||||
|
.PHONY: engine modules test apidocs-build check-topdir
|
||||||
engine: tables yatepaths.h $(LIBS) $(SLIBS) $(PROGS)
|
engine: tables yatepaths.h $(LIBS) $(SLIBS) $(PROGS)
|
||||||
|
|
||||||
.PHONY: apidocs-build
|
|
||||||
apidocs-build: check-topdir
|
apidocs-build: check-topdir
|
||||||
kdoc -C ./kdoc-filter.sh -d docs/api/ $(INCS)
|
kdoc -C ./kdoc-filter.sh -d docs/api/ $(INCS)
|
||||||
|
|
||||||
|
@ -71,28 +92,23 @@ apidocs: @srcdir@/docs/api/index.html
|
||||||
@srcdir@/docs/api/index.html: @srcdir@/telengine.h @srcdir@/telephony.h
|
@srcdir@/docs/api/index.html: @srcdir@/telengine.h @srcdir@/telephony.h
|
||||||
$(MAKE) apidocs-build
|
$(MAKE) apidocs-build
|
||||||
|
|
||||||
.PHONY: strip
|
.PHONY: strip sex love war
|
||||||
strip: all
|
strip: all
|
||||||
-strip --strip-debug --discard-locals $(PROGS) $(SLIBS)
|
-strip --strip-debug --discard-locals $(PROGS) $(SLIBS)
|
||||||
|
|
||||||
.PHONY: sex
|
|
||||||
sex: strip
|
sex: strip
|
||||||
@echo 'Stripped for you!'
|
@echo 'Stripped for you!'
|
||||||
|
|
||||||
# Let's have a little fun
|
# Let's have a little fun
|
||||||
.PHONY: love
|
|
||||||
love:
|
love:
|
||||||
@echo 'Not war?'
|
@echo 'Not war?'
|
||||||
|
|
||||||
.PHONY: war
|
|
||||||
war:
|
war:
|
||||||
@echo 'Please make love instead!'
|
@echo 'Please make love instead!'
|
||||||
|
|
||||||
.PHONY: test
|
|
||||||
test: engine
|
test: engine
|
||||||
$(MAKE) -C ./test all
|
$(MAKE) -C ./test all
|
||||||
|
|
||||||
.PHONY: modules
|
|
||||||
modules: engine
|
modules: engine
|
||||||
$(MAKE) -C ./modules all
|
$(MAKE) -C ./modules all
|
||||||
|
|
||||||
|
@ -105,13 +121,17 @@ yatepaths.h: $(MKDEPS)
|
||||||
@echo '#define MOD_PATH "$(DESTDIR)$(moddir)"' > $@
|
@echo '#define MOD_PATH "$(DESTDIR)$(moddir)"' > $@
|
||||||
@echo '#define CFG_PATH "$(DESTDIR)$(confdir)"' >> $@
|
@echo '#define CFG_PATH "$(DESTDIR)$(confdir)"' >> $@
|
||||||
|
|
||||||
.PHONY: everything
|
|
||||||
everything: all apidocs test
|
|
||||||
|
|
||||||
.PHONY: install install-root
|
.PHONY: install install-root
|
||||||
install install-root: all apidocs
|
install install-root: all apidocs
|
||||||
@mkdir -p "$(DESTDIR)$(libdir)/" && \
|
@mkdir -p "$(DESTDIR)$(libdir)/" && \
|
||||||
install $(SLIBS) "$(DESTDIR)$(libdir)/" && $(LDCONFIG)
|
for i in $(SLIBS) ; do \
|
||||||
|
if [ -h "$$i" ]; then \
|
||||||
|
f=`readlink "$$i"` ; \
|
||||||
|
ln -sf "$$f" "$(DESTDIR)$(libdir)/$$i" ; \
|
||||||
|
else \
|
||||||
|
install $$i "$(DESTDIR)$(libdir)/" ; \
|
||||||
|
fi \
|
||||||
|
done && $(LDCONFIG)
|
||||||
@mkdir -p "$(DESTDIR)$(bindir)/" && \
|
@mkdir -p "$(DESTDIR)$(bindir)/" && \
|
||||||
install $(PROGS) yate-config "$(DESTDIR)$(bindir)/"
|
install $(PROGS) yate-config "$(DESTDIR)$(bindir)/"
|
||||||
$(MAKE) -C ./modules install
|
$(MAKE) -C ./modules install
|
||||||
|
@ -192,10 +212,6 @@ snapshot tarball: check-topdir clean tables apidocs
|
||||||
$$wd; \
|
$$wd; \
|
||||||
rm $$wd/tar-exclude
|
rm $$wd/tar-exclude
|
||||||
|
|
||||||
.PHONY: check-topdir
|
|
||||||
check-topdir:
|
|
||||||
@test -f configure || (echo "Must make this target in the top source directory"; exit 1)
|
|
||||||
|
|
||||||
Engine.o: @srcdir@/Engine.cpp $(MKDEPS) @srcdir@/telengine.h yateversn.h yatepaths.h
|
Engine.o: @srcdir@/Engine.cpp $(MKDEPS) @srcdir@/telengine.h yateversn.h yatepaths.h
|
||||||
$(COMPILE) -c $<
|
$(COMPILE) -c $<
|
||||||
|
|
||||||
|
@ -220,7 +236,10 @@ Makefile: @srcdir@/Makefile.in $(MKDEPS)
|
||||||
yate: $(OBJS) libyate.so $(LIBS)
|
yate: $(OBJS) libyate.so $(LIBS)
|
||||||
$(LINK) -o $@ $(LIBTHR) $^
|
$(LINK) -o $@ $(LIBTHR) $^
|
||||||
|
|
||||||
libyate.so: $(ENGOBJS) $(LIBS)
|
libyate.so: libyate.so.@PACKAGE_VERSION@
|
||||||
|
ln -sf $^ $@
|
||||||
|
|
||||||
|
libyate.so.@PACKAGE_VERSION@: $(ENGOBJS) $(LIBS)
|
||||||
$(LINK) -shared -o $@ -Wl,--soname=$@ $(LIBTHR) $^ $(LIBAUX)
|
$(LINK) -shared -o $@ -Wl,--soname=$@ $(LIBTHR) $^ $(LIBAUX)
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
|
@ -228,4 +247,5 @@ help:
|
||||||
@echo -e 'Usual make targets:\n\
|
@echo -e 'Usual make targets:\n\
|
||||||
all engine modules apidocs test everything\n\
|
all engine modules apidocs test everything\n\
|
||||||
install uninstall\n\
|
install uninstall\n\
|
||||||
|
clean distclean cvsclean\n\
|
||||||
snapshot tarball'
|
snapshot tarball'
|
||||||
|
|
|
@ -100,8 +100,11 @@ PGSQL_INC=""
|
||||||
AC_ARG_WITH(libpq,AC_HELP_STRING([--with-libpq=DIR],[use Postgress SQL from DIR (default /usr)]),[ac_cv_use_libpq=$withval],[ac_cv_use_libpq=/usr])
|
AC_ARG_WITH(libpq,AC_HELP_STRING([--with-libpq=DIR],[use Postgress SQL from DIR (default /usr)]),[ac_cv_use_libpq=$withval],[ac_cv_use_libpq=/usr])
|
||||||
if [[ "x$ac_cv_use_libpq" != "xno" ]]; then
|
if [[ "x$ac_cv_use_libpq" != "xno" ]]; then
|
||||||
AC_MSG_CHECKING([for Postgress SQL in $ac_cv_use_libpq])
|
AC_MSG_CHECKING([for Postgress SQL in $ac_cv_use_libpq])
|
||||||
incpq="$ac_cv_use_libpq/include"
|
|
||||||
libpq="$ac_cv_use_libpq/lib/libpq.so"
|
libpq="$ac_cv_use_libpq/lib/libpq.so"
|
||||||
|
for i in include include/pgsql pgsql/include include/postgresql; do
|
||||||
|
incpq="$ac_cv_use_libpq/$i"
|
||||||
|
test -f "$incpq/libpq-fe.h" && break
|
||||||
|
done
|
||||||
if [[ ! -f "$incpq/libpq-fe.h" ]]; then
|
if [[ ! -f "$incpq/libpq-fe.h" ]]; then
|
||||||
incpq="$incpq/pgsql"
|
incpq="$incpq/pgsql"
|
||||||
fi
|
fi
|
||||||
|
@ -509,4 +512,6 @@ AC_CONFIG_FILES([yate.spec
|
||||||
test/Makefile])
|
test/Makefile])
|
||||||
AC_CONFIG_FILES([yate-config],[chmod +x yate-config])
|
AC_CONFIG_FILES([yate-config],[chmod +x yate-config])
|
||||||
AC_CONFIG_FILES([run],[chmod +x run])
|
AC_CONFIG_FILES([run],[chmod +x run])
|
||||||
|
CONFIGURE_FILES=`echo "$ac_config_files config.status config.log" | sed 's/yate\.spec *//'`
|
||||||
|
AC_SUBST(CONFIGURE_FILES)
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
@ -103,6 +103,7 @@ bool Engine::s_dynplugin = false;
|
||||||
int Engine::s_maxworkers = 10;
|
int Engine::s_maxworkers = 10;
|
||||||
int EnginePrivate::count = 0;
|
int EnginePrivate::count = 0;
|
||||||
|
|
||||||
|
const char* s_cfgfile = "yate";
|
||||||
ObjList plugins;
|
ObjList plugins;
|
||||||
|
|
||||||
class SLib : public GenObject
|
class SLib : public GenObject
|
||||||
|
@ -328,7 +329,7 @@ void Engine::loadPlugins()
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Debugger debug("Engine::loadPlugins()");
|
Debugger debug("Engine::loadPlugins()");
|
||||||
#endif
|
#endif
|
||||||
Configuration cfg(configFile("yate"));
|
Configuration cfg(configFile(s_cfgfile));
|
||||||
bool defload = cfg.getBoolValue("general","modload",true);
|
bool defload = cfg.getBoolValue("general","modload",true);
|
||||||
const char *name = cfg.getValue("general","modpath");
|
const char *name = cfg.getValue("general","modpath");
|
||||||
if (name)
|
if (name)
|
||||||
|
@ -559,6 +560,7 @@ static void usage(FILE *f)
|
||||||
" -s Supervised, restart if crashes or locks up\n"
|
" -s Supervised, restart if crashes or locks up\n"
|
||||||
" -l filename Log to file\n"
|
" -l filename Log to file\n"
|
||||||
" -p filename Write PID to file\n"
|
" -p filename Write PID to file\n"
|
||||||
|
" -n configname Use specified configuration name (yate)\n"
|
||||||
" -c pathname Path to conf files directory (" CFG_PATH ")\n"
|
" -c pathname Path to conf files directory (" CFG_PATH ")\n"
|
||||||
" -m pathname Path to modules directory (" MOD_PATH ")\n"
|
" -m pathname Path to modules directory (" MOD_PATH ")\n"
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
@ -645,6 +647,14 @@ int Engine::main(int argc, const char **argv, const char **environ)
|
||||||
pc = 0;
|
pc = 0;
|
||||||
pidfile=argv[++i];
|
pidfile=argv[++i];
|
||||||
break;
|
break;
|
||||||
|
case 'n':
|
||||||
|
if (i+1 >= argc) {
|
||||||
|
noarg(argv[i]);
|
||||||
|
return ENOENT;
|
||||||
|
}
|
||||||
|
pc = 0;
|
||||||
|
s_cfgfile=argv[++i];
|
||||||
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
if (i+1 >= argc) {
|
if (i+1 >= argc) {
|
||||||
noarg(argv[i]);
|
noarg(argv[i]);
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
.\"
|
||||||
|
.\" YATE - Yet Another Telephony Engine
|
||||||
|
.\"
|
||||||
|
.\" This program is free software; you can redistribute it and/or modify
|
||||||
|
.\" it under the terms of the GNU General Public License as published by
|
||||||
|
.\" the Free Software Foundation; either version 2 of the License, or
|
||||||
|
.\" (at your option) any later version.
|
||||||
|
.\"
|
||||||
|
.\" This program is distributed in the hope that it will be useful,
|
||||||
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
.\" GNU General Public License for more details.
|
||||||
|
.\"
|
||||||
|
.\" You should have received a copy of the GNU General Public License
|
||||||
|
.\" along with this program; if not, write to the Free Software
|
||||||
|
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
.\"
|
||||||
|
.\"
|
||||||
|
.TH YATE-CONFIG 8 "March 2004" "YATE" "Telephony Engine"
|
||||||
|
.SH NAME
|
||||||
|
\fByate-config\fP \- retrieve metainformation about the YATE telephony engine
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B yate-config
|
||||||
|
.RI [options]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The
|
||||||
|
.B yate-config
|
||||||
|
program is used to retrieve information about the installed YATE engine.
|
||||||
|
It is typically used to compile and link modules against the engine's library.
|
||||||
|
|
||||||
|
Here is a typical usage scenario in a Makefile:
|
||||||
|
|
||||||
|
module.yate: module.cpp
|
||||||
|
g++ `yate-config --c-all --ldflags` module.cpp `yate-config --libs`
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
|
.SS Version and paths
|
||||||
|
.TP
|
||||||
|
.B \-\-version
|
||||||
|
Reports the installed YATE version (in x.y.z format)
|
||||||
|
.TP
|
||||||
|
.B \-\-config
|
||||||
|
Returns the configuration files directory
|
||||||
|
.TP
|
||||||
|
.B \-\-modules
|
||||||
|
Returns the modules directory
|
||||||
|
.SS Compiler flags
|
||||||
|
.TP
|
||||||
|
.B \-\-cflags
|
||||||
|
Various C++ compiler flags
|
||||||
|
.TP
|
||||||
|
.B \-\-includes
|
||||||
|
Include option and path to the header files
|
||||||
|
.TP
|
||||||
|
.B \-\-c\-all
|
||||||
|
All compiler options \- the above two concatenated
|
||||||
|
.SS Linker flags
|
||||||
|
.TP
|
||||||
|
.B \-\-ldflags
|
||||||
|
Various linker flags
|
||||||
|
.TP
|
||||||
|
.B \-\-libs
|
||||||
|
Library option and libraries names
|
||||||
|
.TP
|
||||||
|
.B \-\-ld\-all
|
||||||
|
All linker options \- the above two concatenated
|
||||||
|
.SH AUTHORS
|
||||||
|
Paul Chitescu <paulc-devel@null.ro>
|
||||||
|
.br
|
||||||
|
Diana Cionoiu <diana@diana.null.ro>
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR yate (8)
|
19
yate.8
19
yate.8
|
@ -24,7 +24,7 @@
|
||||||
.RI [options]
|
.RI [options]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B yate
|
.B yate
|
||||||
is a telephony engine that supports PBX and IVR functions trough plugins.
|
is a telephony engine that supports client, PBX and IVR functions trough plugins.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.SS General
|
.SS General
|
||||||
.TP
|
.TP
|
||||||
|
@ -44,7 +44,19 @@ Daemonify, suppress output unless logged
|
||||||
Supervised, restart if crashes or locks up
|
Supervised, restart if crashes or locks up
|
||||||
.TP
|
.TP
|
||||||
.B \-l filename
|
.B \-l filename
|
||||||
Log to file
|
Log to file \- should be used whenever running in daemon mode
|
||||||
|
.TP
|
||||||
|
.B \-p filename
|
||||||
|
Write PID of the supervisor or primary thread to file
|
||||||
|
.TP
|
||||||
|
.B \-n configname
|
||||||
|
Use specified configuration name, overrides default "yate"
|
||||||
|
.TP
|
||||||
|
.B \-c pathname
|
||||||
|
Path to conf files directory, overrides compiled-in value
|
||||||
|
.TP
|
||||||
|
.B \-m pathname
|
||||||
|
Path to modules directory, overrides compiled-in value
|
||||||
.SS Debugging (may not be compiled in)
|
.SS Debugging (may not be compiled in)
|
||||||
.TP
|
.TP
|
||||||
.B \-D[options]
|
.B \-D[options]
|
||||||
|
@ -85,5 +97,4 @@ Paul Chitescu <paulc-devel@null.ro>
|
||||||
.br
|
.br
|
||||||
Diana Cionoiu <diana@diana.null.ro>
|
Diana Cionoiu <diana@diana.null.ro>
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.\" .BR libyate (3),
|
.BR yate-config (8)
|
||||||
.BR bayonne (8)
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ for small to large scale projects.
|
||||||
%config /etc/yate/*
|
%config /etc/yate/*
|
||||||
/usr/lib/lib*.so*
|
/usr/lib/lib*.so*
|
||||||
/usr/bin/yate
|
/usr/bin/yate
|
||||||
/usr/share/man/*
|
/usr/share/man/*/yate.*
|
||||||
/etc/rc.d/init.d/yate
|
/etc/rc.d/init.d/yate
|
||||||
%dir /usr/lib/yate
|
%dir /usr/lib/yate
|
||||||
/usr/lib/yate/*
|
/usr/lib/yate/*
|
||||||
|
@ -56,6 +56,7 @@ The yate-devel package includes the libraries and header files for YATE
|
||||||
%doc /usr/share/doc/yate-%{version}/api/*
|
%doc /usr/share/doc/yate-%{version}/api/*
|
||||||
/usr/include/*
|
/usr/include/*
|
||||||
/usr/bin/yate-config
|
/usr/bin/yate-config
|
||||||
|
/usr/share/man/*/yate-config.*
|
||||||
/usr/lib/pkgconfig/yate.pc
|
/usr/lib/pkgconfig/yate.pc
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
@ -98,6 +99,9 @@ cp -p %{_builddir}/%{name}/yate.init %{buildroot}/etc/rc.d/init.d/yate
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jan 09 2005 Paul Chitescu <paulc-devel@null.ro>
|
||||||
|
- Cleaned up the build and packaging system
|
||||||
|
|
||||||
* Wed Dec 15 2004 Paul Chitescu <paulc-devel@null.ro>
|
* Wed Dec 15 2004 Paul Chitescu <paulc-devel@null.ro>
|
||||||
- Added custom requires/provides filters to supress modules dependencies
|
- Added custom requires/provides filters to supress modules dependencies
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue