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-conf.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 #*************************************************************************
33 # generates of the component schema list an ldap schema in slapd format
35 eval 'exec perl -wS $0 ${1+"$@"}'
38 #creating the output file
39 open(OUTFILE, ">$ARGV[0]") or die "can't open >$ARGV[0]";
42 open(INFILE, "makefile.mk") or die "can't open makefile.mk";
46 #search all schemas in the makefile except userprofile and format them as e.g org.openoffice.Inet
57 $inxcs=0 unless /\\$/;
59 next if (/^\s*XCSFILES/);
60 next if (/UserProfile/);
67 push(@comp_names, $_);
72 # generate the schema in slapd format
74 foreach (@comp_names) {
76 s#org.openoffice.#oo-#g;
81 print OUTFILE "attribute $myLdapName-attr $myLdapName-attr-oid cis single\n";
82 print OUTFILE "objectclass $myLdapName-class\n";
83 print OUTFILE "\toid\n";
84 print OUTFILE "\t\t$myLdapName-class-oid\n";
85 print OUTFILE "\tsuperior top\n";
86 print OUTFILE "\tallows\n";
87 print OUTFILE "\t$myLdapName-attr\n";