1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
8 devel_ver = CVS-2010-05-01
10 thisapp = %{name}-%{devel_ver}-patched
12 groups = Networking/Tools
14 license = GPLv2+ and GPL+ and MIT and BSD and zlib
15 summary = Utilities for configuring an ISDN subsystem.
18 The isdn4k-utils package contains a collection of utilities needed
19 for configuring and running an ISDN subsystem.
22 source_dl = ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/
23 sources = %{thisapp}.tar.bz2
37 -D_FILE_OFFSET_BITS=64 \
41 # remove useless files
42 find -type d -name CVS | xargs rm -rf
45 rm -rf capi20 && mv capi20.new capi20
47 # Reconfigure the whole package
48 for i in */configure; do
50 autoreconf --force --install || exit 1
55 mv .config.rpm .config
56 sed -e "s/^CONFIG_BUILDX11=.*/#&/" -i .config
57 sed -e "s/^CONFIG_VBOX=.*/#&/" -i .config
58 sed -e "s/^CONFIG_XMONISDN=.*/#&/" -i .config
59 sed -e "s/^CONFIG_XISDNLOAD=.*/#&/" -i .config
60 echo "CONFIG_GENMAN=y" >> .config
61 echo "CONFIG_FAQ=y" >> .config
62 echo "CONFIG_FAQDIR='%{datadir}/doc/isdn4k-utils'" >> .config
63 echo "CONFIG_DATADIR='%{datadir}/isdn'" >> .config
64 echo "LIBDIR='%{libdir}'" >> .config
65 echo "CONFIG_FIRMWAREDIR='%{datadir}/isdn'" >> .config
66 echo "CONFIG_CARD_SBINDIR='%{sbindir}'" >> .config
67 sed -e "s,',,g" .config > .config.h
73 make CFLAGS="%{CFLAGS}"
77 mkdir -pv %{BUILDROOT}/usr/sbin
78 make install CFLAGS="%{CFLAGS}" LIBDIR="%{libdir}" DESTDIR="%{BUILDROOT}"
80 # Install config files for capi.
81 mkdir -pv %{BUILDROOT}/etc
82 install -m 644 capiinit/capi.conf %{BUILDROOT}/etc
83 install -m 644 %{DIR_SOURCE}/capi20.conf %{BUILDROOT}/etc
85 # Install ipppd configuration files.
86 mkdir -pv %{BUILDROOT}/etc/ppp
87 touch %{BUILDROOT}/etc/ppp/ioptions
93 prerequires += systemd-units
106 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
110 /bin/systemctl --no-reload disable capi.service isdn.service >/dev/null 2>&1 || :
111 /bin/systemctl stop capi.service isdn.service >/dev/null 2>&1 || :
115 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
119 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
120 /bin/systemctl try-restart capi.service isdn.service >/dev/null 2>&1 || :
124 package %{name}-devel
128 package %{name}-debuginfo