Debian package updates by Jochen Kunkel
[openxpki.git] / trunk / package / suse / external-dependencies / Devel-Symdump.spec
blob285a9bb1514871b6ebb0d2981360c043d8c2f540
2 # - Devel-Symdump -
3 # This spec file was automatically generated by cpan2rpm [ver: 1.146]
4 # The following arguments were used:
5 # --spec-only --version=2.0604 '--author=Andreas J. Koenig' Devel-Symdump-2.0604.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Devel-Symdump
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-Devel-Symdump
15 summary: Devel-Symdump - dump symbol names or the symbol table
16 version: 2.0604
17 release: 1
18 vendor: Andreas J. Koenig
19 packager: Arix International <cpan2rpm@arix.com>
20 license: Artistic
21 group: Applications/CPAN
22 url: http://www.cpan.org
23 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
24 buildarch: noarch
25 prefix: %(echo %{_prefix})
26 source: Devel-Symdump-2.0604.tar.gz
28 %description
29 This little package serves to access the symbol table of perl.
31 =over 4
33 =item "Devel::Symdump->rnew(@packages)"
35 returns a symbol table object for all subtrees below @packages.
36 Nested Modules are analyzed recursively. If no package is given as
37 argument, it defaults to "main". That means to get the whole symbol
38 table, just do a "rnew" without arguments.
40 The global variable $Devel::Symdump::MAX_RECURSION limits the
41 recursion to prevent contention. The default value is set to 97, just
42 low enough to survive the test suite without a warning about deep
43 recursion.
45 =item "Devel::Symdump->new(@packages)"
47 does not go into recursion and only analyzes the packages that are
48 given as arguments.
50 =item packages, scalars, arrays, hashes, functions, ios
52 The methods packages(), scalars(), arrays(), hashes(), functions(),
53 ios(), and (for older perls) unknowns() each return an array of fully
54 qualified symbols of the specified type in all packages that are held
55 within a Devel::Symdump object, but without the leading "$", "@" or
56 "%". In a scalar context, they will return the number of such
57 symbols. Unknown symbols are usually either formats or variables that
58 haven't yet got a defined value.
60 =item as_string
62 =item as_HTML
64 As_string() and as_HTML() return a simple string/HTML representations
65 of the object.
67 =item diff
69 Diff() prints the difference between two Devel::Symdump objects in
70 human readable form. The format is similar to the one used by the
71 as_string method.
73 =item isa_tree
75 =item inh_tree
77 Isa_tree() and inh_tree() both return a simple string representation
78 of the current inheritance tree. The difference between the two
79 methods is the direction from which the tree is viewed: top-down or
80 bottom-up. As I'm sure, many users will have different expectation
81 about what is top and what is bottom, I'll provide an example what
82 happens when the Socket module is loaded:
84 =item % print Devel::Symdump->inh_tree
86 AutoLoader
87 DynaLoader
88 Socket
89 DynaLoader
90 Socket
91 Exporter
92 Carp
93 Config
94 Socket
96 The inh_tree method shows on the left hand side a package name and
97 indented to the right the packages that use the former.
99 =item % print Devel::Symdump->isa_tree
101 Carp
102 Exporter
103 Config
104 Exporter
105 DynaLoader
106 AutoLoader
107 Socket
108 Exporter
109 DynaLoader
110 AutoLoader
112 The isa_tree method displays from left to right ISA relationships, so
113 Socket IS A DynaLoader and DynaLoader IS A AutoLoader. (Actually, they
114 were at the time this manpage was written)
116 =back
118 You may call both methods, isa_tree() and inh_tree(), with an
119 object. If you do that, the object will store the output and retrieve
120 it when you call the same method again later. The typical usage would
121 be to use them as class methods directly though.
124 # This package was generated automatically with the cpan2rpm
125 # utility. To get this software or for more information
126 # please visit: http://perl.arix.com/
129 %prep
130 %setup -q -n %{pkgname}-%{version}
131 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
133 %build
134 grep -rsl '^#!.*perl' . |
135 grep -v '.bak$' |xargs --no-run-if-empty \
136 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
137 CFLAGS="$RPM_OPT_FLAGS"
138 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
139 %{__make}
140 %if %maketest
141 %{__make} test
142 %endif
144 %install
145 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
147 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
149 cmd=/usr/share/spec-helper/compress_files
150 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
151 [ -x $cmd ] && $cmd
153 # SuSE Linux
154 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
155 then
156 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
157 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
158 | %{__sed} -e s+%{buildroot}++g \
159 > %{buildroot}/var/adm/perl-modules/%{name}
162 # remove special files
163 find %{buildroot} -name "perllocal.pod" \
164 -o -name ".packlist" \
165 -o -name "*.bs" \
166 |xargs -i rm -f {}
168 # no empty directories
169 find %{buildroot}%{_prefix} \
170 -type d -depth \
171 -exec rmdir {} \; 2>/dev/null
173 %{__perl} -MFile::Find -le '
174 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
175 print "%doc README";
176 for my $x (sort @dirs, @files) {
177 push @ret, $x unless indirs($x);
179 print join "\n", sort @ret;
181 sub wanted {
182 return if /auto$/;
184 local $_ = $File::Find::name;
185 my $f = $_; s|^\Q%{buildroot}\E||;
186 return unless length;
187 return $files[@files] = $_ if -f $f;
189 $d = $_;
190 /\Q$d\E/ && return for reverse sort @INC;
191 $d =~ /\Q$_\E/ && return
192 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
194 $dirs[@dirs] = $_;
197 sub indirs {
198 my $x = shift;
199 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
201 ' > %filelist
203 [ -z %filelist ] && {
204 echo "ERROR: empty %files listing"
205 exit -1
208 %clean
209 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
211 %files -f %filelist
212 %defattr(-,root,root)
214 %changelog
215 * Thu Nov 23 2006 root@dca02
216 - Initial build.