bootchart/bootchart.spec

191 lines
5.8 KiB
RPMSpec
Raw Permalink Normal View History

Name: bootchart
Version: 1.20
Release: 2mamba
Summary: Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process
Group: System/Benchmarks
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.bootchart.org/
Source: http://foo-projects.org/~sofar/bootchart/bootchart-%{version}.tar.gz
#Source: http://downloads.sourceforge.net/sourceforge/bootchart/bootchart-%{version}.tar.bz2
Source1: http://zerodeux.net/misc/bootchart/bootchart_pl
Source2: bootchart.sh
Source3: kbootchart
Source4: kbootchart.png
Source5: bootchart-grub2
Patch0: %{name}-0.9-nojavafunctions.patch
Patch1: %{name}-0.9-svg_path.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: ldconfig
## AUTOBUILDREQ-END
Requires: curl
Obsoletes: %{name}-logger <= 1.20-1mamba
BuildRequires: apache-ant
%ifnarch arm
BuildRequires: java-environment
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process.
%prep
%setup -q
#%patch0 -p1
cp %{S:1} %{name}.pl
%patch1 -p1
%build
#JAVA_HOME=%{_jvmdir}/jdk ANT_HOME=/opt/java/ant ant
%configure
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
# install grub.d file
install -D -m 0755 %{S:5} %{buildroot}%{_sysconfdir}/grub.d/15_bootchart
## install scripts
#install -D -m 755 script/%{name} \
# %{buildroot}%{_bindir}/%{name}
#install -D -m 755 %{name}.pl \
# %{buildroot}%{_bindir}/%{name}.pl
#install -D -m 755 %{S:2} \
# %{buildroot}%{_bindir}/%{name}.sh
#install -d %{buildroot}%{_datadir}/%{name}/svg
#install -m 644 svg/* \
# %{buildroot}%{_datadir}/%{name}/svg
#
## install java files
#install -D -m 644 %{name}.jar \
# %{buildroot}%{_javadir}/%{name}-%{version}.jar
#ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
#install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
#cp -pr javadoc/* \
# %{buildroot}%{_javadocdir}/%{name}-%{version}
#ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
## install logger
#install -D -m 755 script/bootchartd \
# %{buildroot}/sbin/bootchartd
##install -D -m 644 script/bootchartd.conf \
# %{buildroot}%{_sysconfdir}/bootchartd.conf
#
## install kde frontend
#install -D -m 755 %{S:3} \
# %{buildroot}%{_bindir}/k%{name}
#install -D -m 644 %{S:4} \
# %{buildroot}%{_datadir}/icons/crystalsvg/32x32/apps/k%{name}.png
#
#
## create KDE menu link
#install -d %{buildroot}/%{_datadir}/applications
#cat > %{buildroot}/%{_datadir}/applications/k%{name}.desktop <<EOF
#[Desktop Entry]
#Name=KBootchart
#GenericName=Bootchart image generator
#GenericName[it]=Generatore del grafico d'avvio
#Exec=kbootchart
#Type=Application
#Icon=kbootchart
#Terminal=false
#Categories=Qt;KDE;System
#EOF
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
#%post logger
#if [ $1 -ge 1 ]; then
## new install or upgrade
# %if "%{_target_cpu}" == "i586"
# for i in $(ls %{_sysconfdir}/grub/conf.d/%{distribution}-* 2>/dev/null); do
# if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -ne 0 ]; then
# sed -i "s|^kernel\(.*\)|kernel \1 init=/sbin/%{name}d|" $i 2> /dev/null
# fi
# done
# %endif
# %if "%{_target_cpu}" == "ppc"
# for i in $(ls %{_sysconfdir}/yaboot/conf.d/%{distribution}-* 2>/dev/null); do
# if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -ne 0 ]; then
# sed -i "s|^append=\"\(.*\)\"|append=\"\1 init=/sbin/%{name}d\"|" $i 2> /dev/null
# fi
# done
# %endif
#fi
#
#if [ $1 -eq 1 ]; then
## new install
# %if "%{_target_cpu}" == "i586"
# [ -x /usr/sbin/update-grub ] && /usr/sbin/update-grub
# %endif
# %if "%{_target_cpu}" == "ppc"
# [ -x /usr/sbin/yaboot-update ] && /usr/sbin/yaboot-update
# %endif
#fi
#exit 0
#%postun logger
#if [ $1 -eq 0 ]; then
## uninstall
#%if "%{_target_cpu}" == "i586"
#for i in $(ls %{_sysconfdir}/grub/conf.d/%{distribution}-* 2>/dev/null); do
# if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -eq 0 ]; then
# sed -i "s|^kernel\(.*\) init=/sbin/%{name}d\(.*\)|kernel \1\2|" $i 2> /dev/null
# fi
#done
#
#%endif
#%if "%{_target_cpu}" == "ppc"
#for i in $(ls %{_sysconfdir}/yaboot/conf.d/%{distribution}-* 2>/dev/null); do
# if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -eq 0 ]; then
# sed -i "s|^append=\"\(.*\) init=/sbin/%{name}d\(.*\)\"|append=\"\1\2\"|" $i 2> /dev/null
# fi
#done
#%endif
#fi
#exit 0
%files
%defattr(-,root,root)
%{_sysconfdir}/grub.d/15_bootchart
%{_sbindir}/bootchartd
%{_datadir}/doc/bootchart/bootchartd.conf.example
#%config(noreplace) %{_sysconfdir}/%{name}d.conf
#%doc README.logger
%doc COPYING
%changelog
* Tue Dec 22 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.20-2mamba
- logger: removed post code to configure grub
* Sat Dec 01 2012 Automatic Build System <autodist@mambasoft.it> 1.20-1mamba
- update to 1.20
* Mon May 09 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9-7mamba
- updated grub2 configuration file to use grub-mkconfig_lib instead of deprecated update-grub_lib
* Fri Feb 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9-6mamba
- rebuilt to remove executable requirements
* Tue Oct 14 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9-5mamba
- updated for grub2
* Tue Oct 14 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9-4mamba
- rebuilt
* Mon Feb 19 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9-3qilnx
- add an exit 0 to scripts
* Wed Nov 15 2006 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 0.9-2qilnx
- added %%post and %%postun scriplets
* Mon Jun 26 2006 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 0.9-1qilnx
- package created by autospec