1 |
commit: 2b35772d8dea831cfdf0169ea6bbb43643c1565b |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 28 18:33:00 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 28 21:59:32 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b35772d |
7 |
|
8 |
net-dialup/capi4k-utils: use #!/sbin/openrc-run instead of #!/sbin/runscript |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/573846 |
11 |
|
12 |
Package-Manager: portage-2.2.26 |
13 |
|
14 |
.../capi4k-utils/capi4k-utils-20050718-r7.ebuild | 182 +++++++++++++++++++++ |
15 |
net-dialup/capi4k-utils/files/capi.initd | 4 +- |
16 |
2 files changed, 184 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/net-dialup/capi4k-utils/capi4k-utils-20050718-r7.ebuild b/net-dialup/capi4k-utils/capi4k-utils-20050718-r7.ebuild |
19 |
new file mode 100644 |
20 |
index 0000000..8616d37 |
21 |
--- /dev/null |
22 |
+++ b/net-dialup/capi4k-utils/capi4k-utils-20050718-r7.ebuild |
23 |
@@ -0,0 +1,182 @@ |
24 |
+# Copyright 1999-2016 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+# $Id$ |
27 |
+ |
28 |
+EAPI=5 |
29 |
+ |
30 |
+inherit eutils linux-info multilib versionator |
31 |
+ |
32 |
+YEAR_PV="${PV:0:4}" |
33 |
+MON_PV="${PV:4:2}" |
34 |
+DAY_PV="${PV:6:2}" |
35 |
+MY_P="${PN}-${YEAR_PV}-${MON_PV}-${DAY_PV}" |
36 |
+ |
37 |
+PATCHVER="5" |
38 |
+TARBALL_FILES="capi4k-files-${PV}-r${PATCHVER}.tar.xz" |
39 |
+TARBALL_PATCHES="capi4k-patches-${PV}-r${PATCHVER}.tar.xz" |
40 |
+ |
41 |
+DESCRIPTION="CAPI4Linux Utils" |
42 |
+HOMEPAGE="ftp://ftp.in-berlin.de/pub/capi4linux/" |
43 |
+SRC_URI="ftp://ftp.in-berlin.de/pub/capi4linux/${MY_P}.tar.gz |
44 |
+ ftp://ftp.in-berlin.de/pub/capi4linux/OLD/${MY_P}.tar.gz |
45 |
+ http://sbriesen.de/gentoo/distfiles/${TARBALL_FILES} |
46 |
+ http://sbriesen.de/gentoo/distfiles/${TARBALL_PATCHES}" |
47 |
+ |
48 |
+LICENSE="GPL-2" |
49 |
+SLOT="0/3.0.4" |
50 |
+KEYWORDS="alpha amd64 ppc x86" |
51 |
+IUSE="fax +pppd rcapid" |
52 |
+ |
53 |
+COMMON_DEP="pppd? ( net-dialup/ppp:= )" |
54 |
+ |
55 |
+DEPEND="${COMMON_DEP} |
56 |
+ virtual/linux-sources |
57 |
+ virtual/os-headers |
58 |
+ app-arch/xz-utils |
59 |
+ >=sys-apps/sed-4" |
60 |
+ |
61 |
+RDEPEND="${COMMON_DEP} |
62 |
+ dev-lang/perl" |
63 |
+ |
64 |
+S="${WORKDIR}/${PN}" |
65 |
+ |
66 |
+pkg_setup() { |
67 |
+ # check kernel config |
68 |
+ CONFIG_CHECK="~ISDN ~ISDN_CAPI ~ISDN_CAPI_CAPI20" |
69 |
+ use pppd && CONFIG_CHECK="${CONFIG_CHECK} ~ISDN_CAPI_MIDDLEWARE ~ISDN_CAPI_CAPIFS_BOOL" |
70 |
+ get_version # config checked later in pkg_postinst |
71 |
+ |
72 |
+ # find installed pppd version |
73 |
+ if use pppd; then |
74 |
+ local INSTALLED_PPP="$(best_version net-dialup/ppp)" |
75 |
+ PPPVERSION="${INSTALLED_PPP#net-dialup/ppp-}" |
76 |
+ PPPVERSION="$(version_format_string '$1.$2.$3' ${PPPVERSION})" |
77 |
+ if [ -z "${PPPVERSION}" ]; then |
78 |
+ die "No pppd installation found" |
79 |
+ fi |
80 |
+ fi |
81 |
+} |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ # add ppp-2.4.4 support |
85 |
+ epatch "${WORKDIR}/capi4k-patches/pppd244.diff" |
86 |
+ |
87 |
+ # add ppp-2.4.5 support |
88 |
+ epatch "${WORKDIR}/capi4k-patches/pppd245.diff" |
89 |
+ |
90 |
+ # apply rcapid patches |
91 |
+ epatch "${WORKDIR}/capi4k-patches/rcapid.diff" |
92 |
+ |
93 |
+ # apply msg2str-safety patch (see bug #170870) |
94 |
+ epatch "${WORKDIR}/capi4k-patches/msg2str-safety.diff" |
95 |
+ |
96 |
+ # apply capi20.h patches (needed for glibc-2.7) |
97 |
+ epatch "${WORKDIR}/capi4k-patches/capi20-include.diff" |
98 |
+ |
99 |
+ # set our config |
100 |
+ cp -f "${WORKDIR}/capi4k-files/config" .config |
101 |
+ # patch all Makefile.* and Rules.make to use our CFLAGS |
102 |
+ sed -i -e "s:^\(CFLAGS.*\)-O2:\1${CFLAGS}:g" */Makefile.* */Rules.make || die "sed failed" |
103 |
+ # patch capi20/Makefile.* to use -fPIC for shared library |
104 |
+ sed -i -e "s:^\(CFLAGS.*\):\1 -fPIC:g" capi20/Makefile.* || die "sed failed" |
105 |
+ # patch pppdcapiplugin/Makefile to use only the ppp versions we want |
106 |
+ sed -i -e "s:^\(PPPVERSIONS = \).*$:\1${PPPVERSION}:g" pppdcapiplugin/Makefile || die "sed failed" |
107 |
+ # patch capiinit/capiinit.c to look also in /lib/firmware |
108 |
+ sed -i -e "s:\(\"/lib/firmware/isdn\",\):\1 \"/lib/firmware\",:g" capiinit/capiinit.c || die "sed failed" |
109 |
+ # no, we don't need any devices nodes |
110 |
+ sed -i -e "s:\(sh scripts/makedev.sh\):echo \1:g" Makefile || die "sed failed" |
111 |
+ # add --libdir to configure call in Makefile |
112 |
+ sed -i -e "s:\(\./configure \):\1--libdir=/usr/$(get_libdir) :g" Makefile || die "sed failed" |
113 |
+ # patch /usr/lib/pppd in pppdcapiplugin tree |
114 |
+ sed -i -e "s:/usr/lib/pppd:/usr/$(get_libdir)/pppd:g" \ |
115 |
+ pppdcapiplugin/ppp-*/Makefile pppdcapiplugin/{README,*.8} || die "sed failed" |
116 |
+ # respecting LDFLAGS (see bug #293209) |
117 |
+ sed -i -e "s:^LDFLAGS\s\(\s*\)=:LDFLAGS+\1=:g" \ |
118 |
+ {capiinfo,capiinit,capifax,rcapid,avmb1}/Makefile* pppdcapiplugin/Rules.make || die |
119 |
+ # build rcapid |
120 |
+ if ! use rcapid; then |
121 |
+ sed -i -e "s:^\(CONFIG_RCAPID=.*\)$:# \1:g" .config || die |
122 |
+ fi |
123 |
+ # build pppdcapiplugin |
124 |
+ if use pppd; then |
125 |
+ # workaround for bug #511800 |
126 |
+ if has_version \>=net-dialup/ppp-2.4.6; then |
127 |
+ pushd pppdcapiplugin &>/dev/null || die |
128 |
+ mv ppp-2.4.5 "ppp-${PPPVERSION}" || die |
129 |
+ popd &>/dev/null |
130 |
+ fi |
131 |
+ else |
132 |
+ sed -i -e "s:^\(CONFIG_PPPDCAPIPLUGIN=.*\)$:# \1:g" .config || die |
133 |
+ fi |
134 |
+ # build capifax |
135 |
+ if ! use fax; then |
136 |
+ sed -i -e "s:^\(CONFIG_CAPIFAX=.*\)$:# \1:g" .config || die |
137 |
+ fi |
138 |
+ |
139 |
+ epatch_user |
140 |
+} |
141 |
+ |
142 |
+src_configure() { |
143 |
+ # bug 468662 - we NEED to redefine AR and CC both with tc-export and at compile phase |
144 |
+ tc-export AR CC |
145 |
+ emake subconfig |
146 |
+} |
147 |
+ |
148 |
+src_compile() { |
149 |
+ # bug 468662 - we NEED to redefine AR and CC both with tc-export and at compile phase |
150 |
+ emake AR="$(tc-getAR)" CC="$(tc-getCC)" |
151 |
+} |
152 |
+ |
153 |
+src_install() { |
154 |
+ default_src_install |
155 |
+ prune_libtool_files |
156 |
+ |
157 |
+ # install base |
158 |
+ dobin scripts/isdncause |
159 |
+ newinitd "${WORKDIR}/capi4k-files/capi.initd" capi |
160 |
+ newconfd "${WORKDIR}/capi4k-files/capi.confd" capi |
161 |
+ insinto /etc |
162 |
+ doins "${WORKDIR}/capi4k-files/capi.conf" |
163 |
+ dodoc "${WORKDIR}/capi4k-files/README.gentoo" scripts/makedev.sh |
164 |
+ |
165 |
+ # install rcapid stuff |
166 |
+ if use rcapid; then |
167 |
+ insinto /etc/xinetd.d |
168 |
+ newins "${WORKDIR}/capi4k-files/rcapid.xinetd" rcapid |
169 |
+ newdoc rcapid/README README.rcapid |
170 |
+ fi |
171 |
+ |
172 |
+ # install pppdcapiplugin stuff |
173 |
+ if use pppd; then |
174 |
+ insinto /etc/ppp/peers |
175 |
+ doins pppdcapiplugin/peers/t-dsl |
176 |
+ docinto pppdcapiplugin |
177 |
+ dodoc pppdcapiplugin/README pppdcapiplugin/examples/* |
178 |
+ # fixing permissions (see bug #136120) |
179 |
+ fperms 0644 /usr/share/man/man8/capiplugin.8 |
180 |
+ fi |
181 |
+} |
182 |
+ |
183 |
+pkg_postinst() { |
184 |
+ elog |
185 |
+ elog "Please read the instructions in README.gentoo in:" |
186 |
+ elog "/usr/share/doc/${PF}/" |
187 |
+ elog |
188 |
+ elog "Annotation for active AVM ISDN boards (B1 ISA/PCI, ...):" |
189 |
+ elog "If you run" |
190 |
+ elog " emerge isdn-firmware" |
191 |
+ elog "you will probably find your board's firmware in /lib/firmware." |
192 |
+ elog |
193 |
+ elog "If you have another active ISDN board, you should create" |
194 |
+ elog "/lib/firmware and copy there your board's firmware." |
195 |
+ elog |
196 |
+ ewarn "If you're upgrading from an older capi4k-utils, you must recompile" |
197 |
+ ewarn "the other packages on your system that link with libcapi after the" |
198 |
+ ewarn "upgrade completes. To perform this action, please run revdep-rebuild" |
199 |
+ ewarn "in package app-portage/gentoolkit." |
200 |
+ elog |
201 |
+ elog "If any of the following kernel configuration options is missing, you" |
202 |
+ elog "should reconfigure and rebuild your kernel before using capi4k-utils." |
203 |
+ linux-info_pkg_setup |
204 |
+ elog |
205 |
+} |
206 |
|
207 |
diff --git a/net-dialup/capi4k-utils/files/capi.initd b/net-dialup/capi4k-utils/files/capi.initd |
208 |
index 6ed5364..000d25e 100644 |
209 |
--- a/net-dialup/capi4k-utils/files/capi.initd |
210 |
+++ b/net-dialup/capi4k-utils/files/capi.initd |
211 |
@@ -1,5 +1,5 @@ |
212 |
-#!/sbin/runscript |
213 |
-# Copyright 1999-2008 Gentoo Foundation |
214 |
+#!/sbin/openrc-run |
215 |
+# Copyright 1999-2016 Gentoo Foundation |
216 |
# Distributed under the terms of the GNU General Public License v2 |
217 |
# $Id$ |