All pastes #126559 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-08-11 16:27 UTC
rendered paste body
--- obexftp.spec	2006-08-11 19:20:33 +0400
+++ obexftp	2006-08-11 20:26:01 +0400
@@ -1,6 +1,11 @@
 # -*- rpm-spec -*-
 # $Id: obexftp,v 1.14 2005/08/22 12:46:28 grigory Exp $
 
+%def_disable perl
+%def_disable python
+%def_disable ruby
+%def_enable tcl
+
 Summary: Access devices via ObexFTP e.g. Siemens Moblile Equipment
 Name: obexftp
 Version: 0.20
@@ -19,7 +24,19 @@
 Requires: lib%name = %version
 
 # Automatically added by buildreq on Fri May 30 2003
-BuildRequires: gcc-c++ glibc-devel-static libopenobex-devel libgsm-devel libbluez-devel libusb-devel python-devel perl-devel ruby libruby-devel tcl-devel
+BuildRequires: gcc-c++ glibc-devel-static libopenobex-devel libgsm-devel libbluez-devel libusb-devel
+%if_enabled perl
+BuildRequires: perl-devel
+%endif
+%if_enabled python
+BuildRequires: python-devel
+%endif
+%if_enabled ruby
+BuildRequires: ruby libruby-devel
+%endif
+%if_enabled tcl
+BuildRequires: tcl-devel
+%endif
 
 %package -n lib%name
 Summary: obexftp libraries
@@ -75,12 +92,13 @@
 %__autoreconf
 
 %configure \
-	--enable-bluetooth \
-	--enable-builddocs \
-	--enable-python \
-	--enable-tcl \
-	--enable-perl \
-	--enable-ruby
+    --enable-bluetooth \
+    --enable-builddocs \
+    %{subst_enable perl} \
+    %{subst_enable python} \
+    %{subst_enable tcl} \
+    %{subst_enable ruby} \
+    #
 
 %__make
 
@@ -95,6 +113,12 @@
 install -m 0755 -D apps/discovery %buildroot%_bindir/obexftp-discovery
 install -m 0644 -D doc/%name.1 %buildroot%_man1dir/%name.1
 
+%if_enabled tcl
+mkdir -p %buildroot%_tcllibdir
+ln -s ../`readlink %buildroot%_libdir/obexftp.so` %buildroot%_tcllibdir/obexftp.so
+LD_LIBRARY_PATH=%buildroot%_libdir %tea_makeindex -C %buildroot%_tcldatadir/obexftp
+%endif
+
 %files
 %doc AUTHORS ChangeLog NEWS README* THANKS TODO 
 %_bindir/*
@@ -102,6 +126,10 @@
 
 %files -n lib%name
 %_libdir/*.so.*
+%if_enabled tcl
+%_tcllibdir/*
+%_tcldatadir/*
+%endif
 
 %files devel
 %dir %_includedir/bfb
@@ -113,12 +141,16 @@
 %files devel-static
 %_libdir/*.a
 
-%files -n python-module-obexftp
-%python_sitelibdir/obexftp
-
+%if_enabled perl
 %files -n perl-obexftp
 %perl_vendor_archlib/*
 %perl_vendor_autolib/*
+%endif
+
+%if_enabled python
+%files -n python-module-obexftp
+%python_sitelibdir/obexftp
+%endif
 
 %changelog
 * Fri Aug 11 2006 Pavlov Konstantin <thresh@altlinux.ru> 0.20-alt0.9