- New upstream version 0.3.0.

- Big patch no longer required (integrated with upstream).
- findlib < 1.2.1-3 known not to work with this.
- build/ -> _build/
- Re-enable documentation.
- Prevent *.o files from being distributed.
- Distribute *.cmx and *.mli files.
This commit is contained in:
Richard W.M. Jones 2008-04-30 09:03:51 +00:00
parent 9c250a4548
commit 567fe1d73c
4 changed files with 35 additions and 982 deletions

View File

@ -1 +1 @@
ocaml-gettext-0.2.0.tar.gz ocaml-gettext-0.3.0.tar.gz

View File

@ -1,965 +0,0 @@
diff -ur ocaml-gettext-0.2.0.orig/libgettext-camomile-ocaml/gettextCamomile.ml ocaml-gettext-0.2.0/libgettext-camomile-ocaml/gettextCamomile.ml
--- ocaml-gettext-0.2.0.orig/libgettext-camomile-ocaml/gettextCamomile.ml 2008-03-21 16:23:39.000000000 +0000
+++ ocaml-gettext-0.2.0/libgettext-camomile-ocaml/gettextCamomile.ml 2008-03-21 16:16:06.000000000 +0000
@@ -23,7 +23,8 @@
(**************************************************************************)
-open Camomile;;
+open CamomileLibrary;;
+open Default.Camomile;;
open GettextTypes;;
(** Charset module, that is derived directly from the camomile library. *)
diff -ur ocaml-gettext-0.2.0.orig/libgettext-ocaml/Makefile ocaml-gettext-0.2.0/libgettext-ocaml/Makefile
--- ocaml-gettext-0.2.0.orig/libgettext-ocaml/Makefile 2008-03-21 16:23:38.000000000 +0000
+++ ocaml-gettext-0.2.0/libgettext-ocaml/Makefile 2008-03-21 16:16:24.000000000 +0000
@@ -137,7 +137,15 @@
INSTALLIB += \
pr_gettext.cmo
-pr_gettext.cmo: REQUIRES=ast-analyze
+pr_gettext.cmo: pr_gettext.ml
+ ocamlc \
+ -I +camlp4 \
+ -I $(shell ocamlc -where)/camlp4/Camlp4Parsers \
+ -pp camlp4of.opt \
+ camlp4lib.cma \
+ gettextBase.cma \
+ gettextExtension.cma \
+ -c $< -o $@
include ../ConfMakefile
include ../TopMakefile
diff -ur ocaml-gettext-0.2.0.orig/libgettext-ocaml/META.in ocaml-gettext-0.2.0/libgettext-ocaml/META.in
--- ocaml-gettext-0.2.0.orig/libgettext-ocaml/META.in 2008-03-21 16:23:38.000000000 +0000
+++ ocaml-gettext-0.2.0/libgettext-ocaml/META.in 2008-03-21 13:26:10.000000000 +0000
@@ -41,6 +41,6 @@
package "extract" (
version = "@VERSION@"
- requires = "ast-analyze gettext.extension"
+ requires = "gettext.extension"
archive(byte) = "pr_gettext.cmo"
)
diff -ur ocaml-gettext-0.2.0.orig/libgettext-ocaml/pr_gettext.ml ocaml-gettext-0.2.0/libgettext-ocaml/pr_gettext.ml
--- ocaml-gettext-0.2.0.orig/libgettext-ocaml/pr_gettext.ml 2008-03-21 16:23:38.000000000 +0000
+++ ocaml-gettext-0.2.0/libgettext-ocaml/pr_gettext.ml 2008-03-21 17:19:54.000000000 +0000
@@ -24,6 +24,7 @@
(** Camlp4 dumper to extract strings.
@author Sylvain Le Gall
+ @author Richard W.M. Jones (translation to OCaml 3.10.X new camlp4)
*)
(* Extract the string which should be used for a gettext translation. Output a
@@ -48,163 +49,129 @@
fdcngettext _ domain singular plural _ _
*)
-open MLast;;
-open Format;;
-open GettextTypes;;
-open GettextPo;;
+open Format
+open GettextTypes
+open GettextPo
let default_textdomain = ref None
-;;
-let add_translation t loc singular plural domain =
- let location =
- let (pos1,_) = loc
+module Id = struct
+ (* name is printed with the -loaded-modules switch *)
+ let name = "pr_gettext"
+ (* cvs id's seem to be the preferred version string *)
+ let version = "$Id$"
+end
+
+module Make (Syntax : Camlp4.Sig.Camlp4Syntax)
+ : Camlp4.Sig.Printer(Syntax.Ast).S =
+struct
+ module Loc = Syntax.Loc
+ module Ast = Syntax.Ast
+
+ type t = po_content
+
+ let add_translation t loc singular plural domain =
+ let location = Loc.file_name loc, Loc.start_line loc in
+ let translation =
+ match plural with
+ Some plural -> ([location],PoPlural([singular],[plural],[[""];[""]]))
+ | None -> ([location],PoSingular([singular],[""]))
in
- (!Pcaml.input_file,pos1.Lexing.pos_lnum)
- in
- let translation =
- match plural with
- Some plural -> ([location],PoPlural([singular],[plural],[[""];[""]]))
- | None -> ([location],PoSingular([singular],[""]))
- in
- match domain with
- Some domain ->
- add_po_translation_domain domain t translation
- | None ->
- (
- match !default_textdomain with
- Some domain ->
- add_po_translation_domain domain t translation
- | None ->
- add_po_translation_no_domain t translation
- )
-;;
+ match domain with
+ Some domain ->
+ add_po_translation_domain domain t translation
+ | None ->
+ (
+ match !default_textdomain with
+ Some domain ->
+ add_po_translation_domain domain t translation
+ | None ->
+ add_po_translation_no_domain t translation
+ )
+
+ let output_translations ?output_file m =
+ let (fd,close_on_exit) =
+ match output_file with
+ Some f -> (open_out f,true)
+ | None -> (stdout,false)
+ in
+ Marshal.to_channel fd m [];
+ flush fd;
+ if close_on_exit then
+ close_out fd
+ else
+ ()
+
+ class visitor = object
+ inherit Ast.fold as super
+
+ val t = empty_po
+ method t = t
+
+ method expr = function
+ | <:expr@loc< s_ $str:singular$ >>
+ | <:expr@loc< f_ $str:singular$ >> ->
+ (* Add a singular / default domain string *)
+ let t = add_translation t loc singular None None in
+ {< t = t >}
+
+ | <:expr@loc< sn_ $str:singular$ $str:plural$ >>
+ | <:expr@loc< fn_ $str:singular$ $str:plural$ >> ->
+ (* Add a plural / default domain string *)
+ let t = add_translation t loc singular (Some plural) None in
+ {< t = t >}
+
+ | <:expr@loc< gettext $expr$ $str:singular$ >>
+ | <:expr@loc< fgettext $expr$ $str:singular$ >> ->
+ (* Add a singular / default domain string *)
+ let t = add_translation t loc singular None None in
+ {< t = t >}
+
+ | <:expr@loc< dgettext $expr$ $str:domain$ $str:singular$ >>
+ | <:expr@loc< fdgettext $expr$ $str:domain$ $str:singular$ >>
+ | <:expr@loc< dcgettext $expr$ $str:domain$ $str:singular$ >>
+ | <:expr@loc< fdcgettext $expr$ $str:domain$ $str:singular$ >> ->
+ (* Add a singular / defined domain string *)
+ let t = add_translation t loc singular (Some domain) None in
+ {< t = t >}
+
+ | <:expr@loc< nettext $expr$ $str:singular$ $str:plural$ >>
+ | <:expr@loc< fngettext $expr$ $str:singular$ $str:plural$ >> ->
+ (* Add a plural / default domain string *)
+ let t = add_translation t loc singular (Some plural) None in
+ {< t = t >}
+
+ | <:expr@loc< dgettext $expr$ $str:domain$ $str:singular$ $str:plural$ >>
+ | <:expr@loc< fdgettext $expr$ $str:domain$ $str:singular$ $str:plural$ >>
+ | <:expr@loc< dcgettext $expr$ $str:domain$ $str:singular$ $str:plural$ >>
+ | <:expr@loc< fdcgettext $expr$ $str:domain$ $str:singular$ $str:plural$ >> ->
+ (* Add a plural / defined domain string *)
+ let t = add_translation t loc singular (Some plural) (Some domain) in
+ {< t = t >}
-module AstGettextMatch =
- struct
- type t = po_content
-
- let s_functions = ref [ "s_"; "f_" ]
-
- let sn_functions = ref [ "sn_"; "fn_" ]
-
- let gettext_functions = ref [ "gettext"; "fgettext" ]
-
- let dgettext_functions = ref [ "dgettext"; "fdgettext"; "dcgettext"; "fdcgettext" ]
-
- let ngettext_functions = ref [ "ngettext"; "fngettext" ]
-
- let dngettext_functions = ref [ "dngettext"; "fdngettext"; "dcngettext"; "fdcngettext" ]
-
- (* Check if the given node belong to the given functions *)
- let is_like e functions =
- let function_name e =
- let rec check_module e =
- match e with
- ExAcc(_, ExUid(_, _), e) -> check_module e
- | ExUid(_, _) -> true
- | _ -> false
- in
- match e with
- ExLid(_, s) -> s
- | ExAcc(_, e, ExLid(_, s)) when check_module e -> s
- | _ -> raise Not_found
- in
- try
- List.mem (function_name e) !functions
- with Not_found ->
- false
-
- let id t x = t
- let ctyp = id
- let row_field = id
- let class_infos = id
- let patt = id
- let expr t e =
- match e with
- ExApp(_,
- e, ExStr(loc, singular)
- ) when is_like e s_functions ->
- (* Add a singular / default domain string *)
- add_translation t loc singular None None
- | ExApp(_,
- ExApp(_, e, _), ExStr(loc, singular)
- ) when is_like e gettext_functions ->
- (* Add a singular / default domain string *)
- add_translation t loc singular None None
- | ExApp(_,
- ExApp(_, e, ExStr(loc, singular)), ExStr(_, plural)
- ) when is_like e sn_functions ->
- (* Add a plural / default domain string *)
- add_translation t loc singular (Some plural) None
- | ExApp(_,
- ExApp(_, ExApp(_, e, _), ExStr(loc, singular)), ExStr(_, plural)
- ) when is_like e ngettext_functions ->
- (* Add a plural / default domain string *)
- add_translation t loc singular (Some plural) None
- | ExApp(_,
- ExApp(_, ExApp(_, e, _), ExStr(_, domain)), ExStr(loc, singular)
- ) when is_like e dgettext_functions ->
- (* Add a singular / defined domain string *)
- add_translation t loc singular None (Some domain)
- | ExApp(_,
- ExApp(_, ExApp(_, ExApp(_, e, _), ExStr(_, domain)), ExStr(loc, singular)), ExStr(_, plural)
- ) when is_like e dngettext_functions ->
- (* Add a plural / defined domain string *)
- add_translation t loc singular (Some plural) (Some domain)
- | _ ->
- t
-
- let module_type = id
- let sig_item = id
- let with_constr = id
- let module_expr = id
- let str_item = id
- let type_decl = id
- let class_type = id
- let class_sig_item = id
- let class_expr = id
- let class_str_item = id
- let interf = id
- let implem = id
+ | e -> super#expr e
end
-;;
-
-module AstGettext = Pr_ast_analyze.AstAnalyze(AstGettextMatch)
-;;
-
-let output_translations m =
- let (fd,close_on_exit) =
- match !Pcaml.output_file with
- Some f -> (open_out f,true)
- | None -> (stdout,false)
- in
- Marshal.to_channel fd m [];
- flush fd;
- if close_on_exit then
- close_out fd
- else
- ()
-;;
-
-let gettext_interf lst =
- output_translations (AstGettext.interf empty_po lst)
-;;
-
-let gettext_implem lst =
- output_translations (AstGettext.implem empty_po lst)
-;;
-
-(* Register Pcaml printer *)
+ (* Called on *.mli files. *)
+ (* This was in the old code, but AFAICS interfaces can never
+ * contain translatable strings (right??). So I've changed this
+ * to do nothing. - RWMJ 2008/03/21
+ *)
+ let print_interf ?input_file ?output_file _ = ()
+
+ (* Called on *.ml files. *)
+ let print_implem ?input_file ?output_file ast =
+ let visitor = (new visitor)#str_item in
+ let t = (visitor ast)#t in
+ output_translations ?output_file t
+end
-Pcaml.print_interf := gettext_interf
-;;
-
-Pcaml.print_implem := gettext_implem
-;;
+(* Register the new printer. *)
+module M = Camlp4.Register.OCamlPrinter(Id)(Make) ;;
+(* XXX How to do this?
Pcaml.add_option "-default-textdomain"
(Arg.String ( fun textdomain -> default_textdomain := Some textdomain ) )
"<textdomain> Defines the default textdomain"
;;
+*)
diff -ur ocaml-gettext-0.2.0.orig/ocaml-gettext/Makefile ocaml-gettext-0.2.0/ocaml-gettext/Makefile
--- ocaml-gettext-0.2.0.orig/ocaml-gettext/Makefile 2008-03-21 16:23:38.000000000 +0000
+++ ocaml-gettext-0.2.0/ocaml-gettext/Makefile 2008-03-21 17:03:54.000000000 +0000
@@ -60,19 +60,21 @@
all: ocaml-xgettext
install: ocaml-xgettext-install
-
+
uninstall: ocaml-xgettext-uninstall
-
+
+# mkcamlp4 is broken in 3.10
ocaml-xgettext: $(BUILDBIN)
- $(MKCAMLP4) \
- -I +camlp4 pa_o.cmo \
+ $(OCAMLC) \
+ -I +camlp4 camlp4lib.cma \
+ unix.cma \
`$(OCAMLFIND) query -r -predicates byte gettext.extract -i-format` \
`$(OCAMLFIND) query -r -predicates byte gettext.extract -a-format` \
`$(OCAMLFIND) query -r -predicates byte gettext.extract -o-format` \
+ Camlp4Bin.cmo \
-o $@
$(CP) $@ $(BUILDBIN)/
-
ocaml-xgettext-install:
$(CP) ocaml-xgettext $(BINDIR)/
diff -ur ocaml-gettext-0.2.0.orig/po/fr.po ocaml-gettext-0.2.0/po/fr.po
--- ocaml-gettext-0.2.0.orig/po/fr.po 2008-03-21 16:23:39.000000000 +0000
+++ ocaml-gettext-0.2.0/po/fr.po 2008-03-21 17:20:16.000000000 +0000
@@ -1,9 +1,3 @@
-# Ocaml-gettext catalog.
-# Copyright (C) 2005 by Sylvain Le Gall <sylvain@le-gall.net>.
-# This file is distributed under the same license as the ocaml-gettext package.
-# Author: Sylvain Le Gall <sylvain@le-gall.net> 2005.
-#
-#
msgid ""
msgstr ""
"Project-Id-Version: ocaml-gettext v0.1.1\n"
@@ -17,233 +11,135 @@
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n>1;"
-#: ../libgettext-ocaml/gettext.ml:286
+#: ../libgettext-ocaml/gettext.ml:314
msgid " Choose how to handle failure in ocaml-gettext. Default: %s."
-msgstr " Choisir la façon de traiter les erreurs dans ocaml-gettext. Défaut : %s."
+msgstr " Choisir la fa\25595\255on de traiter les erreurs dans ocaml-gettext. D\25595\2559faut : %s."
-#: ../libgettext-ocaml/gettext.ml:301
+#: ../libgettext-ocaml/gettext.ml:329
msgid " Disable the translation perform by ocaml-gettext. Default: enable."
-msgstr " Désactive la traduction faite par ocaml-gettext. Défaut : active."
+msgstr " D\25595\2559sactive la traduction faite par ocaml-gettext. D\25595\2559faut : active."
-#: ../ocaml-gettext/ocaml-gettext.ml:471
-msgid " Returns only the version string of ocaml-gettext."
-msgstr " Retourne uniquement la version de ocaml-gettext."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:462
-msgid " Returns version information on ocaml-gettext."
-msgstr " Retourne les informations sur la version de ocaml-gettext."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:490
-msgid "%s\n\nCommand: ocaml-gettext -action (%s) [options]\nWhen trying to guess language and textdomain from a \nMO file, the rules applied are: language.textdomain.mo\n\nOptions:"
-msgstr "%s"
-"\n\n"
-"Commande : ocaml-gettext -action (%s) [options]\n"
-"Lorsqu'on essaie de deviner la langue de le domaine à partir \n"
-"d'un fichier MO, les règles appliquées sont : langue.domaine.mo\n"
-"\n\n"
-"Options :"
-
-#: ../ocaml-gettext/ocaml-gettext.ml:292
-msgid "Action to execute. Default: none."
-msgstr "Action à exécuter. Défaut : aucune."
-
-#: ../libgettext-ocaml/gettext.ml:195
+#: ../libgettext-ocaml/gettext.ml:219
msgid "An empty entry has been encounter."
-msgstr "Une entrée vide a été trouvée."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:501
-msgid "An error occurs while processing."
-msgstr "Une erreur s'est produite lors du traitement."
+msgstr "Une entr\25595\2559e vide a \25595\2559t\25595\2559 trouv\25595\2559e."
-#: ../libgettext-ocaml/gettext.ml:167
+#: ../libgettext-ocaml/gettext.ml:191
msgid "Cannot find an approriate ocaml-gettext compiled file ( %s )."
-msgstr "Impossible de trouver un fichier ocaml-gettext compilé approprié ( %s )."
+msgstr "Impossible de trouver un fichier ocaml-gettext compil\25595\2559 appropri\25595\2559 ( %s )."
-#: ../libgettext-ocaml/gettext.ml:229
+#: ../libgettext-ocaml/gettext.ml:253
msgid "Cannot find string %S."
-msgstr "Impossible de trouver la chaîne %S."
+msgstr "Impossible de trouver la cha\25595\255ne %S."
-#: ../libgettext-ocaml/gettext.ml:214
+#: ../libgettext-ocaml/gettext.ml:238
msgid "Could not open file %s."
msgstr "Impossible d'ouvrir le fichier %s."
-#: ../libgettext-ocaml/gettext.ml:226
+#: ../libgettext-ocaml/gettext.ml:250
msgid "Error while merging two PO files: %S and %S cannot be merged."
-msgstr "Erreur lors de la fusion de 2 fichiers PO : %S et %S ne peuvent être fusionnés."
+msgstr "Erreur lors de la fusion de 2 fichiers PO : %S et %S ne peuvent \25595\255tre fusionn\25595\2559s."
-#: ../libgettext-ocaml/gettext.ml:220
+#: ../libgettext-ocaml/gettext.ml:244
msgid "Error while processing parsing of PO file, in msgid %S, %d index is out of bound."
-msgstr "Erreur lors du décodage du fichier PO, au niveau de msgid %S, l'indice %d est hors limite."
+msgstr "Erreur lors du d\25595\2559codage du fichier PO, au niveau de msgid %S, l'indice %d est hors limite."
-#: ../libgettext-ocaml/gettext.ml:217
+#: ../libgettext-ocaml/gettext.ml:241
msgid "Error while processing parsing of PO file: %S at %s."
-msgstr "Erreur lors du décodage du fichier PO : %S à %s."
+msgstr "Erreur lors du d\25595\2559codage du fichier PO : %S \25595\255 %s."
-#: ../libgettext-ocaml/gettext.ml:180
+#: ../libgettext-ocaml/gettext.ml:204
msgid "Error while processing parsing of content-type at %s: %S."
-msgstr "Erreur lors du décodage du champs content-type à %s : %S."
+msgstr "Erreur lors du d\25595\2559codage du champs content-type \25595\255 %s : %S."
-#: ../libgettext-ocaml/gettext.ml:172
+#: ../libgettext-ocaml/gettext.ml:196
msgid "Error while processing parsing of options at %s: %S."
-msgstr "Erreur lors du décodage des options à %s : %S."
+msgstr "Erreur lors du d\25595\2559codage des options \25595\255 %s : %S."
-#: ../libgettext-ocaml/gettext.ml:176
+#: ../libgettext-ocaml/gettext.ml:200
msgid "Error while processing parsing of plural at %s: %S."
-msgstr "Erreur lors du décodage de la forme plurielle à %s : %S."
+msgstr "Erreur lors du d\25595\2559codage de la forme plurielle \25595\255 %s : %S."
-#: ../libgettext-ocaml/gettext.ml:223
+#: ../libgettext-ocaml/gettext.ml:247
msgid "Error while trying to load PO file %s, file doesn't exist."
msgstr "Erreur lors du chargement du fichier PO %s, le fichier n'existe pas."
-#: ../ocaml-gettext/ocaml-gettext.ml:288
-msgid "Invalid action: %s."
-msgstr "Action invalide : %s."
-
-#: ../libgettext-ocaml/gettext.ml:192
+#: ../libgettext-ocaml/gettext.ml:216
msgid "Junk at the end of the plural form id %S: %s."
-msgstr "Caractères non utilisé à la fin de la forme plurielle %S : %s."
+msgstr "Caract\25595\2558res non utilis\25595\2559 \25595\255 la fin de la forme plurielle %S : %s."
-#: ../libgettext-ocaml/gettext.ml:184
+#: ../libgettext-ocaml/gettext.ml:208
msgid "MO file provided is not encoded following ocaml-gettext convention."
-msgstr "Le fichier MO fourni ne suit pas les règles de la librairie ocaml-gettext."
+msgstr "Le fichier MO fourni ne suit pas les r\25595\2558gles de la librairie ocaml-gettext."
-#: ../libgettext-ocaml/gettext.ml:197
+#: ../libgettext-ocaml/gettext.ml:221
msgid "Number of strings is negative."
-msgstr "Le nombre de chaîne de caractères est négatif."
+msgstr "Le nombre de cha\25595\255ne de caract\25595\2558res est n\25595\2559gatif."
-#: ../libgettext-ocaml/gettext.ml:170
+#: ../libgettext-ocaml/gettext.ml:194
msgid "Ocaml-gettext library is not initialized"
-msgstr "La librairie ocaml-gettext n'est pas initialisée."
+msgstr "La librairie ocaml-gettext n'est pas initialis\25595\2559e."
-#: ../libgettext-ocaml/gettext.ml:199
+#: ../libgettext-ocaml/gettext.ml:223
msgid "Offset of string table is out of bound ([%ld,%ld] should be in [%ld,%ld])."
-msgstr "Le décalage de la table de chaîne de caractère est hors limite ( [%ld,%ld] devrait être dans l'intervalle [%ld,%ld] )."
+msgstr "Le d\25595\2559calage de la table de cha\25595\255ne de caract\25595\2558re est hors limite ( [%ld,%ld] devrait \25595\255tre dans l'intervalle [%ld,%ld] )."
-#: ../libgettext-ocaml/gettext.ml:202
+#: ../libgettext-ocaml/gettext.ml:226
msgid "Offset of translation table is out of bound ([%ld,%ld] should be in [%ld,%dl])."
-msgstr "Le décalage de la table de chaîne de traduction est hors limite ( [%ld,%ld] devrait être dans l'intervalle [%ld,%ld] )."
+msgstr "Le d\25595\2559calage de la table de cha\25595\255ne de traduction est hors limite ( [%ld,%ld] devrait \25595\255tre dans l'intervalle [%ld,%ld] )."
-#: ../libgettext-ocaml/gettext.ml:208
+#: ../libgettext-ocaml/gettext.ml:232
msgid "Out of bound access when trying to find a string (%d < %d)."
-msgstr "Accès hors limite lors de la recherche d'une chaîne de caractère ( %d < %d )."
+msgstr "Acc\25595\2558s hors limite lors de la recherche d'une cha\25595\255ne de caract\25595\2558re ( %d < %d )."
-#: ../libgettext-ocaml/gettext.ml:211
+#: ../libgettext-ocaml/gettext.ml:235
msgid "Out of bound access when trying to find a translation (%d < %d)."
-msgstr "Accès hors limite lors de la recherche d'une traduction ( %d < %d )."
+msgstr "Acc\25595\2558s hors limite lors de la recherche d'une traduction ( %d < %d )."
-#: ../libgettext-ocaml/gettext.ml:159
+#: ../libgettext-ocaml/gettext.ml:183
msgid "Problem reading file %s: %s."
-msgstr "Problème lors de la lecture du fichier %s : %s."
+msgstr "Probl\25595\2558me lors de la lecture du fichier %s : %s."
-#: ../libgettext-ocaml/gettext.ml:161
+#: ../libgettext-ocaml/gettext.ml:185
msgid "Problem while extracting %s: command %S exits with code %d."
-msgstr "Problème lors de l'extraction %s : la commande %S s'est terminée avec le code de sortie %d."
+msgstr "Probl\25595\2558me lors de l'extraction %s : la commande %S s'est termin\25595\2559e avec le code de sortie %d."
-#: ../libgettext-ocaml/gettext.ml:164
+#: ../libgettext-ocaml/gettext.ml:188
msgid "Problem while extracting %s: command %S killed by signal %d."
-msgstr "Problème lors de l'extraction %s : la commande %S a été tuée avec le signal %d."
+msgstr "Probl\25595\2558me lors de l'extraction %s : la commande %S a \25595\2559t\25595\2559 tu\25595\2559e avec le signal %d."
-#: ../libgettext-ocaml/gettext.ml:205
+#: ../libgettext-ocaml/gettext.ml:229
msgid "Translation table and string table overlap ([%ld,%ld] and [%ld,%ld] have a non empty intersection)."
-msgstr "Les tables de traduction et de chaîne de caractères se recouvrent ( [%ld,%ld] et [%ld,%ld] ont une intersection non vide )."
+msgstr "Les tables de traduction et de cha\25595\255ne de caract\25595\2558res se recouvrent ( [%ld,%ld] et [%ld,%ld] ont une intersection non vide )."
-#: ../libgettext-ocaml/gettext.ml:186
+#: ../libgettext-ocaml/gettext.ml:210
msgid "Trying to fetch the plural form %d of a singular form %S."
-msgstr "Tentative de récupération de la forme plurielle %d d'une forme singulière %S."
+msgstr "Tentative de r\25595\2559cup\25595\2559ration de la forme plurielle %d d'une forme singuli\25595\2558re %S."
-#: ../libgettext-ocaml/gettext.ml:189
+#: ../libgettext-ocaml/gettext.ml:213
msgid "Trying to fetch the plural form %d of plural form %s."
-msgstr "Tentative de récupération de la forme plurielle %d de la forme plurielle %d."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:78
-msgid "You cannot specify a output filename and more than one \nfilename : all the compiled file will have the same output filename"
-msgstr "Vous ne pouvez pas spécifier un seul fichier de sortie et plus d'un \n nom de fichier en entrée : tous les fichiers compilés vont avoir le même nom de fichier de sortie."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:74
-msgid "You cannot specify at the same time a language, a textdomain \nand provide more than one file to install/uninstall : all files\nwill have the same destination filename."
-msgstr "Vous ne pouvez pas spécifier à la fois un langage, un domaine de texte et donner plus d'un fichier à installer/désinstaller : tous les fichiers vont avoir la même destination."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:69
-msgid "You must specify one action."
-msgstr "Vous devez spécifier une action."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:375
-msgid "category Category to use when installing a MO file. Default: %s."
-msgstr "categorie Catégorie à utiliser lors de de l'installation d'un fichier MO. Défaut : %s."
+msgstr "Tentative de r\25595\2559cup\25595\2559ration de la forme plurielle %d de la forme plurielle %d."
-#: ../ocaml-gettext/ocaml-gettext.ml:413
-msgid "category Category to use when uninstalling a MO file. Default: %s."
-msgstr "category Catégorie à utiliser lors de la désinstallation d'un fichier MO. Défaut : %s."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:301
-msgid "cmd Command to extract translatable strings from an OCaml source file. Default: %s."
-msgstr "cmd Commande pour extraire les chaînes de caractères traductibles d'un fichier source OCaml. Défaut : %s."
+#: ../libgettext-ocaml/gettext.ml:256
+msgid "Unable to parse the POSIX language environment variable %s"
+msgstr ""
-#: ../libgettext-ocaml/gettext.ml:361
+#: ../libgettext-ocaml/gettext.ml:389
msgid "codeset Set the default codeset for outputting string with ocaml-gettext. Default: %s."
-msgstr "codeset Défini le jeux de caractères à utiliser pour écrire les traductions. Défaut : %s."
+msgstr "codeset D\25595\2559fini le jeux de caract\25595\2558res \25595\255 utiliser pour \25595\2559crire les traductions. D\25595\2559faut : %s."
-#: ../libgettext-ocaml/gettext.ml:338
+#: ../libgettext-ocaml/gettext.ml:366
msgid "dir Add a search dir for ocaml-gettext files. Default: %s."
-msgstr "dir Ajoute une répertoire de recherche pour les fichiers ocaml-gettext. Défaut : %s."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:394
-msgid "dirname Base dir used when installing a MO file. Default: %s."
-msgstr "dir Répertoire de base à utiliser lors de l'installation d'un fichier MO. Défaut : %s."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:432
-msgid "dirname Base dir used when uninstalling a MO file. Default: %s."
-msgstr "dir Répertoire de base à utiliser lors de la désinstallation d'un fichier MO. Défaut : %s."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:452
-msgid "extension Backup extension to use when moving PO file which have been merged. Default: %s."
-msgstr "extension Extension à utiliser lors de la sauvegarde d'un fichier PO qui a été fusionné. Défaut : %s."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:357
-msgid "filename MO file to write when compiling a PO file. Default: name of the PO file with \\\".mo\\\" extension."
-msgstr "fichier Fichier MO à écrire lors de la compilation d'un fichier PO. Défaut : nom du fichier PO avec une extension en \\\".mo\\\"."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:442
-msgid "filename POT file to use as a master for merging PO file. Default: %s."
-msgstr "fichier Fichier POT à utiliser comme fichier maître lors de la fusion d'un fichier PO. Défaut : %s."
+msgstr "dir Ajoute une r\25595\2559pertoire de recherche pour les fichiers ocaml-gettext. D\25595\2559faut : %s."
-#: ../ocaml-gettext/ocaml-gettext.ml:347
-msgid "filename POT file to write when extracting translatable strings. Default: %s."
-msgstr "fichier Fichier POT à écrire lors de l'extraction des chaînes traductibles. Défaut : %s."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:331
-msgid "filename options Per filename option used when extracting strings from the specified filename. Default: %s."
-msgstr "fichier options Options à utiliser lors de l'extraction des chaînes de caractères du fichier spécifié. Défaut : %s."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:366
-msgid "language Language to use when installing a MO file. Default: try to guess it from the name of the MO file."
-msgstr "language Langage à utiliser lors de l'installation d'un fichier MO. Défaut : extrait du nom du fichier MO."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:404
-msgid "language Language to use when uninstalling a MO file. Default: try to guess it from the name of the MO file."
-msgstr "language Langage à utiliser lors de la désinstallation d'un fichier MO. Défaut : extrait du nom du fichier MO."
-
-#: ../libgettext-ocaml/gettext.ml:347
+#: ../libgettext-ocaml/gettext.ml:375
msgid "language Set the default language for ocaml-gettext. Default: %s."
-msgstr "language Défini le langage par défaut pour ocaml-gettext. Défaut : %s."
+msgstr "language D\25595\2559fini le langage par d\25595\2559faut pour ocaml-gettext. D\25595\2559faut : %s."
-#: ../libgettext-ocaml/gettext.ml:154
+#: ../libgettext-ocaml/gettext.ml:178
msgid "line %d character %d"
-msgstr "la ligne %d au caractère %d"
-
-#: ../ocaml-gettext/ocaml-gettext.ml:311
-msgid "options Default option used when extracting translatable strings. Default: %S."
-msgstr "options Options par défaut à utiliser lors de l'extraction des chaînes de caractères traductibles. Défaut : %S."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:385
-msgid "textdomain Textdomain to use when installing a MO file. Default: try to guess it from the name of the MO file."
-msgstr "textdomain Domaine de texte à utiliser lors de l'installation d'un fichier MO. Défaut : extrait du nom de fichier MO."
-
-#: ../ocaml-gettext/ocaml-gettext.ml:423
-msgid "textdomain Textdomain to use when uninstalling a MO file. Default: try to guess it from the name of the MO file."
-msgstr "textdomain Domaine de texte à utiliser lors de la désinstallation d'un fichier MO. Défaut : extrait du nom du fichier MO."
+msgstr "la ligne %d au caract\25595\2558re %d"
-#: ../libgettext-ocaml/gettext.ml:317
+#: ../libgettext-ocaml/gettext.ml:345
msgid "textdomain dir Set a dir to search ocaml-gettext files for the specified domain. Default: %s."
-msgstr "textdomain dir Défini un répertoire de recherche des fichiers ocaml-gettext pour le domaine de texte spécifié. Défaut : %s."
+msgstr "textdomain dir D\25595\2559fini un r\25595\2559pertoire de recherche des fichiers ocaml-gettext pour le domaine de texte sp\25595\2559cifi\25595\2559. D\25595\2559faut : %s."
diff -ur ocaml-gettext-0.2.0.orig/po/ocaml-gettext.pot ocaml-gettext-0.2.0/po/ocaml-gettext.pot
--- ocaml-gettext-0.2.0.orig/po/ocaml-gettext.pot 2008-03-21 16:23:39.000000000 +0000
+++ ocaml-gettext-0.2.0/po/ocaml-gettext.pot 2008-03-21 17:20:16.000000000 +0000
@@ -1,14 +1,14 @@
-# Ocaml-gettext catalog.
-# Copyright (C) 2005 by Sylvain Le Gall <sylvain@le-gall.net>.
-# This file is distributed under the same license as the ocaml-gettext package.
-# Author: Sylvain Le Gall <sylvain@le-gall.net> 2005.
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-03-15 22:18+0000\n"
+"POT-Creation-Date: 2008-03-21 17:20+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,227 +17,135 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: ../libgettext-ocaml/gettext.ml:286
+#: ../libgettext-ocaml/gettext.ml:314
msgid " Choose how to handle failure in ocaml-gettext. Default: %s."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:301
+#: ../libgettext-ocaml/gettext.ml:329
msgid " Disable the translation perform by ocaml-gettext. Default: enable."
msgstr ""
-#: ../ocaml-gettext/ocaml-gettext.ml:471
-msgid " Returns only the version string of ocaml-gettext."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:462
-msgid " Returns version information on ocaml-gettext."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:490
-msgid "%s\n\nCommand: ocaml-gettext -action (%s) [options]\nWhen trying to guess language and textdomain from a \nMO file, the rules applied are: language.textdomain.mo\n\nOptions:"
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:292
-msgid "Action to execute. Default: none."
-msgstr ""
-
-#: ../libgettext-ocaml/gettext.ml:195
+#: ../libgettext-ocaml/gettext.ml:219
msgid "An empty entry has been encounter."
msgstr ""
-#: ../ocaml-gettext/ocaml-gettext.ml:501
-msgid "An error occurs while processing."
-msgstr ""
-
-#: ../libgettext-ocaml/gettext.ml:167
+#: ../libgettext-ocaml/gettext.ml:191
msgid "Cannot find an approriate ocaml-gettext compiled file ( %s )."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:229
+#: ../libgettext-ocaml/gettext.ml:253
msgid "Cannot find string %S."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:214
+#: ../libgettext-ocaml/gettext.ml:238
msgid "Could not open file %s."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:226
+#: ../libgettext-ocaml/gettext.ml:250
msgid "Error while merging two PO files: %S and %S cannot be merged."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:220
+#: ../libgettext-ocaml/gettext.ml:244
msgid "Error while processing parsing of PO file, in msgid %S, %d index is out of bound."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:217
+#: ../libgettext-ocaml/gettext.ml:241
msgid "Error while processing parsing of PO file: %S at %s."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:180
+#: ../libgettext-ocaml/gettext.ml:204
msgid "Error while processing parsing of content-type at %s: %S."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:172
+#: ../libgettext-ocaml/gettext.ml:196
msgid "Error while processing parsing of options at %s: %S."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:176
+#: ../libgettext-ocaml/gettext.ml:200
msgid "Error while processing parsing of plural at %s: %S."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:223
+#: ../libgettext-ocaml/gettext.ml:247
msgid "Error while trying to load PO file %s, file doesn't exist."
msgstr ""
-#: ../ocaml-gettext/ocaml-gettext.ml:288
-msgid "Invalid action: %s."
-msgstr ""
-
-#: ../libgettext-ocaml/gettext.ml:192
+#: ../libgettext-ocaml/gettext.ml:216
msgid "Junk at the end of the plural form id %S: %s."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:184
+#: ../libgettext-ocaml/gettext.ml:208
msgid "MO file provided is not encoded following ocaml-gettext convention."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:197
+#: ../libgettext-ocaml/gettext.ml:221
msgid "Number of strings is negative."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:170
+#: ../libgettext-ocaml/gettext.ml:194
msgid "Ocaml-gettext library is not initialized"
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:199
+#: ../libgettext-ocaml/gettext.ml:223
msgid "Offset of string table is out of bound ([%ld,%ld] should be in [%ld,%ld])."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:202
+#: ../libgettext-ocaml/gettext.ml:226
msgid "Offset of translation table is out of bound ([%ld,%ld] should be in [%ld,%dl])."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:208
+#: ../libgettext-ocaml/gettext.ml:232
msgid "Out of bound access when trying to find a string (%d < %d)."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:211
+#: ../libgettext-ocaml/gettext.ml:235
msgid "Out of bound access when trying to find a translation (%d < %d)."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:159
+#: ../libgettext-ocaml/gettext.ml:183
msgid "Problem reading file %s: %s."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:161
+#: ../libgettext-ocaml/gettext.ml:185
msgid "Problem while extracting %s: command %S exits with code %d."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:164
+#: ../libgettext-ocaml/gettext.ml:188
msgid "Problem while extracting %s: command %S killed by signal %d."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:205
+#: ../libgettext-ocaml/gettext.ml:229
msgid "Translation table and string table overlap ([%ld,%ld] and [%ld,%ld] have a non empty intersection)."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:186
+#: ../libgettext-ocaml/gettext.ml:210
msgid "Trying to fetch the plural form %d of a singular form %S."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:189
+#: ../libgettext-ocaml/gettext.ml:213
msgid "Trying to fetch the plural form %d of plural form %s."
msgstr ""
-#: ../ocaml-gettext/ocaml-gettext.ml:78
-msgid "You cannot specify a output filename and more than one \nfilename : all the compiled file will have the same output filename"
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:74
-msgid "You cannot specify at the same time a language, a textdomain \nand provide more than one file to install/uninstall : all files\nwill have the same destination filename."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:69
-msgid "You must specify one action."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:375
-msgid "category Category to use when installing a MO file. Default: %s."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:413
-msgid "category Category to use when uninstalling a MO file. Default: %s."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:301
-msgid "cmd Command to extract translatable strings from an OCaml source file. Default: %s."
+#: ../libgettext-ocaml/gettext.ml:256
+msgid "Unable to parse the POSIX language environment variable %s"
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:361
+#: ../libgettext-ocaml/gettext.ml:389
msgid "codeset Set the default codeset for outputting string with ocaml-gettext. Default: %s."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:338
+#: ../libgettext-ocaml/gettext.ml:366
msgid "dir Add a search dir for ocaml-gettext files. Default: %s."
msgstr ""
-#: ../ocaml-gettext/ocaml-gettext.ml:394
-msgid "dirname Base dir used when installing a MO file. Default: %s."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:432
-msgid "dirname Base dir used when uninstalling a MO file. Default: %s."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:452
-msgid "extension Backup extension to use when moving PO file which have been merged. Default: %s."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:357
-msgid "filename MO file to write when compiling a PO file. Default: name of the PO file with \\\".mo\\\" extension."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:442
-msgid "filename POT file to use as a master for merging PO file. Default: %s."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:347
-msgid "filename POT file to write when extracting translatable strings. Default: %s."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:331
-msgid "filename options Per filename option used when extracting strings from the specified filename. Default: %s."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:366
-msgid "language Language to use when installing a MO file. Default: try to guess it from the name of the MO file."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:404
-msgid "language Language to use when uninstalling a MO file. Default: try to guess it from the name of the MO file."
-msgstr ""
-
-#: ../libgettext-ocaml/gettext.ml:347
+#: ../libgettext-ocaml/gettext.ml:375
msgid "language Set the default language for ocaml-gettext. Default: %s."
msgstr ""
-#: ../libgettext-ocaml/gettext.ml:154
+#: ../libgettext-ocaml/gettext.ml:178
msgid "line %d character %d"
msgstr ""
-#: ../ocaml-gettext/ocaml-gettext.ml:311
-msgid "options Default option used when extracting translatable strings. Default: %S."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:385
-msgid "textdomain Textdomain to use when installing a MO file. Default: try to guess it from the name of the MO file."
-msgstr ""
-
-#: ../ocaml-gettext/ocaml-gettext.ml:423
-msgid "textdomain Textdomain to use when uninstalling a MO file. Default: try to guess it from the name of the MO file."
-msgstr ""
-
-#: ../libgettext-ocaml/gettext.ml:317
+#: ../libgettext-ocaml/gettext.ml:345
msgid "textdomain dir Set a dir to search ocaml-gettext files for the specified domain. Default: %s."
msgstr ""
diff -ur ocaml-gettext-0.2.0.orig/po/POTFILES ocaml-gettext-0.2.0/po/POTFILES
--- ocaml-gettext-0.2.0.orig/po/POTFILES 2008-03-21 16:23:39.000000000 +0000
+++ ocaml-gettext-0.2.0/po/POTFILES 2008-03-21 17:20:14.000000000 +0000
@@ -1,2 +1 @@
../libgettext-ocaml/gettext.ml
-../ocaml-gettext/ocaml-gettext.ml

View File

@ -1,11 +1,9 @@
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil} %define debug_package %{nil}
%define alphatag 20080321patch
Name: ocaml-gettext Name: ocaml-gettext
Version: 0.2.0 Version: 0.3.0
Release: 3.%{alphatag}%{?dist} Release: 1%{?dist}
Summary: OCaml library for i18n Summary: OCaml library for i18n
Group: Development/Libraries Group: Development/Libraries
@ -14,10 +12,8 @@ URL: http://sylvain.le-gall.net/ocaml-gettext.html
Source0: http://sylvain.le-gall.net/download/%{name}-%{version}.tar.gz Source0: http://sylvain.le-gall.net/download/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: ocaml-gettext-0.2.0-20080321.patch
BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-findlib-devel >= 1.2.1-3
BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-camlp4-devel
BuildRequires: ocaml-fileutils-devel BuildRequires: ocaml-fileutils-devel
@ -91,7 +87,6 @@ signature files for developing applications that use
%prep %prep
%setup -q %setup -q
%patch0 -p1
%build %build
@ -99,15 +94,14 @@ signature files for developing applications that use
CFLAGS="$RPM_OPT_FLAGS" \ CFLAGS="$RPM_OPT_FLAGS" \
./configure \ ./configure \
--libdir=%{_libdir} \ --libdir=%{_libdir} \
--disable-doc --with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
%else %else
CFLAGS="$RPM_OPT_FLAGS" \ CFLAGS="$RPM_OPT_FLAGS" \
./configure \ ./configure \
--libdir=%{_libdir} \ --libdir=%{_libdir} \
--disable-doc \
--disable-camomile \ --disable-camomile \
--with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
%endif %endif
# --with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
make make
@ -121,12 +115,15 @@ export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_bindir}
ocamlfind install gettext build/lib/gettext/* # Remove *.o files - these shouldn't be distributed.
ocamlfind install gettext-stub build/lib/gettext-stub/* find _build -name '*.o' -exec rm {} \;
ocamlfind install gettext _build/lib/gettext/*
ocamlfind install gettext-stub _build/lib/gettext-stub/*
%ifnarch ppc64 %ifnarch ppc64
ocamlfind install gettext-camomile build/lib/gettext-camomile/* ocamlfind install gettext-camomile _build/lib/gettext-camomile/*
%endif %endif
install -m 0755 build/bin/* $RPM_BUILD_ROOT%{_bindir}/ install -m 0755 _build/bin/* $RPM_BUILD_ROOT%{_bindir}/
strip $OCAMLFIND_DESTDIR/stublibs/dll*.so strip $OCAMLFIND_DESTDIR/stublibs/dll*.so
@ -146,9 +143,13 @@ rm -rf $RPM_BUILD_ROOT
%if %opt %if %opt
%exclude %{_libdir}/ocaml/gettext/*.a %exclude %{_libdir}/ocaml/gettext/*.a
%exclude %{_libdir}/ocaml/gettext/*.cmxa %exclude %{_libdir}/ocaml/gettext/*.cmxa
%exclude %{_libdir}/ocaml/gettext/*.cmx
%exclude %{_libdir}/ocaml/gettext-stub/*.a %exclude %{_libdir}/ocaml/gettext-stub/*.a
%exclude %{_libdir}/ocaml/gettext-stub/*.cmxa %exclude %{_libdir}/ocaml/gettext-stub/*.cmxa
%exclude %{_libdir}/ocaml/gettext-stub/*.cmx
%endif %endif
%exclude %{_libdir}/ocaml/gettext/*.mli
%exclude %{_libdir}/ocaml/gettext-stub/*.mli
%{_libdir}/ocaml/stublibs/*.so %{_libdir}/ocaml/stublibs/*.so
%{_libdir}/ocaml/stublibs/*.so.owner %{_libdir}/ocaml/stublibs/*.so.owner
@ -160,9 +161,13 @@ rm -rf $RPM_BUILD_ROOT
%if %opt %if %opt
%{_libdir}/ocaml/gettext/*.a %{_libdir}/ocaml/gettext/*.a
%{_libdir}/ocaml/gettext/*.cmxa %{_libdir}/ocaml/gettext/*.cmxa
%{_libdir}/ocaml/gettext/*.cmx
%{_libdir}/ocaml/gettext-stub/*.a %{_libdir}/ocaml/gettext-stub/*.a
%{_libdir}/ocaml/gettext-stub/*.cmxa %{_libdir}/ocaml/gettext-stub/*.cmxa
%{_libdir}/ocaml/gettext-stub/*.cmx
%endif %endif
%{_libdir}/ocaml/gettext/*.mli
%{_libdir}/ocaml/gettext-stub/*.mli
%{_bindir}/ocaml-gettext %{_bindir}/ocaml-gettext
%{_bindir}/ocaml-xgettext %{_bindir}/ocaml-xgettext
@ -175,7 +180,9 @@ rm -rf $RPM_BUILD_ROOT
%if %opt %if %opt
%exclude %{_libdir}/ocaml/gettext-camomile/*.a %exclude %{_libdir}/ocaml/gettext-camomile/*.a
%exclude %{_libdir}/ocaml/gettext-camomile/*.cmxa %exclude %{_libdir}/ocaml/gettext-camomile/*.cmxa
%exclude %{_libdir}/ocaml/gettext-camomile/*.cmx
%endif %endif
%exclude %{_libdir}/ocaml/gettext-camomile/*.mli
%files camomile-devel %files camomile-devel
@ -184,11 +191,22 @@ rm -rf $RPM_BUILD_ROOT
%if %opt %if %opt
%{_libdir}/ocaml/gettext-camomile/*.a %{_libdir}/ocaml/gettext-camomile/*.a
%{_libdir}/ocaml/gettext-camomile/*.cmxa %{_libdir}/ocaml/gettext-camomile/*.cmxa
%{_libdir}/ocaml/gettext-camomile/*.cmx
%endif %endif
%{_libdir}/ocaml/gettext-camomile/*.mli
%endif %endif
%changelog %changelog
* Wed Apr 30 2008 Richard W.M. Jones <rjones@redhat.com> - 0.3.0-1
- New upstream version 0.3.0.
- Big patch no longer required (integrated with upstream).
- findlib < 1.2.1-3 known not to work with this.
- build/ -> _build/
- Re-enable documentation.
- Prevent *.o files from being distributed.
- Distribute *.cmx and *.mli files.
* Sat Apr 26 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.0-3.20080321patch * Sat Apr 26 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.0-3.20080321patch
- Change the naming scheme to conform with "Snapshot packages" guideline. - Change the naming scheme to conform with "Snapshot packages" guideline.
- Don't duplicate all the docs in camomile-devel. - Don't duplicate all the docs in camomile-devel.

View File

@ -1 +1 @@
4e95d69e6910c4c0dcafb7e2f8dc5491 ocaml-gettext-0.2.0.tar.gz 06132918591916d742391151636e9b82 ocaml-gettext-0.3.0.tar.gz