[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[DebianGIS] Ruby mapscript



Dear list,

 This is my first post in this list.
 It is great for all Debian-GIS activity! I use many package related GIS.
I'm very thankful for maintainers and developers  effort.
 So there are Mapserver mapscript pkgs available for Python, Perl and PHP, 
but no pkg for Ruby. Is there any problem or special reason 
for preventing Ruby mapscript?  Or is any plan for packaging? 

 Recently I tried to make Ruby mapscript package based on Mapserver
4.8.3-2 src pkg. I hope it will be available from official repositry.  
I attached diff for my work. It works fine with me, but I have not few 
experience with debian packaging work. If anyone have interest, 
please check and try it.  I refferd Debian Ruby Policy.
*http://pkg-ruby.alioth.debian.org/ruby-policy.html/index.html

 If more ruby packages (ex. bindings for geos, gdal, shapelib...) 
are available in Debian, it would be more great, I think. 
Have anyone worked with it? 

Best regards,

  Akio Takubo
   from Tokyo, Japan


diff -ruN mapserver-4.8.3.orig/debian/control mapserver-4.8.3/debian/control
--- mapserver-4.8.3.orig/debian/control	2006-05-29 01:02:46.000000000 +0900
+++ mapserver-4.8.3/debian/control	2006-05-29 00:27:16.000000000 +0900
@@ -4,7 +4,7 @@
 Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
 Uploaders: Thomas Sondag <thomas@microdop.org>, Schuyler Erle <schuyler@nocat.net>, Petter Reinholdtsen <pere@debian.org>, Paul Wise <pabs3@bonedaddy.net>
 Standards-Version: 3.6.2
-Build-Depends: debhelper (>= 4), dpatch, libcurl3-gnutls-dev | libcurl3-dev, libpng12-dev, zlib1g-dev (>= 1.1.4), libgd2-xpm-dev (>= 2.0.1-10), libfreetype6-dev (>=2.0.9), libjpeg62-dev, libgdal1-1.3.1-dev, proj, libwww-dev, postgresql-dev (>= 7.3.3-1), php4-dev, php5-dev, swig, python-dev, libgeos-dev
+Build-Depends: debhelper (>= 4), dpatch, libcurl3-gnutls-dev | libcurl3-dev, libpng12-dev, zlib1g-dev (>= 1.1.4), libgd2-xpm-dev (>= 2.0.1-10), libfreetype6-dev (>=2.0.9), libjpeg62-dev, libgdal1-1.3.1-dev, proj, libwww-dev, postgresql-dev (>= 7.3.3-1), php4-dev, php5-dev, swig, python-dev, libgeos-dev, ruby1.8, ruby1.8-dev
 Build-Depends-Indep: python-docutils
 Build-Conflicts: libcurl3-openssl-dev
 
@@ -105,3 +105,13 @@
  Mapserver template language, WFS, WMS, WCS  are provided by cgi-mapserver.
  .
   Homepage: http://mapserver.gis.umn.edu/docs
+
+Package: libmapscript-ruby1.8
+Section: web
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: mapserver-bin, mapserver-doc
+Description: ruby mapserver lib
+ ruby mapscript allows you to use the mapserver functionalities
+ with ruby scripting language.
+
diff -ruN mapserver-4.8.3.orig/debian/patches/00list mapserver-4.8.3/debian/patches/00list
--- mapserver-4.8.3.orig/debian/patches/00list	2006-05-29 01:02:46.000000000 +0900
+++ mapserver-4.8.3/debian/patches/00list	2006-05-28 06:45:05.000000000 +0900
@@ -1,3 +1,4 @@
 20_php_build
+30_ruby_conf
 50_clean
 70_ptrreturn
diff -ruN mapserver-4.8.3.orig/debian/patches/30_ruby_conf.dpatch mapserver-4.8.3/debian/patches/30_ruby_conf.dpatch
--- mapserver-4.8.3.orig/debian/patches/30_ruby_conf.dpatch	1970-01-01 09:00:00.000000000 +0900
+++ mapserver-4.8.3/debian/patches/30_ruby_conf.dpatch	2006-05-28 06:43:32.000000000 +0900
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30_ruby_conf.dpatch by  <takubo@saruga-tondara.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad mapserver-4.8.3~/mapscript/ruby/extconf.rb mapserver-4.8.3/mapscript/ruby/extconf.rb
+--- mapserver-4.8.3~/mapscript/ruby/extconf.rb	2005-11-23 06:49:22.000000000 +0900
++++ mapserver-4.8.3/mapscript/ruby/extconf.rb	2006-05-28 06:43:05.000000000 +0900
+@@ -16,8 +16,8 @@
+ $LOCAL_LIBS += " -L../.. " + make_libs + " " + make_static_libs
+ 
+ # variable overwritten this directories have to been included with '-idirafter' (not '-I')
+-$topdir = "."
+-$hdrdir = "."
++#$topdir = "."
++#$hdrdir = "."
+ 
+ # if the source file 'mapscript_wrap.c' is missing nothing works
+ # this is a workaround !!
diff -ruN mapserver-4.8.3.orig/debian/rules mapserver-4.8.3/debian/rules
--- mapserver-4.8.3.orig/debian/rules	2006-05-29 01:02:46.000000000 +0900
+++ mapserver-4.8.3/debian/rules	2006-05-28 09:20:33.000000000 +0900
@@ -21,6 +21,7 @@
 PHP4DIR=$(shell php-config4 --extension-dir)
 PHP5API=$(shell php-config5 --phpapi)
 PHP5DIR=$(shell php-config5 --extension-dir)
+RUBY=ruby1.8
 
 # Configure config :
 # Not using non free libpdf
@@ -121,6 +122,11 @@
 	cd $(CURDIR)/mapscript/python && \
 		$(PYTHON) setup.py build
 
+	# Build ruby mapscript
+	cd $(CURDIR)/mapscript/ruby && \
+		$(RUBY) extconf.rb \
+		&& $(MAKE)
+
 	touch build-arch-stamp
 
 build-php4-stamp: configure-php4-stamp
@@ -149,11 +155,14 @@
 	-$(MAKE) mapscriptvars || touch mapscriptvars
 	-cd mapscript/perl && $(MAKE) distclean
 	-cd mapscript/python && $(PYTHON) setup.py clean --all
+	-cd mapscript/ruby && $(MAKE) distclean
 	-$(RM) mapscriptvars
 
 	-$(RM) mapscript/perl/mapscript.i \
 		mapscript/tcl/mapscript.i \
-		mapscript/python/mapscript.i
+		mapscript/python/mapscript.i \
+		mapscript/ruby/mapscript_wrap.c \
+		mapscript/ruby/mapscript.i
 
 	-$(MAKE) distclean
 
@@ -204,6 +213,10 @@
 			$(PYTHON) setup.py install \
 			--root=$(CURDIR)/debian/python-mapscript/
 
+	# Ruby mapscript
+	cd $(CURDIR)/mapscript/ruby && \
+	$(MAKE) install sitedir=$(CURDIR)/debian/libmapscript-ruby1.8/usr/lib/ruby
+
 	# Mapserver  Binary
 	install -m755 shp2mysql.pl legend scalebar shp2img shptree \
 		shptreetst shptreevis sortshp shp2pdf tile4ms \



Reply to: