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