Blob Blame History Raw
Summary: Tools and libraries for using/configuring/monitoring Zapata telephony interfaces
Name: zaptel
Version: 1.4.12.1
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://www.digium.com/
Source0: http://downloads.digium.com/pub/telephony/zaptel/releases/zaptel-%{version}.tar.gz
Patch0:  zaptel-1.4.10-udevzaptelowner.patch
Source1: menuselect.makedeps
Source2: menuselect.makeopts
Source3: zaptel.init

BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)

BuildRequires: newt-devel
BuildRequires: udev

Requires(pre): fedora-usermgmt

Requires(preun): /sbin/service
Requires(preun): /sbin/chkconfig

Requires(post): /sbin/chkconfig

Requires(postun): fedora-usermgmt

%description
Tools and libraries for using/configuring/monitoring Zapata telephony
interfaces.

%package lib
Summary:Library for using Zapata telephony interfaces
Group: Development/Libraries

%description lib
Library for using Zapata telephony interfaces.

%package utils
Summary: Tools for monitoring and testing Zapata telephony interfaces
Group: Development/Libraries
Requires: zaptel-lib = %{version}-%{release}

%description utils
Tools for monitoring and testing Zapata telephony interfaces.

%package devel
Summary: Development files for Zapata telephony interfaces
Group: Development/Libraries
Requires: zaptel-lib = %{version}-%{release}

%description devel
Development files for Zapata telephony interfaces.

%prep
%setup0 -q

%patch0 -p1

cp %{S:1} .
cp %{S:2} .
cp %{S:3} .

# convert some files to UTF-8
pushd doc
for f in zttool.8 ztcfg.8 ztmonitor.8
do
  iconv -f iso8859-1 -t utf-8 $f -o $f.tmp
  mv $f.tmp $f
done
popd

%build
pushd menuselect/mxml
%configure
popd

pushd menuselect
%configure
popd

%configure

make %{?_smp_mflags} programs

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_initrddir}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/network-scripts
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d
mkdir -p %{buildroot}%{_sysconfdir}/udev/permissions.d
mkdir -p %{buildroot}%{_mandir}/man8

make install-programs config DESTDIR=%{buildroot}

build_tools/genudevrules > %{buildroot}%{_sysconfdir}/udev/rules.d/zaptel.rules

for f in fxotune fxstest ztdiag ztmonitor ztscan ztspeed zttest zttool
do
  mv %{buildroot}/sbin/$f %{buildroot}%{_sbindir}/$f
done

rm -f %{buildroot}%{_libdir}/libtonezone.a

%clean
rm -rf %{buildroot}

%post 
/usr/sbin/fedora-groupadd 29 -r zaptel &>/dev/null || :
/usr/sbin/fedora-useradd  29 -r -s /sbin/nologin -d / -M          \
                               -c 'Zapata Telephony' -g zaptel zaptel &>/dev/null || :
/sbin/chkconfig --add zaptel

%preun
if [ $1 -eq 0 ]; then
    /sbin/service zaptel stop >/dev/null 2>&1
    /sbin/chkconfig --del zaptel
fi

%post lib -p /sbin/ldconfig

%postun lib -p /sbin/ldconfig

%files
%defattr(-,root,root,-)

%doc ChangeLog
%doc ifcfg-hdlc0
%doc LICENSE
%doc README
%doc README.fxotune
%doc README.fxsusb
%doc zaptel.conf.sample

%config(noreplace) %{_sysconfdir}/zaptel.conf
%config(noreplace) %{_sysconfdir}/sysconfig/zaptel
%config(noreplace) %{_sysconfdir}/udev/rules.d/zaptel.rules

%{_sysconfdir}/sysconfig/network-scripts/ifup-hdlc
/sbin/ztcfg
/sbin/sethdlc-new

%{_initrddir}/zaptel
%{_mandir}/man8/ztcfg.8*

%files lib
%defattr(-,root,root,-)
%{_libdir}/libtonezone.so.1
%{_libdir}/libtonezone.so.1.0

%files utils
%defattr(-,root,root,-)

%{_sbindir}/fxotune
%{_sbindir}/fxstest
%{_sbindir}/ztdiag
%{_sbindir}/ztmonitor
%{_sbindir}/ztscan
%{_sbindir}/ztspeed
%{_sbindir}/zttest
%{_sbindir}/zttool

%{_mandir}/man8/fxotune.8*
%{_mandir}/man8/fxstest.8*
%{_mandir}/man8/ztdiag.8*
%{_mandir}/man8/ztmonitor.8*
%{_mandir}/man8/ztscan.8*
%{_mandir}/man8/ztspeed.8*
%{_mandir}/man8/zttest.8*
%{_mandir}/man8/zttool.8*

%files devel
%defattr(-,root,root,-)
%doc LICENSE
%dir %{_includedir}/zaptel
%{_includedir}/zaptel/tonezone.h
%{_includedir}/zaptel/zaptel.h
%{_libdir}/libtonezone.so

%changelog
* Tue Sep  9 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.12.1-1
- Update to 1.4.12.1

* Thu Sep  4 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.12-1
- Update to 1.4.12

* Mon Aug 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.4.11-2
- Fix license tag.

* Wed May 28 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.11-1
- Update to 1.4.11

* Thu May  8 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.10.1-1
- Update to 1.4.10.1

* Wed Apr  9 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.10-1
- Update to 1.4.10

* Thu Feb 21 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.9-1
- Update to 1.4.9.

* Mon Feb 11 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.8-2
- Rebuild for GCC 4.3

* Mon Jan 14 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.8-1
- Update to 1.4.8

* Thu Dec 20 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.7.1-1
- Update to 1.4.7.1
- Drop upstreamed patch.

* Fri Nov  1 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.6-1
- Update to 1.4.6
- Apply patch to fix AST-2007-024

* Wed Apr 25 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.2.1-1
- Update to 1.4.2.1

* Mon Mar 26 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.1-4
- Own /usr/include/zaptel, fixes #233970.

* Fri Mar 23 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.1-3
- Really, really make it work without the kernel sources...

* Fri Mar 23 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.1-2
- Let's see if we can get this to build without the kernel sources present.

* Fri Mar 23 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.1-1
- Update to 1.4.1

* Sat Dec 23 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-9
- (Annoyed Grunt!)

* Sat Dec 23 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-8
- Don't package hdlc bits on FC <= 5

* Sat Dec 23 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-7
- Update to 1.4.0 final

* Fri Dec 15 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-5.beta3
- Update to 1.4.0-beta3
- Drop unnecessary patch

* Wed Oct 25 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-4.beta2
- Compile sethdlc and package related bits.
- Remove some readmes that aren't applicable to library/userland

* Wed Oct 18 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-3.beta2
- Update to 1.4.0-beta2

* Sun Oct 15 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-2.beta1
- Don't package firmware until license can be figured out.

* Fri Oct 13 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-1.beta1
- Remove "Provides: zaptel-kmod-common"
- Don't load modules in initscript (except for possibly ztdummy) - leave that up to udev/hotplug.
- Drop ifup-hdlc - it requires sethdlc which isn't available.
- Move utilities to %%{_sbindir} rather than /sbin.
- Split libtonezone off into a separate lib package.
- Use 'zaptel' user/group to own device files.
- Add patch to fix minor makefile bug.

* Wed Oct 11 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.4.0-0.beta1
- Update to 1.4.0-beta1

* Fri Jun  9 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.6-3
- Bump release and rebuild.

* Thu Apr 27 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.5-2
- Changed ownership of device nodes to "root" in udev rules file.
- Don't build sethdlc.

* Mon Mar 27 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.5-1
- Update to 1.2.5

* Wed Feb 15 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.4-1
- Update to 1.2.4

* Tue Jan 31 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.3-1
- Preserve timestamps when we install.
- Use custom init.d file that does all the fancy RH stuff.

* Mon Jan 30 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.3-1
- Update to 1.2.3.

* Mon Jan 23 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.2-3
- provide zaptel-kmod-common

* Wed Jan 18 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.2-2
- Bump release number.

* Wed Jan 18 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.2-1
- Update to 1.2.2.

* Fri Jan 13 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.1-2
- Devel subpackage needs to require main package.

* Wed Jan 11 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2.1-1
- Initial version for Fedora Extras