[zaptel-commits] tzafrir: branch 1.2 r2873 - in /branches/1.2: ./ Makefile README

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Aug 17 07:41:47 CDT 2007


Author: tzafrir
Date: Fri Aug 17 07:41:47 2007
New Revision: 2873

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2873
Log:
* Re-introduce the target install-include .
* programs and install-programs are now for all of userspace.
  Added the target 'utils'  for what 'programs' used to be.
* Document this.
* Document some other variations on 'make' and 'make install'.
* Improve documentation of /proc/zaptel .
* Ignoring some more utilities.

Modified:
    branches/1.2/   (props changed)
    branches/1.2/Makefile
    branches/1.2/README

Propchange: branches/1.2/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Aug 17 07:41:47 2007
@@ -2,6 +2,8 @@
 ztspeed
 ztmonitor
 ztcfg
+ztcfg-dude
+ztcfg-shared
 zonedata.lo
 torisatool
 tor2fw.h
@@ -29,6 +31,9 @@
 hdlcgen
 hdlctest
 hdlcverify
+sethdlc-new
+usbfxstest
 timertest
+ztdiag
 Module.symvers
 README.html

Modified: branches/1.2/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.2/Makefile?view=diff&rev=2873&r1=2872&r2=2873
==============================================================================
--- branches/1.2/Makefile (original)
+++ branches/1.2/Makefile Fri Aug 17 07:41:47 2007
@@ -170,6 +170,7 @@
   INIT_TARGET	:= $(DESTDIR)$(INITRD_DIR)/zaptel
   COPY_INITD	:= install -D zaptel.init $(INIT_TARGET)
 endif
+RCCONF_DIR	:= $(firstword $(wildcard /etc/sysconfig /etc/default))
 
 NETSCR_DIR	:= $(firstword $(wildcard /etc/sysconfig/network-scripts ))
 ifneq (,$(NET_SCR_DIR))
@@ -408,7 +409,9 @@
 	@echo "###"
 	@echo "###################################################"
 
-install-programs: programs
+install-programs: install-utils install-libs install-include
+
+install-utils:
 	install -d $(DESTDIR)$(SBINDIR)
 	install -m 755 $(BINS) $(DESTDIR)$(SBINDIR)
 ifneq (,$(wildcard sethdlc-new))
@@ -420,8 +423,6 @@
 endif
 	install -d                  $(DESTDIR)$(MANDIR)
 	install -m 644 $(MAN_PAGES) $(DESTDIR)$(MANDIR)
-	install -d $(DESTDIR)$(INCLUDE_DIR)/linux
-	install -m 644 zaptel.h torisa.h $(DESTDIR)$(INCLUDE_DIR)/linux/
 ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
 	install -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
 endif
@@ -467,6 +468,10 @@
 	/sbin/restorecon -v $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO)
 endif
 
+install-include:
+	install -d $(DESTDIR)$(INCLUDE_DIR)/linux
+	install -m 644 zaptel.h torisa.h $(DESTDIR)$(INCLUDE_DIR)/linux/
+
 install-udev: devices
 
 # FIRMWARE_DIR also implies HOTPLUG_FIRMWARE, unless set manually.
@@ -489,14 +494,9 @@
 ifneq (,$(COPY_INITD))
 	$(COPY_INITD)
 endif
-ifneq (,$(wildcard /etc/default))
-  ifeq (,$(wildcard $(DESTDIR)/etc/default/zaptel))
-	install -D -m 644 zaptel.sysconfig $(DESTDIR)/etc/default/zaptel
-  endif
-endif
-ifneq (,$(wildcard /etc/sysconfig))
-  ifeq (,$(wildcard $(DESTDIR)/etc/sysconfig/zaptel))
-	install -D -m 644 zaptel.sysconfig $(DESTDIR)/etc/sysconfig/zaptel
+ifneq (,$(RCCONF_DIR))
+  ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/zaptel))
+	$(INSTALL) -D -m 644 zaptel.sysconfig $(DESTDIR)$(RCCONF_DIR)/zaptel
   endif
 endif
 ifneq (,$(COPY_NETSCR))

Modified: branches/1.2/README
URL: http://svn.digium.com/view/zaptel/branches/1.2/README?view=diff&rev=2873&r1=2872&r2=2873
==============================================================================
--- branches/1.2/README (original)
+++ branches/1.2/README Fri Aug 17 07:41:47 2007
@@ -167,6 +167,63 @@
 ----------------------------------
 
 
+Build Tweaks
+~~~~~~~~~~~~
+Extra Modules
+^^^^^^^^^^^^^
+To build extra modules / modules directory not included in the Zaptel 
+distribution, use the optional variables MODULES_EXTRA and
+SUBDIRS_EXTRA:
+
+  make MODULES_EXTRA="mod1 mod2 subdir1/ subdir2/"
+
+Note that those names are not guaranteed to continue to work on newer
+versions (in fact, it is slightly different on 1.4). Hopefully there will 
+be no need for such extra configuration.
+
+Partial Build/Install
+^^^^^^^^^^^^^^^~~~~~~
+There are some make targets that are provided to build or install just
+parts of Zaptel:
+
+. Build targets:
+  - make modules: build just the kernel modules.
+  - make programs: Build just the Zaptel userspace programs. partial 
+    targets of it:
+    * make 'utilname': builds 'utilname' alone (e.g: `make ztdiag`)
+    * make utils: Build libtonezone.
+    * make libs: Build libtonezone.
+. Install targets:
+  - make install-modules: install just kernel modules.
+  - make firmware: download and install firmwares for Digium cards
+  - make install-programs: Userspace: Partial targets of it are:
+    * make install-utils: install Zaptel userspace programs and
+      and basic support files.
+    * make install-libs: install libtonezone
+    * make install-include: install zaptel.h
+  - make config: should be run once to configure 
+
+Building to a Subtree
+^^^^^^^^^^^^^^^^^^^^^
+The following may be useful when testing the package or when preparing a
+package for a binary distribution (such as an rpm package) installing
+onto a subtree rather than on th real system. 
+
+  make install DESTDIR=targetdir
+
+This can be useful for any partial install target of the above (e.g:
+install-modules or install-programs).
+
+the targetdir must be an absolute path, at least if you install the
+modules. To install to a relative path you can use something like:
+
+  make install-modules DESTDIR=$PWD/target
+
+The 'install' target might fail if run as a user to a DESTDIR when
+attempting to generate device files. In that case, try:
+
+  make install DESTDIR=$PWD/target DYNFS=
+
 zaptel.conf
 ~~~~~~~~~~~
 The main method to configure Zaptel devices is using the utility
@@ -281,8 +338,8 @@
 generated, and ditto for spans.
 
 
-PROCFS Interface: /proc/zap
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+PROCFS Interface: /proc/zaptel
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 A simple way to get the current list of spans and channels each span
 contains is the files under /proc/zaptel . /proc/zaptel is generated by
 zaptel as it loads. As each span registers to Zaptel, a file under
@@ -295,8 +352,27 @@
 The title line shows the number of the span, its name and title, and 
 (potentially) the alarms in which it is.
 
+The title shows the span number and name, followed by any allarms the
+span may have: For example, here is the first span in my system (with no
+alarms):
+
+  Span 1: XBUS-00/XPD-00 "Xorcom XPD #0/0: FXS"
+
 The channel line for each channel shows its channel number, name and the
-actual signalling assigned to it through ztcfg.
+actual signalling assigned to it through ztcfg. Before being configured
+by ztcfg: This is Zaptel channel 2, whose name is 'XPP_FXS/0/0/1'.
+
+           2 XPP_FXS/0/0/1
+
+After being configured by ztcfg: the signalling 'FXOLS' was added. FXS
+channels have FXO signalling and vice versa:
+
+           2 XPP_FXS/0/0/1 FXOLS
+
+If the channel is in use (typically opened by Asterisk) then you will
+see an extra '(In use)':
+
+           2 XPP_FXS/0/0/1 FXOLS (In use)
 
 
 What is the license for the zaptel driver?




More information about the zaptel-commits mailing list