2 #*************************************************************************
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 # Copyright 2008 by Sun Microsystems, Inc.
8 # OpenOffice.org - a multi-platform office productivity suite
10 # $RCSfile: component-map.gen,v $
14 # This file is part of OpenOffice.org.
16 # OpenOffice.org is free software: you can redistribute it and/or modify
17 # it under the terms of the GNU Lesser General Public License version 3
18 # only, as published by the Free Software Foundation.
20 # OpenOffice.org is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU Lesser General Public License version 3 for more details
24 # (a copy is included in the LICENSE file that accompanied this code).
26 # You should have received a copy of the GNU Lesser General Public License
27 # version 3 along with OpenOffice.org. If not, see
28 # <http://www.openoffice.org/license.html>
29 # for a copy of the LGPLv3 License.
31 #*************************************************************************
34 # generates of the component schema list mapping file, which
35 # describes the mapping between OOR and LDAP
37 eval 'exec perl -wS $0 ${1+"$@"}'
40 #creating the output file
41 open(OUTFILE, ">$ARGV[0]") or die "can't open >$ARGV[0]";
44 open(INFILE, "makefile.mk") or die "can't open makefile.mk";
48 #search all schemas in the makefile except userprofile and format them as e.g org.openoffice.Inet
59 $inxcs=0 unless /\\$/;
61 next if (/^\s*XCSFILES/);
62 next if (/UserProfile/);
69 push(@comp_names, $_);
74 # create the properites file
76 print OUTFILE "# location of the component schema \n";
77 print OUTFILE "component-schema=schema\n\n";
79 print OUTFILE "# location of the component data \n";
80 print OUTFILE "component-data=data\n\n";
82 $comps=join (';',@comp_names);
83 print OUTFILE "# installed components \n";
84 print OUTFILE "components=$comps\n\n";
86 print OUTFILE "# component mapping \n";
87 foreach (@comp_names) {
90 s#org.openoffice.#oo-#g;
95 print OUTFILE "component/$myCompName/attribute=$myLdapName-attr\n";
96 print OUTFILE "component/$myCompName/objectclass=$myLdapName-class\n\n";