RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / Tree-DAG_Node.spec
blobf29a4adc13009a315544079829f655f98ff2753b
2 # - Tree::DAG_Node -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.05 '--author=Sean M. Burke' Tree-DAG_Node-1.05.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Tree-DAG_Node
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-Tree-DAG_Node
15 summary: Tree-DAG_Node - (super)class for representing nodes in a tree
16 version: 1.05
17 release: 1
18 vendor: Sean M. Burke
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: Tree-DAG_Node-1.05.tar.gz
28 %description
29 This class encapsulates/makes/manipulates objects that represent nodes
30 in a tree structure. The tree structure is not an object itself, but
31 is emergent from the linkages you create between nodes. This class
32 provides the methods for making linkages that can be used to build up
33 a tree, while preventing you from ever making any kinds of linkages
34 which are not allowed in a tree (such as having a node be its own
35 mother or ancestor, or having a node have two mothers).
37 This is what I mean by a "tree structure", a bit redundantly stated:
39 * A tree is a special case of an acyclic directed graph.
41 * A tree is a network of nodes where there's exactly one root
42 node (i.e., 'the top'), and the only primary relationship between nodes
43 is the mother-daugher relationship.
45 * No node can be its own mother, or its mother's mother, etc.
47 * Each node in the tree has exactly one "parent" (node in the "up"
48 direction) -- except the root, which is parentless.
50 * Each node can have any number (0 to any finite number) of daughter
51 nodes. A given node's daughter nodes constitute an *ordered* list.
52 (However, you are free to consider this ordering irrelevant.
53 Some applications do need daughters to be ordered, so I chose to
54 consider this the general case.)
56 * A node can appear in only one tree, and only once in that tree.
57 Notably (notable because it doesn't follow from the two above points),
58 a node cannot appear twice in its mother's daughter list.
60 * In other words, there's an idea of up (toward the root) versus
61 down (away from the root), and left (i.e., toward the start (index 0)
62 of a given node's daughter list) versus right (toward the end of a
63 given node's daughter list).
65 Trees as described above have various applications, among them:
66 representing syntactic constituency, in formal linguistics;
67 representing contingencies in a game tree; representing abstract
68 syntax in the parsing of any computer language -- whether in
69 expression trees for programming languages, or constituency in the
70 parse of a markup language document. (Some of these might not use the
71 fact that daughters are ordered.)
73 (Note: B-Trees are a very special case of the above kinds of trees,
74 and are best treated with their own class. Check CPAN for modules
75 encapsulating B-Trees; or if you actually want a database, and for
76 some reason ended up looking here, go look at AnyDBM_File.)
78 Many base classes are not usable except as such -- but Tree::DAG_Node
79 can be used as a normal class. You can go ahead and say:
81 use Tree::DAG_Node;
82 my $root = Tree::DAG_Node->new();
83 $root->name("I'm the tops");
84 $new_daughter = Tree::DAG_Node->new();
85 $new_daughter->name("More");
86 $root->add_daughter($new_daughter);
88 and so on, constructing and linking objects from Tree::DAG_Node and
89 making useful tree structures out of them.
92 # This package was generated automatically with the cpan2rpm
93 # utility. To get this software or for more information
94 # please visit: http://perl.arix.com/
97 %prep
98 %setup -q -n %{pkgname}-%{version}
99 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
101 %build
102 grep -rsl '^#!.*perl' . |
103 grep -v '.bak$' |xargs --no-run-if-empty \
104 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
105 CFLAGS="$RPM_OPT_FLAGS"
106 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
107 %{__make}
108 %if %maketest
109 %{__make} test
110 %endif
112 %install
113 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
115 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
117 cmd=/usr/share/spec-helper/compress_files
118 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
119 [ -x $cmd ] && $cmd
121 # SuSE Linux
122 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
123 then
124 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
125 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
126 | %{__sed} -e s+%{buildroot}++g \
127 > %{buildroot}/var/adm/perl-modules/%{name}
130 # remove special files
131 find %{buildroot} -name "perllocal.pod" \
132 -o -name ".packlist" \
133 -o -name "*.bs" \
134 |xargs -i rm -f {}
136 # no empty directories
137 find %{buildroot}%{_prefix} \
138 -type d -depth \
139 -exec rmdir {} \; 2>/dev/null
141 %{__perl} -MFile::Find -le '
142 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
143 print "%doc README";
144 for my $x (sort @dirs, @files) {
145 push @ret, $x unless indirs($x);
147 print join "\n", sort @ret;
149 sub wanted {
150 return if /auto$/;
152 local $_ = $File::Find::name;
153 my $f = $_; s|^\Q%{buildroot}\E||;
154 return unless length;
155 return $files[@files] = $_ if -f $f;
157 $d = $_;
158 /\Q$d\E/ && return for reverse sort @INC;
159 $d =~ /\Q$_\E/ && return
160 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
162 $dirs[@dirs] = $_;
165 sub indirs {
166 my $x = shift;
167 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
169 ' > %filelist
171 [ -z %filelist ] && {
172 echo "ERROR: empty %files listing"
173 exit -1
176 %clean
177 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
179 %files -f %filelist
180 %defattr(-,root,root)
182 %changelog
183 * Fri Nov 24 2006 root@dca02
184 - Initial build.