-
+#
+# Conditional build:
%bcond_with capifax # capifax has some error and won't build right now
Summary: CAPI 2.0 libraries and configuration tools
Summary(pl.UTF-8): Biblioteki i narzędzia konfiguracyjne CAPI 2.0
Name: capi4k-utils
Version: 2005.07.18
-Release: 1
+Release: 4
License: GPL
Group: Applications/Communications
Source0: ftp://ftp.in-berlin.de/pub/capi4linux/%{name}-2005-07-18.tar.gz
# Source1-md5: 03739a0170eba14f03f7dc7ccc58bba8
Source10: capi.conf
Source11: capi.init
-Patch0: %{name}-make.patch
-Patch1: %{name}-amd64.patch
+Patch0: %{name}-include.patch
+Patch1: %{name}-make.patch
+Patch2: %{name}-msg2str_safety.patch
+Patch3: %{name}-ppd244.patch
+Patch4: %{name}-ppd245.patch
+Patch5: %{name}-rcapid.patch
+Patch6: %{name}-amd64.patch
URL: ftp://ftp.in-berlin.de/pub/capi4linux/
BuildRequires: libtool
BuildRequires: ppp-plugin-devel
UWAGA: To jest na razie BETA. Tylko do testów.
%package -n ppp-plugin-capi
-Summary: capiplugin for pppd-%{ppp_ver}
-Summary(pl.UTF-8): Wtyczka capi dla pppd w wersji %{ppp_ver}
+Summary: capiplugin for pppd
+Summary(pl.UTF-8): Wtyczka capi dla pppd
Group: Applications/Communications
Requires: %{name} = %{version}-%{release}
-Requires: ppp = 3:%{ppp_ver}
+Requires: ppp
%description -n ppp-plugin-capi
-capiplugin for pppd-%{ppp_ver}.
+capiplugin for pppd.
%description -n ppp-plugin-capi -l pl.UTF-8
-Wtyczka capi dla pppd w wersji %{ppp_ver}.
+Wtyczka capi dla pppd.
%prep
%setup -q -n %{name}
%patch0 -p1
-%if "%{_lib}" == "lib64"
%patch1 -p1
+%patch2 -p0
+%patch3 -p0
+%patch4 -p0
+%patch5 -p1
+%if "%{_lib}" == "lib64"
+%patch6 -p1
%endif
cat > .config << END
install -p %{SOURCE1} .
%build
-%{__make} subconfig
+%{__make} subconfig \
+ CC="%{__cc}"
+
%{__make} \
+ CC="%{__cc}"
PPPVERSIONS=%{ppp_ver}
%install
PPPVERSIONS=%{ppp_ver} \
DESTDIR=$RPM_BUILD_ROOT
+mv $RPM_BUILD_ROOT%{_libdir}/pppd/{%{ppp_ver},plugins}
+
# Firmware goes here - see LSB and kernel 2.6.x ISDN stuff
install -d $RPM_BUILD_ROOT%{_datadir}/isdn
install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/capi
# install capi startup script
-install -D %{SOURCE11} $RPM_BUILD_ROOT%{_initrddir}/capi
+install -D %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/capi
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/capiinfo
%attr(755,root,root) %{_sbindir}/capiinit
%attr(755,root,root) %{_sbindir}/avmcapictrl
+%ghost %{_libdir}/libcapi20.so.3
%attr(755,root,root) %{_libdir}/lib*.so.*.*
-%attr(754,root,root) %{_initrddir}/capi
+%attr(754,root,root) /etc/rc.d/init.d/capi
%{_mandir}/man8/capiinfo.8*
%{_mandir}/man8/avmcapictrl.8*
%dir %{_datadir}/isdn
%defattr(644,root,root,755)
%exclude %{_sysconfdir}/drdsl
%exclude %{_sysconfdir}/ppp
-%{_libdir}/pppd/%{ppp_ver}/*
+%{_libdir}/pppd/plugins/*
%{_mandir}/man8/capiplugin.8*