3 # This perl script generates the samba.spec file based on the version
4 # information in the version.h file in the source tree
6 open (VER,'../../source/include/version.h') || die "Unable to open version.h\n";
7 ($_ = <VER>) =~ s/"//g;
13 # create the package name
14 $vername = " id \"Samba Version ".$_."\"\n";
17 #create the subsystem version numbers
38 ($v1,$v2,$v3,$v4,$v5) = split('\.');
40 $vernum = sprintf(" version %02d%02d%02d%02d%02d\n",$v1,$v2,$v3,$v4,$v5);
42 # generate the samba.spec file
43 open(SPEC,">samba.spec") || die "Unable to open samba.spec for output\n";
44 print SPEC "product samba\n";
46 print SPEC " image sw\n";
47 print SPEC " id \"Samba Execution Environment\"\n";
49 print SPEC " order 0\n";
50 print SPEC " subsys base default\n";
51 print SPEC " id \"Samba Execution Environment\"\n";
52 print SPEC " replaces fw_samba.sw.base 0 9999999999\n";
53 print SPEC " replaces fw_samba.sw.samba 0 9999999999\n";
54 print SPEC " exp samba.sw.base\n";
55 print SPEC " endsubsys\n";
56 print SPEC " endimage\n";
57 print SPEC " image man\n";
58 print SPEC " id \"Samba Online Documentation\"\n";
60 print SPEC " order 1\n";
61 print SPEC " subsys manpages default\n";
62 print SPEC " id \"Samba Man Page\"\n";
63 print SPEC " replaces fw_samba.man.manpages 0 9999999999\n";
64 print SPEC " replaces fw_samba.man.samba 0 9999999999\n";
65 print SPEC " exp samba.man.manpages\n";
66 print SPEC " endsubsys\n";
67 print SPEC " subsys doc default\n";
68 print SPEC " id \"Samba Documentation\"\n";
69 print SPEC " replaces fw_samba.man.doc 0 9999999999\n";
70 print SPEC " exp samba.man.doc\n";
71 print SPEC " endsubsys\n";
72 print SPEC " subsys relnotes default\n";
73 print SPEC " id \"Samba Release Notes\"\n";
74 print SPEC " replaces fw_samba.man.relnotes 0 9999999999\n";
75 print SPEC " exp samba.man.relnotes\n";
76 print SPEC " endsubsys\n";
77 print SPEC " endimage\n";
78 print SPEC " image src\n";
79 print SPEC " id \"Samba Source Code\"\n";
81 print SPEC " order 2\n";
82 print SPEC " subsys samba\n";
83 print SPEC " id \"Samba Source Code\"\n";
84 print SPEC " replaces fw_samba.src.samba 0 9999999999\n";
85 print SPEC " exp samba.src.samba\n";
86 print SPEC " endsubsys\n";
87 print SPEC " endimage\n";
88 print SPEC "endproduct\n";
89 close SPEC || die "Error on close of samba.spec\n";
91 print "\nsamba.spec file has been created\n\n";