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-ldif.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 ldif 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 ldif format
73 foreach (@comp_names) {
75 s#org.openoffice.#oo-#g;
80 print OUTFILE "dn: cn=schema\n";
81 print OUTFILE "attributetypes: ($myLdapName-attr-oid NAME '$myLdapName-attr' DESC '$myLdapName attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE_VALUE )\n\n";
83 print OUTFILE "dn: cn=schema\n";
84 print OUTFILE "objectclasses: ($myLdapName-class-oid NAME '$myLdapName-class' DESC '$myLdapName objclass' SUP 'top' MAY ($myLdapName-attr \$ ))\n\n";