improved init.d script
authorAlin Năstac <mrness@gentoo.org>
Thu, 6 Jan 2005 18:17:57 +0000 (18:17 +0000)
committerAlin Năstac <mrness@gentoo.org>
Thu, 6 Jan 2005 18:17:57 +0000 (18:17 +0000)
net-dialup/capi4k-utils/ChangeLog
net-dialup/capi4k-utils/Manifest
net-dialup/capi4k-utils/capi4k-utils-20041006-r3.ebuild
net-dialup/capi4k-utils/capi4k-utils-20041006-r4.ebuild
net-dialup/capi4k-utils/capi4k-utils-20041006-r5.ebuild [new file with mode: 0644]
net-dialup/capi4k-utils/files/20041006/capi.initd
net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r5 [new file with mode: 0644]

index e1990a20c284d1dbf2531b1bee0ce965b4742d19..71d1772ba88eb0aeb47a7241bb0b9162bed361b1 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for net-dialup/capi4k-utils
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.24 2004/12/23 20:57:46 mrness Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.25 2005/01/06 18:17:56 mrness Exp $
+
+*capi4k-utils-20041006-r5 (06 Jan 2005)
+
+  06 Jan 2005; Alin Nastac <mrness@gentoo.org> files/20041006/capi.initd,
+  +capi4k-utils-20041006-r5.ebuild:
+  Install an improved /etc/init.d/capi script (#76410).
 
 *capi4k-utils-20041006-r4 (23 Dec 2004)
 
index 51948bc9404ce691c78050c51acd88150816202e..2184392025eea97d6e63a705713b6da596757577 100644 (file)
@@ -1,25 +1,27 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
+MD5 1498f8b6c0b399a069b41c1a963a6226 capi4k-utils-20041006-r3.ebuild 3238
+MD5 9828ad1bf70322c228f7c56e6b9daab1 capi4k-utils-20041006-r5.ebuild 3738
+MD5 016c6cb21ab68060b9dffe7c55f8545d capi4k-utils-20041006-r4.ebuild 3738
+MD5 99100c326b27095f6e7907d18720cbc3 ChangeLog 4773
 MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
-MD5 d9f8efa555287b50181314e6ab7caa5c ChangeLog 4565
-MD5 0cbd50a0b8f76e4a8697ba30adeb0672 capi4k-utils-20041006-r3.ebuild 3238
-MD5 d97441e319d8b2582c310520726f501d capi4k-utils-20041006-r4.ebuild 3738
 MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r3 156
 MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r4 156
+MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r5 156
 MD5 e74f9b822b6f485ca6ff834c2699151a files/20041006/README.gentoo 1492
 MD5 f9d08e560e844f4556da1f58bb5513b4 files/20041006/capi.init 829
+MD5 fb9f9b4003d8d1647e23cf7b329386f6 files/20041006/capi.confd 424
+MD5 1954a92bd07c3e2dfcfe1d68d8a290d8 files/20041006/capi.initd 1297
 MD5 edc50538053b658093927f9fb28c3aff files/20041006/config 195
+MD5 fa4cf0be46c4a16a2ef6fd178ed54c01 files/20041006/capi.usermap 1504
 MD5 2fe94d2623c5b129780b72bacaf4a7bc files/20041006/rcapid.xinetd 236
 MD5 650c413593fe44524150e1365965cdb3 files/20041006/capi.blacklist 455
-MD5 fb9f9b4003d8d1647e23cf7b329386f6 files/20041006/capi.confd 424
 MD5 2ddf9c04a03949cb2301888586096bfe files/20041006/capi.hotplug 2435
-MD5 c5a549ccab638e5b694c2e57a13b1c84 files/20041006/capi.initd 1187
-MD5 fa4cf0be46c4a16a2ef6fd178ed54c01 files/20041006/capi.usermap 1504
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (GNU/Linux)
 
-iD8DBQFBy8+Gjtv59x0+BrURAhsqAKCIki/0LcjXManBasSFo5NZicqovACfat0B
-ThyH/4SiTpVjoW6mLUGFx2I=
-=EG/b
+iD8DBQFB3YDejiC39V7gKu0RAsuSAJ470fKy/Om12zRWQYxkUvy7J8sUnQCeOBX4
+tP4tcbyQ272FISN6I+O1ZoQ=
+=gqy+
 -----END PGP SIGNATURE-----
index e92883bfa07800798366564828f7e927cfaf3bff..abd7f0446cae283742bbbd1169e816867cf58e35 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/capi4k-utils-20041006-r3.ebuild,v 1.1 2004/11/27 13:25:29 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/capi4k-utils-20041006-r3.ebuild,v 1.2 2005/01/06 18:17:56 mrness Exp $
 
 inherit eutils
 
index ccb57351b75af1d496dd88528f060a48d04cb7bb..38b39b6ec2c7caff843134176088e1615b97ea7c 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/capi4k-utils-20041006-r4.ebuild,v 1.1 2004/12/23 20:57:46 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/capi4k-utils-20041006-r4.ebuild,v 1.2 2005/01/06 18:17:56 mrness Exp $
 
 inherit eutils
 
diff --git a/net-dialup/capi4k-utils/capi4k-utils-20041006-r5.ebuild b/net-dialup/capi4k-utils/capi4k-utils-20041006-r5.ebuild
new file mode 100644 (file)
index 0000000..a5a9a62
--- /dev/null
@@ -0,0 +1,118 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/capi4k-utils-20041006-r5.ebuild,v 1.1 2005/01/06 18:17:56 mrness Exp $
+
+inherit eutils
+
+YEAR_PV=${PV:0:4}
+MON_PV=${PV:4:2}
+DAY_PV=${PV:6:2}
+MY_P=${PN}-${YEAR_PV}-${MON_PV}-${DAY_PV}
+PPPVERSIONS="2.4.2 2.4.3"  # versions in portage
+
+DESCRIPTION="CAPI4Linux Utils"
+HOMEPAGE="ftp://ftp.in-berlin.de/pub/capi4linux/"
+SRC_URI="ftp://ftp.in-berlin.de/pub/capi4linux/${MY_P}.tar.gz
+       ftp://ftp.in-berlin.de/pub/capi4linux/OLD/${MY_P}.tar.gz
+       mirror://gentoo/${P}-patches.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
+DEPEND="virtual/linux-sources
+       dev-lang/perl
+       >=sys-apps/sed-4
+       virtual/os-headers
+       sys-devel/automake
+       sys-devel/autoconf
+       sys-devel/libtool"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+       unpack ${A} || die "failed to unpack sources"
+       cd ${S}
+       # set our config
+       cp -f ${FILESDIR}/${PV}/config .config
+       # fix the little odd bugs
+       EPATCH_OPTS="-p1"
+       epatch ${WORKDIR}/${PN}.diff ${WORKDIR}/ppp-2.4.3.diff || die "${PN} patch failed"
+       # patch includes of all *.c files
+       sed -i -e "s:linux/capi.h>$:linux/compiler.h>\n#include <linux/capi.h>:g" */*.c || die "sed failed"
+       # patch all Makefile.am and Rules.make to use our CFLAGS
+       sed -i -e "s:^CFLAGS\(.*\)-O2:CFLAGS\1${CFLAGS}:g" */Makefile.am */Rules.make || die "sed failed"
+       # patch capi20/Makefile.am to use -fPIC for shared library
+       sed -i -e "s:^\(libcapi20_la_CFLAGS = \):\1-fPIC :g" capi20/Makefile.am || die "sed failed"
+       # patch pppdcapiplugin/Makefile to use only the ppp versions we want
+       sed -i -e "s:^\(PPPVERSIONS = \).*$:\1${PPPVERSIONS}:g" pppdcapiplugin/Makefile || die "sed failed"
+       # patch capiinit/capiinit.c to look also in /lib/firmware
+       sed -i -e "/\"\/usr\/share\/isdn\"/i\"/lib/firmware\"," capiinit/capiinit.c || die "sed failed"
+}
+
+src_compile() {
+       # required by fPIC patch
+       cd ${S}/capi20 || die "capi20 directory not found"
+       ebegin "Updating autotools-generated files"
+       aclocal -I . || die "aclocal failed"
+       automake -a || die "automake failed"
+       autoconf || die "autoconf failed"
+       libtoolize -f -c || die "libtoolize failed"
+       eend $?
+       cd ${S}
+
+       emake subconfig || die "make subconfig failed"
+       emake || die "make failed"
+}
+
+src_install() {
+       dodir /dev
+       make DESTDIR=${D} install || die "make install failed"
+
+       # install docs
+       newdoc rcapid/README README.rcapid
+       newdoc pppdcapiplugin/README README.pppdcapiplugin
+       dodoc scripts/makedev.sh ${FILESDIR}/${PV}/README.gentoo
+       docinto pppdcapiplugin.examples; dodoc pppdcapiplugin/examples/*
+
+       # install init-script + init-config
+       dodir /etc/conf.d  # BUG: w/o newconfd failes
+       newinitd ${FILESDIR}/${PV}/capi.initd capi
+       newconfd ${FILESDIR}/${PV}/capi.confd capi
+
+       # install USB hotplug stuff
+       insinto /etc/hotplug/blacklist.d
+       newins ${FILESDIR}/${PV}/capi.blacklist capi
+       insinto /etc/hotplug/usb
+       newins ${FILESDIR}/${PV}/capi.usermap capi.usermap
+       exeinto /etc/hotplug/usb
+       newexe ${FILESDIR}/${PV}/capi.hotplug capi
+
+       # example config
+       insinto /etc
+       insopts -m 0600
+       doins capiinit/capi.conf
+
+       # rcapid config for xinetd
+       insinto /etc/xinetd.d
+       insopts -m 0644
+       newins ${FILESDIR}/${PV}/rcapid.xinetd rcapid
+
+       # very useful tool ;-)
+       dobin scripts/isdncause
+}
+
+pkg_postinst() {
+       einfo "Please read the instructions in:"
+       einfo "/usr/share/doc/${PF}/README.gentoo.gz"
+       einfo ""
+       einfo "Annotation for active AVM ISDN boards (B1 ISA/PCI, ...):"
+       einfo "If you run"
+       einfo "  emerge isdn-firmware"
+       einfo "you will probably find your board's firmware in /lib/firmware."
+       einfo ""
+       einfo "If you have another active ISDN board, you should create"
+       einfo "/lib/firmware and copy there your board's firmware."
+}
index 2339761abcd563e8707aa4c944d696063c8f0202..75d5d490581e977ca977f2c743b37042e8567239 100644 (file)
@@ -1,12 +1,12 @@
 #!/sbin/runscript
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/20041006/capi.initd,v 1.2 2004/12/24 08:12:43 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/20041006/capi.initd,v 1.3 2005/01/06 18:17:57 mrness Exp $
 
 opts="start stop info"
 
 depend() {
-       after isapnp
+       after coldplug isapnp
 }
 
 get_modules() {
@@ -25,7 +25,12 @@ start() {
        /sbin/modprobe -s kernelcapi
        /sbin/modprobe -s capi
        /sbin/modprobe -s capidrv
-       
+
+       CNT=0  # wait for udev
+       while [ ! -e /dev/capi20 -a $CNT -lt 10 ]; do
+               sleep 1; : $((CNT++))
+       done
+
        if /usr/sbin/capiinit activate ; then
                while read INFO; do einfo "  $INFO"; done < /proc/capi/controller
        fi
diff --git a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r5 b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r5
new file mode 100644 (file)
index 0000000..34abafb
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 54992ff362ca44629fdf59773a6864cd capi4k-utils-2004-10-06.tar.gz 743667
+MD5 74951d290e717c8bc87887f55ad3e0dd capi4k-utils-20041006-patches.tar.bz2 11674