THRIFT-1421 Debian Packages can not be built
Patch: Brandon Arp
Fix: ruby build
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212324 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/contrib/debian/control b/contrib/debian/control
index e7cddef..1528b9d 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -2,9 +2,9 @@
Section: devel
Priority: extra
Build-Depends: debhelper (>= 5), build-essential, mono-gmcs, python-dev, ant,
- libmono-dev, libmono-system-web2.0-cil, erlang-base, ruby1.8-dev, autoconf, python-support,
+ mono-devel, libmono-system-web2.0-cil, erlang-base, ruby1.8-dev, mongrel, autoconf, python-support,
automake, pkg-config, libtool, bison, flex, libboost-dev | libboost1.40-dev, python-all,
- python-all-dev, python-all-dbg, ruby, openjdk-6-jdk | java-sdk, libcommons-lang-java,
+ python-all-dev, python-all-dbg, openjdk-6-jdk | java-sdk, libcommons-lang-java,
libboost-test-dev | libboost-test1.40-dev, libevent-dev, perl (>= 5.8.0-7),
php5, php5-dev, libglib2.0-dev
Maintainer: Thrift Developer's <dev@thrift.apache.org>
@@ -54,10 +54,13 @@
definition to Python classes, and then the modules in this package will allow
you to use those classes in your programs.
-Package: libthrift-ruby
-Architecture: any
+Package: ruby-thrift
+Architecture: all
Section: libs
-Depends: ${shlibs:Depends}, ${misc:Depends}, ruby1.8 (>= 1.8), ruby1.8 (<< 1.9)
+Depends: ruby | ruby-interpreter, ${shlibs:Depends}, ${misc:Depends}
+Provides: libthrift-ruby
+Replaces: libthrift-ruby
+Breaks: libthrift-ruby
Description: Ruby bindings for Thrift
Thrift is a software framework for scalable cross-language services
development. It combines a software stack with a code generation engine to
diff --git a/contrib/debian/rules b/contrib/debian/rules
index 4a552d0..8995f9c 100755
--- a/contrib/debian/rules
+++ b/contrib/debian/rules
@@ -72,6 +72,9 @@
# C#
$(MAKE) -C $(CURDIR)/lib/csharp
+ # Ruby
+ $(MAKE) -C $(CURDIR)/lib/rb
+
# Perl
$(MAKE) -C $(CURDIR)/lib/perl INSTALLDIRS=vendor
@@ -103,6 +106,18 @@
cp $(CURDIR)/lib/java/build/libthrift*.jar \
$(CURDIR)/debian/libthrift-java/usr/share/java/
+ # Ruby
+ mkdir -p $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.8 && \
+ cp $(CURDIR)/lib/rb/lib/thrift.rb \
+ $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.8
+ cp -r $(CURDIR)/lib/rb/lib/thrift \
+ $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.8
+ mkdir -p $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.9.1 && \
+ cp $(CURDIR)/lib/rb/lib/thrift.rb \
+ $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.9.1
+ cp -r $(CURDIR)/lib/rb/lib/thrift \
+ $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.9.1
+
# C#
mkdir -p $(CURDIR)/debian/libthrift-cil/usr/lib/cli/thrift/ && \
cp $(CURDIR)/lib/csharp/Thrift.dll \
@@ -138,7 +153,7 @@
find $(CURDIR)/debian/python-thrift-dbg -name "*.pyc" -print0 | xargs -0 rm -f
find $(CURDIR)/debian/python-thrift-dbg -name "*.py" -print0 | xargs -0 rm -f
- find $(CURDIR)/debian/python-thrift-dbg -name "*.egg-info" -print0 | xargs -0 rm -f
+ find $(CURDIR)/debian/python-thrift-dbg -name "*.egg-info" -print0 | xargs -0 rm -rf
find $(CURDIR)/debian/python-thrift-dbg -depth -type d -empty -exec rmdir {} \;
# PHP