summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile22
-rw-r--r--README82
2 files changed, 90 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index f69df2c..b4efbca 100644
--- a/Makefile
+++ b/Makefile
@@ -170,6 +170,7 @@ ifneq (,$(INITRD_DIR))
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 @@ install: all devices install-modules install-libs firmware
@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 @@ else
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 @@ ifneq (,$(SELINUX_ENABLED))
/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 @@ config:
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))
diff --git a/README b/README
index 50e18f3..c9c04d3 100644
--- a/README
+++ b/README
@@ -167,6 +167,63 @@ make install
----------------------------------
+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 @@ with 1). The number of the channel is the lowest unused one when it is
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 @@ then a line for each channel of the span.
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?