[ATrpms-users] DAHDI packages

Anthony Messina amessina at messinet.com
Mon Aug 18 18:19:12 CEST 2008


On Monday 18 August 2008 04:21:14 am Axel Thimm wrote:
> On Fri, Aug 15, 2008 at 04:15:11PM -0500, Anthony Messina wrote:
> > ASthe first tarballs for DAHDI, the Zaptel replacement, are being
> > released, are there any plans to have the rpms built at ATrpms?
>
> Yes, certainly. I'll try to get this done in the next days (unless
> someone beats me to it!)

Well, I've attached my spec file that builds successfully here.  It's a total 
joke compared to your spec files and doesn't include the kmdl-style build 
process.

It churns out a en empty dahdi package (for those that want everything), a 
dahdi-linux package (the kernel modules), a  dahdi-tools package, and a 
dahdi-firmware package.

Once Digium has an official (non release candidate) releas, I can clean it up 
a bit and get rid of the references to their less than ideal choice of 
numbering schemes. I'm also waiting to see how Fedora decides to name the 
packages.

The first round of RPMs are here: http://messinet.com/pub/fedora/9/x86_64/

-- 
Anthony -  http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
-------------- next part --------------
%bcond_without	fedora

%define dahdi_tools_version 2.0.0
%define dahdi_linux_version 2.0.0
%define dahdi_tools_release 0.1.rc1%{?dist}
%define dahdi_linux_release 0.1.rc2%{?dist}

Summary:	Digium Asterisk Hardware Device Interface (DAHDI) kernel modules, firmware and userspace tools.
Name:		dahdi
Version:	2.0.0.rc2+2.0.0.rc1
Release:	0.1%{?dist}
License:	GPL/LGPL
Group:		Applications/System
URL:		http://www.digium.com/
Vendor:		Digium, Inc.
Packager:	Messinet Secure Services <http://messinet.com/>

Source:		http://downloads.digium.com/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-%{dahdi_linux_version}-rc2+%{dahdi_tools_version}-rc1.tar.gz

Patch0:		dahdi-udevowner.patch

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

BuildRequires:	newt-devel
BuildRequires:	udev

Requires:	dahdi-firmware = %{dahdi_linux_version}-%{dahdi_linux_release}
Requires:	dahdi-linux-%(uname -r) = %{dahdi_linux_version}-%{dahdi_linux_release}
Requires:	dahdi-tools = %{dahdi_tools_version}-%{dahdi_tools_release}

%description
DAHDI stands for Digium Asterisk Hardware Device Interface. This meta-
package joins the DAHDI kernel modules, firmware and userspace tools.

%package firmware
Summary:	Digium Asterisk Hardware Device Interface (DAHDI) firmware.
Group:		System Environment/Kernel
Version:	%{dahdi_linux_version}
Release:	%{dahdi_linux_release}
Requires:	dahdi-linux-%(uname -r) = %{dahdi_linux_version}-%{dahdi_linux_release}
Requires:	dahdi-tools >= %{dahdi_tools_version}-%{dahdi_tools_release}

%description firmware
DAHDI stands for Digium Asterisk Hardware Device Interface. This
package contains DAHDI firmware.

%package linux-%(uname -r)
Summary:	Digium Asterisk Hardware Device Interface (DAHDI) kernel modules.
Group:		System Environment/Kernel
Version:	%{dahdi_linux_version}
Release:	%{dahdi_linux_release}
Requires:	dahdi-tools >= %{dahdi_tools_version}-%{dahdi_tools_release}
Provides:	dahdi-linux-%(uname -r) = %{dahdi_linux_version}-%{dahdi_linux_release}

%description linux-%(uname -r)
DAHDI stands for Digium Asterisk Hardware Device Interface. This
package contains the DAHDI kernel modules.

%package tools
Summary:	Digium Asterisk Hardware Device Interface (DAHDI) userspace tools.
Group:		Applications/System
Version:	%{dahdi_tools_version}
Release:	%{dahdi_tools_release}

BuildRequires:	fedora-usermgmt-devel
%{?FE_USERADD_REQ}

Provides:	dahdi-tools = %{dahdi_tools_version}-%{dahdi_tools_release}
Provides:	group(%username) = %uid
Provides:	user(%username)  = %uid

%description tools
DAHDI stands for Digium Asterisk Hardware Device Interface. This
package contains the userspace tools to configure the kernel modules
included in the dahdi-linux-complete-modules package.

%package devel
Summary:	Development files for DAHDI telephony interface tools
Group:		Development/Libraries
Requires:	dahdi-linux-%(uname -r) = %{dahdi_linux_version}-%{dahdi_linux_release}
Requires:	dahdi-tools = %{dahdi_tools_version}-%{dahdi_tools_release}

%description devel
DAHDI stands for Digium Asterisk Hardware Device Interface. This
package contains the DAHDI telephone interface development files.

%prep
%setup -q -n dahdi-linux-complete-%{dahdi_linux_version}-rc2+%{dahdi_tools_version}-rc1

%patch0 -p1

make all

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}/lib/firmware
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d

make install DESTDIR=%{buildroot}
make config DESTDIR=%{buildroot}

rm -f %{buildroot}%{_prefix}/lib/libtonezone.a
rm -f %{buildroot}/lib/modules/%(uname -r)/modules.*

%clean
rm -rf %{buildroot}

# %pre tools
# %__fe_groupadd %uid -r %username &>/dev/null || :
# %__fe_useradd  %uid -r -s /sbin/nologin -d %homedir -M \
# -c '%gecos' -g %username %username &>/dev/null || :

# Old fedora-usermgmt method
%pre tools
/usr/sbin/fedora-groupadd 46 -r dahdi &>/dev/null || :
/usr/sbin/fedora-useradd  46 -r -s /sbin/nologin -d / -M \
-c 'DAHDI Telephony' -g dahdi dahdi &>/dev/null || :

%post tools
/sbin/chkconfig --add dahdi

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

# %postun tools
# %__fe_userdel  %username &>/dev/null || :
# %__fe_groupdel %username &>/dev/null || :

# Old fedora-usermgmt method
%postun tools
test "$1" != 0 || /usr/sbin/fedora-userdel  dahdi &>/dev/null || :
test "$1" != 0 || /usr/sbin/fedora-groupdel dahdi &>/dev/null || :

%post linux-%(uname -r)
/sbin/ldconfig
/sbin/depmod -ae -F /boot/System.map-%(uname -r) %(uname -r) > /dev/null 2>&1 || :

%postun linux-%(uname -r)
/sbin/ldconfig
/sbin/depmod -ae -F /boot/System.map-%(uname -r) %(uname -r) > /dev/null 2>&1 || :

%files
%defattr(-,root,root,-)
%doc ChangeLog
%doc README

%files firmware
%defattr(-,root,root,-)
/lib/firmware/.dahdi-fw-oct6114-064-1.05.01
/lib/firmware/.dahdi-fw-oct6114-128-1.05.01
/lib/firmware/.dahdi-fw-tc400m-MR6.12
/lib/firmware/.dahdi-fw-vpmadt032-1.07
/lib/firmware/dahdi-fw-oct6114-064.bin
/lib/firmware/dahdi-fw-oct6114-128.bin
/lib/firmware/dahdi-fw-tc400m.bin
/lib/firmware/dahdi-fw-vpmadt032.bin

%files linux-%(uname -r)
%defattr(-,root,root,-)
%doc linux/ChangeLog
%doc linux/LICENSE
%doc linux/LICENSE.LGPL
%doc linux/README
%doc linux/UPGRADE.txt
/lib/modules/%(uname -r)/dahdi/dahdi_dummy.ko
/lib/modules/%(uname -r)/dahdi/dahdi_dynamic_eth.ko
/lib/modules/%(uname -r)/dahdi/dahdi_dynamic.ko
/lib/modules/%(uname -r)/dahdi/dahdi_dynamic_loc.ko
/lib/modules/%(uname -r)/dahdi/dahdi_echocan_jpah.ko
/lib/modules/%(uname -r)/dahdi/dahdi_echocan_kb1.ko
/lib/modules/%(uname -r)/dahdi/dahdi_echocan_mg2.ko
/lib/modules/%(uname -r)/dahdi/dahdi_echocan_sec2.ko
/lib/modules/%(uname -r)/dahdi/dahdi_echocan_sec.ko
/lib/modules/%(uname -r)/dahdi/dahdi.ko
/lib/modules/%(uname -r)/dahdi/pciradio.ko
/lib/modules/%(uname -r)/dahdi/tor2.ko
/lib/modules/%(uname -r)/dahdi/dahdi_transcode.ko
/lib/modules/%(uname -r)/dahdi/wcfxo.ko
/lib/modules/%(uname -r)/dahdi/wct1xxp.ko
/lib/modules/%(uname -r)/dahdi/wctdm.ko
/lib/modules/%(uname -r)/dahdi/wcte11xp.ko
/lib/modules/%(uname -r)/dahdi/wct4xxp/wct4xxp.ko
/lib/modules/%(uname -r)/dahdi/wctc4xxp/wctc4xxp.ko
/lib/modules/%(uname -r)/dahdi/wctdm24xxp/wctdm24xxp.ko
/lib/modules/%(uname -r)/dahdi/wcte12xp/wcte12xp.ko
/lib/modules/%(uname -r)/dahdi/xpp/xpd_fxo.ko
/lib/modules/%(uname -r)/dahdi/xpp/xpd_fxs.ko
/lib/modules/%(uname -r)/dahdi/xpp/xpd_pri.ko
/lib/modules/%(uname -r)/dahdi/xpp/xpp.ko
/lib/modules/%(uname -r)/dahdi/xpp/xpp_usb.ko

%files tools
%defattr(-,root,root,-)
%doc tools/ChangeLog
%doc tools/LICENSE
%doc tools/LICENSE.LGPL
%doc tools/README
%doc tools/UPGRADE.txt
%config(noreplace) %{_sysconfdir}/dahdi/init.conf
%config(noreplace) %{_sysconfdir}/dahdi/modules
%config(noreplace) %{_sysconfdir}/dahdi/system.conf
%config(noreplace) %{_sysconfdir}/modprobe.d/dahdi
%config(noreplace) %{_sysconfdir}/modprobe.d/dahdi.blacklist
%{_sysconfdir}/udev/rules.d/xpp.rules
%{_sysconfdir}/udev/rules.d/dahdi.rules
%{_sysconfdir}/sysconfig/network-scripts/ifup-hdlc
%{_sysconfdir}/hotplug/usb/xpp_fxloader
%{_sysconfdir}/hotplug/usb/xpp_fxloader.usermap

%{_initrddir}/dahdi

%dir %{_datadir}/dahdi
%{_datadir}/dahdi/xpp_fxloader

%{_prefix}/lib/libtonezone.so.1
%{_prefix}/lib/libtonezone.so.1.0
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Chans.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Config/GenconfDefaults.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Hardware.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Hardware/PCI.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Hardware/USB.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Span.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Utils.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Xpp.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Xpp/Line.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Xpp/Xbus.pm
%{_prefix}/local/lib/perl5/site_perl/5.10.0/Dahdi/Xpp/Xpd.pm

%{_sbindir}/dahdi_cfg
%{_sbindir}/dahdi_genconf
%{_sbindir}/dahdi_hardware
%{_sbindir}/dahdi_monitor
%{_sbindir}/dahdi_registration
%{_sbindir}/dahdi_scan
%{_sbindir}/dahdi_speed
%{_sbindir}/dahdi_test
%{_sbindir}/dahdi_tool
%{_sbindir}/fxotune
%{_sbindir}/genzaptelconf
%{_sbindir}/lsdahdi
%{_sbindir}/sethdlc
%{_sbindir}/xpp_blink
%{_sbindir}/xpp_sync

%{_mandir}/man8/dahdi_cfg.8*
%{_mandir}/man8/dahdi_genconf.8*
%{_mandir}/man8/dahdi_hardware.8*
%{_mandir}/man8/dahdi_monitor.8*
%{_mandir}/man8/dahdi_registration.8*
%{_mandir}/man8/dahdi_scan.8*
%{_mandir}/man8/dahdi_test.8*
%{_mandir}/man8/dahdi_tool.8*
%{_mandir}/man8/fxotune.8*
%{_mandir}/man8/genzaptelconf.8*
%{_mandir}/man8/lsdahdi.8*
%{_mandir}/man8/xpp_blink.8*
%{_mandir}/man8/xpp_sync.8*

%files devel
%defattr(-,root,root,-)
%doc ChangeLog
%doc tools/LICENSE
%doc tools/LICENSE.LGPL
%doc README
%doc tools/UPGRADE.txt
%dir %{_includedir}/dahdi
%{_includedir}/dahdi/fasthdlc.h
%{_includedir}/dahdi/kernel.h
%{_includedir}/dahdi/tonezone.h
%{_includedir}/dahdi/user.h
%{_includedir}/dahdi/wctdm_user.h
%{_prefix}/lib/libtonezone.so

%changelog
* Sat Aug 16 2008 Anthony Messina <amessina at messinet.com> - 2.0.0.rc2+2.0.0.rc1-0.1
- Initial build for Fedora 9 x86_64
- dahdi-linux-2.0.0-rc2, dahdi-tools-2.0.0-rc1
- Packaged as dahdi, dahdi-firmware, dahdi-linux-<kernel version> and dahdi-tools
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.atrpms.net/pipermail/atrpms-users/attachments/20080818/1c868189/attachment.bin 


More information about the atrpms-users mailing list