File fix-FHS.dpatch.diff of Package xindy

--- xindy-2.4~pre1.orig/debian/patches/fix-FHS.dpatch
+++ xindy-2.4~pre1/debian/patches/fix-FHS.dpatch
@@ -0,0 +1,151 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-FHS.dpatch by Jörg Sommer <joerg@alea.gnuu.de>
+##
+## DP: All files below /usr/lib/xindy/modules/ are architecture independent
+## DP: and therefor need to be below /usr/share/ as forced by the FHS.
+
+@DPATCH@
+diff -urNad xindy-2.2-beta2~/make-rules/alphabets/Makefile.in xindy-2.2-beta2/make-rules/alphabets/Makefile.in
+--- xindy-2.2-beta2~/make-rules/alphabets/Makefile.in	2006-04-18 01:29:21.443791000 +0200
++++ xindy-2.2-beta2/make-rules/alphabets/Makefile.in	2006-04-18 01:30:02.199791000 +0200
+@@ -251,7 +251,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-langdir = $(pkglibdir)/modules/lang
++langdir = $(pkgdatadir)/lang
+ albaniandir = $(langdir)/albanian
+ ALBANIAN = \
+ 	albanian/latin1-lang.xdy \
+diff -urNad xindy-2.2-beta2~/make-rules/inputenc/Makefile.in xindy-2.2-beta2/make-rules/inputenc/Makefile.in
+--- xindy-2.2-beta2~/make-rules/inputenc/Makefile.in	2006-04-18 01:29:21.447791000 +0200
++++ xindy-2.2-beta2/make-rules/inputenc/Makefile.in	2006-04-18 01:30:02.187791000 +0200
+@@ -155,7 +155,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-modulesdir = $(pkglibdir)/modules
++modulesdir = $(pkgdatadir)
+ inputencdir = $(modulesdir)/tex/inputenc
+ INPUTENCS = \
+ 	cp1250.xdy \
+diff -urNad xindy-2.2-beta2~/make-rules/styles/Makefile.in xindy-2.2-beta2/make-rules/styles/Makefile.in
+--- xindy-2.2-beta2~/make-rules/styles/Makefile.in	2005-09-29 17:30:44.000000000 +0200
++++ xindy-2.2-beta2/make-rules/styles/Makefile.in	2006-04-18 01:30:02.191791000 +0200
+@@ -155,7 +155,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-modulesdir = $(pkglibdir)/modules
++modulesdir = $(pkgdatadir)
+ stylesdir = $(modulesdir)/styles
+ STYLES = \
+ 	example.xdy \
+diff -urNad xindy-2.2-beta2~/modules/base/Makefile.in xindy-2.2-beta2/modules/base/Makefile.in
+--- xindy-2.2-beta2~/modules/base/Makefile.in	2005-09-29 17:30:44.000000000 +0200
++++ xindy-2.2-beta2/modules/base/Makefile.in	2006-04-18 01:30:02.183791000 +0200
+@@ -155,7 +155,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-modulesdir = $(pkglibdir)/modules
++modulesdir = $(pkgdatadir)
+ basedir = $(modulesdir)/base
+ RULES = \
+ 	book-order.xdy \
+diff -urNad xindy-2.2-beta2~/modules/class/Makefile.in xindy-2.2-beta2/modules/class/Makefile.in
+--- xindy-2.2-beta2~/modules/class/Makefile.in	2005-09-29 17:30:44.000000000 +0200
++++ xindy-2.2-beta2/modules/class/Makefile.in	2006-04-18 01:30:02.179791000 +0200
+@@ -155,7 +155,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-modulesdir = $(pkglibdir)/modules
++modulesdir = $(pkgdatadir)
+ classdir = $(modulesdir)/class
+ RULES = \
+ 	pagenums.xdy
+diff -urNad xindy-2.2-beta2~/modules/lang/german/Makefile.in xindy-2.2-beta2/modules/lang/german/Makefile.in
+--- xindy-2.2-beta2~/modules/lang/german/Makefile.in	2005-09-29 17:30:44.000000000 +0200
++++ xindy-2.2-beta2/modules/lang/german/Makefile.in	2006-04-18 01:30:02.179791000 +0200
+@@ -155,7 +155,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-langdir = $(pkglibdir)/modules/lang
++langdir = $(pkgdatadir)/lang
+ germandir = $(langdir)/german
+ RULES = \
+ 	din5007.xdy \
+diff -urNad xindy-2.2-beta2~/modules/lang/latin/Makefile.in xindy-2.2-beta2/modules/lang/latin/Makefile.in
+--- xindy-2.2-beta2~/modules/lang/latin/Makefile.in	2005-09-29 17:30:44.000000000 +0200
++++ xindy-2.2-beta2/modules/lang/latin/Makefile.in	2006-04-18 01:30:02.183791000 +0200
+@@ -155,7 +155,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-langdir = $(pkglibdir)/modules/lang
++langdir = $(pkgdatadir)/lang
+ latindir = $(langdir)/latin
+ RULES = \
+ 	caseisrt.xdy \
+diff -urNad xindy-2.2-beta2~/modules/ord/Makefile.in xindy-2.2-beta2/modules/ord/Makefile.in
+--- xindy-2.2-beta2~/modules/ord/Makefile.in	2005-09-29 17:30:44.000000000 +0200
++++ xindy-2.2-beta2/modules/ord/Makefile.in	2006-04-18 01:30:02.187791000 +0200
+@@ -155,7 +155,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-modulesdir = $(pkglibdir)/modules
++modulesdir = $(pkgdatadir)
+ orddir = $(modulesdir)/ord
+ RULES = \
+ 	letorder.xdy
+diff -urNad xindy-2.2-beta2~/modules/rules/Makefile.in xindy-2.2-beta2/modules/rules/Makefile.in
+--- xindy-2.2-beta2~/modules/rules/Makefile.in	2005-09-29 17:30:44.000000000 +0200
++++ xindy-2.2-beta2/modules/rules/Makefile.in	2006-04-18 01:30:02.175791000 +0200
+@@ -155,7 +155,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-modulesdir = $(pkglibdir)/modules
++modulesdir = $(pkgdatadir)
+ rulesdir = $(modulesdir)/rules
+ RULES = \
+ 	isolatin1-exchange.xdy \
+diff --git a/modules/styles/Makefile.in b/modules/styles/Makefile.in
+index 8942131..7de4a85 100644
+--- a/modules/styles/Makefile.in
++++ b/modules/styles/Makefile.in
+@@ -156,7 +156,7 @@ sbindir = @sbindir@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-modulesdir = $(pkglibdir)/modules
++modulesdir = $(pkgdatadir)
+ texdir = $(modulesdir)/styles
+ RULES = basic.xdy makeidx.xdy
+ EXTRA_DIST = $(RULES)
+diff --git a/user-commands/xindy.in b/user-commands/xindy.in
+index ce77027..bf5956c 100644
+--- a/user-commands/xindy.in
++++ b/user-commands/xindy.in
+@@ -309,11 +309,13 @@ BEGIN {
+     }
+ 
+     # modules directory
+-    if ( -d "$cmd_dir/../modules" ) {	# /opt style
+-	$modules_dir = "$cmd_dir/../modules";
+-    } elsif ( -d "$lib_dir/modules" ) {	# /usr style
+-	$modules_dir = "$lib_dir/modules";
+-    } else {
++    $modules_dir = "/usr/share/xindy";
++    unless ( -d $modules_dir ) {
++    #if ( -d "$cmd_dir/../modules" ) {	# /opt style
++    #	$modules_dir = "$cmd_dir/../modules";
++    #} elsif ( -d "$lib_dir/modules" ) {	# /usr style
++    #	$modules_dir = "$lib_dir/modules";
++    #} else {
+ 	die "$cmd: Cannot locate xindy modules directory";
+     }
+ }