]> git.pld-linux.org Git - packages/bootchart.git/blob - bootchart.spec
- s/jakarta-commons-cli/java-commons-cli/
[packages/bootchart.git] / bootchart.spec
1 %include        /usr/lib/rpm/macros.java
2 Summary:        Boot Process Performance Visualization
3 Summary(pl.UTF-8):      Wizualizacja wydajności procesu startu systemu
4 Name:           bootchart
5 Version:        0.9
6 Release:        3
7 License:        GPL v2
8 Group:          Base
9 Source0:        http://dl.sourceforge.net/bootchart/%{name}-%{version}.tar.bz2
10 # Source0-md5:  4be91177d19069e21beeb106f2f77dff
11 Patch0:         %{name}-bash.patch
12 Patch1:         %{name}-initscript.patch
13 URL:            http://www.bootchart.org/
14 BuildRequires:  ant
15 BuildRequires:  java-commons-cli >= 0:1.0
16 BuildRequires:  jaxp_parser_impl
17 BuildRequires:  jpackage-utils >= 0:1.5
18 BuildRequires:  rpm-javaprov
19 BuildRequires:  rpmbuild(macros) >= 1.294
20 Requires:       java-commons-cli >= 0:1.0
21 Requires:       jpackage-utils >= 0:1.5
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         boottitle Bootchart logging
26
27 %description
28 A tool for performance analysis and visualization of the GNU/Linux
29 boot process. Resource utilization and process information are
30 collected during the boot process and are later rendered in a PNG, SVG
31 or EPS encoded chart.
32
33 %description -l pl.UTF-8
34 Narzędzie do analizy i wizualizacji wydajności procesu startu systemu
35 GNU/Linux. Podczas startu systemu zbirane są informacje o procesach i
36 wykorzystaniu zasobów, a następnie są przedstawiane w postaci wykresu
37 w formacie PNG, SVG lub EPS.
38
39 %package javadoc
40 Summary:        Javadoc for %{name}
41 Summary(pl.UTF-8):      Dokumentacja Javadoc dla bootcharta
42 Group:          Documentation
43 Requires:       jpackage-utils
44
45 %description javadoc
46 Javadoc for %{name}.
47
48 %description javadoc -l pl.UTF-8
49 Dokumentacja Javadoc dla bootcharta.
50
51 %package logger
52 Summary:        Boot logging script for %{name}
53 Summary(pl.UTF-8):      Skrypt logujący proces startu dla bootcharta
54 Group:          Base
55 Requires:       coreutils
56 Requires:       grep
57 Requires:       gzip
58 Requires:       mktemp
59 Requires:       mount
60 Requires:       sed
61 Requires:       tar
62
63 %description logger
64 Boot logging script for %{name}.
65
66 %description logger -l pl.UTF-8
67 Skrypt logujący proces startu dla bootcharta.
68
69 %prep
70 %setup -q
71 %patch0 -p1
72 %patch1 -p1
73
74 # Remove the bundled commons-cli
75 rm -rf lib/org/apache/commons/cli lib/org/apache/commons/lang
76
77 %build
78 required_jars="commons-cli"
79 export CLASSPATH=$(build-classpath $required_jars)
80 %ant
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{_javadir}
85
86 # jar
87 install %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
88 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
89
90 # script
91 install -D script/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
92
93 # javadoc
94 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
95 cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
96 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
97
98 # logger
99 install -D script/bootchartd $RPM_BUILD_ROOT/sbin/bootchartd
100 install -D script/bootchartd.conf $RPM_BUILD_ROOT%{_sysconfdir}/bootchartd.conf
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %post javadoc
106 ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
107
108 %post logger
109 # Add a new grub/lilo entry
110 if [ -x /sbin/grubby ]; then
111         kernel=$(/sbin/grubby --default-kernel)
112         info=$(/sbin/grubby --info=$kernel)
113         initrd=$(echo "$info" | sed -n '/^initrd=/{s/^initrd=//;p;q;}')
114         init=$(echo "$info" |sed -n '/^args=.*init=/{s/^args=.*init=//;s/"$//;p;q;}')
115         [ -n "$initrd" ] && initrd="--initrd=$initrd"
116         [ -n "$init" ] && init="bootchart_init=$init"
117         /sbin/grubby --remove-kernel TITLE='%{boottitle}'
118         /sbin/grubby --copy-default --add-kernel=$kernel $initrd --args="init=/sbin/bootchartd $init" --title='%{boottitle}' || :
119 else
120         %banner -e %{name}-logger <<-EOF
121 You should adjust your bootloader to boot with
122  init=/sbin/bootchartd
123 EOF
124 fi
125
126 %preun logger
127 if [ "$1" = 0 ]; then
128         # Remove the grub/lilo entry
129         if [ -x /sbin/grubby ]; then
130                 /sbin/grubby --remove-kernel TITLE='%{boottitle}' || :
131         fi
132 fi
133
134 %files
135 %defattr(644,root,root,755)
136 %doc ChangeLog COPYING INSTALL README TODO lib/LICENSE.cli.txt lib/LICENSE.compress.txt lib/LICENSE.epsgraphics.txt lib/NOTICE.txt
137 %attr(755,root,root) %{_bindir}/bootchart
138 %{_javadir}/*.jar
139
140 %files javadoc
141 %defattr(644,root,root,755)
142 %{_javadocdir}/%{name}-%{version}
143 %ghost %{_javadocdir}/%{name}
144
145 %files logger
146 %defattr(644,root,root,755)
147 %doc README.logger
148 %attr(755,root,root) /sbin/bootchartd
149 %config(noreplace) %{_sysconfdir}/bootchartd.conf
This page took 0.0596 seconds and 3 git commands to generate.