3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # generates of the component schema list mapping file, which
21 # describes the mapping between OOR and LDAP
23 eval 'exec perl -wS $0 ${1+"$@"}'
26 #creating the output file
27 open(OUTFILE, ">$ARGV[0]") or die "can't open >$ARGV[0]";
30 open(INFILE, "makefile.mk") or die "can't open makefile.mk";
34 #search all schemas in the makefile except userprofile and format them as e.g org.openoffice.Inet
45 $inxcs=0 unless /\\$/;
47 next if (/^\s*XCSFILES/);
48 next if (/UserProfile/);
55 push(@comp_names, $_);
60 # create the properites file
62 print OUTFILE "# location of the component schema \n";
63 print OUTFILE "component-schema=schema\n\n";
65 print OUTFILE "# location of the component data \n";
66 print OUTFILE "component-data=data\n\n";
68 $comps=join (';',@comp_names);
69 print OUTFILE "# installed components \n";
70 print OUTFILE "components=$comps\n\n";
72 print OUTFILE "# component mapping \n";
73 foreach (@comp_names) {
76 s#org.openoffice.#oo-#g;
81 print OUTFILE "component/$myCompName/attribute=$myLdapName-attr\n";
82 print OUTFILE "component/$myCompName/objectclass=$myLdapName-class\n\n";