-
Notifications
You must be signed in to change notification settings - Fork 69
/
codeviz.spec
92 lines (77 loc) · 2.33 KB
/
codeviz.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
%define _specver $Id: codeviz.spec,v 1.1 2003/10/26 19:47:43 mel Exp $
%define _name codeviz
%define _pkg %{_name}
%define _ver 0.13
%define _rel 3boz
%define _nv %{_name}-%{_ver}
%define _namever %{_nv}
%define _nameverrel %{_name}-%{_ver}-%{_rel}
%define _filelist %{_nameverrel}-filelist
# compress man, info and POD pages.
%define _brp_compress /usr/lib/rpm/brp-compress
%define __brp_compress [ -x %{_brp_compress} ] && %{_brp_compress}
Summary: A call graph generation utility for C/C++
Name: %{_pkg}
Version: %{_ver}
Release: %{_rel}
Copyright: distributable
Group: Development/Tools
Packager: %{_packager}
Source0: http://www.skynet.ie/~mel/projects/codeviz/%{_nv}.tar.gz
Patch0: patch.new-options
BuildRoot: %{_buildtmp}/%{_nameverrel}-buildroot/
BuildArch: noarch
%description
CodeViz provides the ability to generate call graphs to aid the task
of understanding code. It uses a highly modular set of collection
methods and can be adapted to support any language although only C and
C++ are currently supported.
build-id ---> %_specver
%prep
%setup
%patch0
%build
%install
{ i="$RPM_BUILD_ROOT"; [ "$i" != "/" ] && rm -rf $i; }
gen_filelist()
{
_d=$1;shift
_l=$1;shift
find $_d | perl -nl \
-e "\$_d='$_d';" \
-e 'if ( ! -d ) { $_f=1; undef $_p; }' \
-e 'elsif ( m,$_d.*%{_name}, ) { $_f=1; $_p="%dir "; }' \
-e 'if ( $_f ) {' \
-e ' s,/*$_d/*,/,;' \
-e ' printf "%s\n", "$_p$_";' \
-e ' undef $_f }' \
> $_l
if [ ! -f $_l -o ! -s $_l ]
then
echo "ERROR: EMPTY FILE LIST"
exit -1
fi
}
_r=$RPM_BUILD_ROOT
eval "_perl_`perl -V:installsitelib`"
%{__mkdir_p} -m 755 $_r/%{_bindir} \
$_r/$_perl_installsitelib ]\
$_r/%{_docdir}/%{_nv}
%{__install} -m 755 bin/* $_r/%{_bindir}
%{__cp} -pr lib/* $_r/$_perl_installsitelib
%{__cp} -pr CHANGELOG \
README \
compilers \
graphs \
$_r/%{_docdir}/%{_nv}
gen_filelist $RPM_BUILD_ROOT %{_filelist}
%clean
#echo The maid is off on `date +%A`.
for i in "$RPM_BUILD_ROOT" "$RPM_BUILD_DIR/%{_namever}" "%_buildtmp"; do
[ "$i" != "/" ] && rm -rf $i
done
%files -f %{_filelist}
%defattr(-,root,root)
%changelog
* Fri Oct 17 2003 Robert Lehr <[email protected]>
- initial revision for private RPM