One last 7.5 update for intel driver blocker
[xorg-util-modular.git] / make-readme.pl
blob16354c5e3072bfcdb120151456d54b5b8f7583bb
1 #! /usr/bin/perl -w
3 # Script to add some common URL's to X.Org module README files so that
4 # people finding them packaged in distros or mirrored on other sites
5 # have an easier time finding the origin and our bugtracker/git/etc.
7 ###########################################################################
9 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
11 # Permission is hereby granted, free of charge, to any person obtaining a
12 # copy of this software and associated documentation files (the
13 # "Software"), to deal in the Software without restriction, including
14 # without limitation the rights to use, copy, modify, merge, publish,
15 # distribute, and/or sell copies of the Software, and to permit persons
16 # to whom the Software is furnished to do so, provided that the above
17 # copyright notice(s) and this permission notice appear in all copies of
18 # the Software and that both the above copyright notice(s) and this
19 # permission notice appear in supporting documentation.
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
24 # OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
25 # HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
26 # INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
27 # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
28 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
29 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31 # Except as contained in this notice, the name of a copyright holder
32 # shall not be used in advertising or otherwise to promote the sale, use
33 # or other dealings in this Software without prior written authorization
34 # of the copyright holder.
36 ###########################################################################
38 use strict;
39 use Cwd;
41 my $module = cwd();
42 $module =~ s|^.*/([^/]+)/([^/]+)$|$1/$2|;
44 my $modname = $2;
46 my $desc;
48 my @manpage = glob('man/*.man');
49 push @manpage, glob('*.man');
51 foreach my $manpage (@manpage) {
52 if ($manpage && (-f $manpage)) {
53 open(my $MANPAGE, '<', $manpage) or warn "Cannot read $manpage\n";
55 while (my $l = <$MANPAGE>) {
56 if ($l =~ /^.SH NAME/) {
57 $desc = <$MANPAGE>;
58 last;
61 close($MANPAGE);
63 chomp($desc);
65 # Remove backslashes, such as \- instead of -
66 $desc =~ s/\\//g;
68 if ($modname =~ /^xf86-(input|video)-(.*)$/) {
69 my $driver = $2;
71 $desc =~ s/^\s*$driver/$modname/;
72 $desc =~ s/driver$/driver for the Xorg X server/;
75 last if ($desc ne '');
79 open(my $README, '>>', 'README') or die;
81 if ($desc) {
82 print $README $desc, "\n";
85 print $README <<__EOF__;
87 All questions regarding this software should be directed at the
88 Xorg mailing list:
90 http://lists.freedesktop.org/mailman/listinfo/xorg
92 Please submit bug reports to the Xorg bugzilla:
94 https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
96 The master development code repository can be found at:
98 git://anongit.freedesktop.org/git/xorg/$module
100 http://cgit.freedesktop.org/xorg/$module
102 For patch submission instructions, see:
104 http://www.x.org/wiki/Development/Documentation/SubmittingPatches
106 For more information on the git code manager, see:
108 http://wiki.x.org/wiki/GitPage
110 __EOF__
112 close($README);