Blame SPECS/bltk.spec

16f2df
Name:		bltk
16f2df
Version:	1.1.0
16f2df
Release:	10%{?dist}
16f2df
Summary:	The BLTK measures notebook battery life under any workload
16f2df
16f2df
Group:		Applications/System
16f2df
License:	BSD
16f2df
URL:			http://www.lesswatts.org/projects/bltk/
16f2df
Source0:	http://www.lesswatts.org/patches/bltk/%{name}-%{version}.tar.gz
16f2df
Source1:	bltk.conf
16f2df
Source2:  OOCALC_FILE_SAMPLE.ods
16f2df
Source3:  OODRAW_FILE_SAMPLE.odg
16f2df
Source4:  OOWRITER_FILE_SAMPLE.odt
16f2df
16f2df
Patch1:  bltk-1.0.9-man.patch
16f2df
Patch3:  bltk-1.0.9-bltk_paths.patch
16f2df
Patch4:  bltk-1.0.9-opt_developer.patch
16f2df
Patch5:  bltk-1.1.0-cond_install.patch
16f2df
Patch6:  bltk-1.0.9-opt_game.patch
16f2df
Patch7:  bltk-1.0.9-conf.patch
16f2df
Patch8:  bltk-1.0.9-opt_office.patch
16f2df
Patch10: bltk-1.0.9-opt_player.patch
16f2df
Patch11: bltk-1.0.9-home_dir.patch
16f2df
Patch12: bltk-1.0.9-opt_reader.patch
16f2df
Patch13: bltk-1.0.9-installed.patch
16f2df
Patch15: bltk-1.0.9-xse.patch
16f2df
Patch16: bltk-1.0.9-conf_home.patch
16f2df
Patch17: bltk-1.1.0-rm_sudo.patch
16f2df
Patch18: bltk-1.0.9-plot-path.patch
16f2df
Patch19: bltk-1.0.9-rpm.patch
16f2df
Patch20: bltk-1.1.0-cflags-override.patch
16f2df
Patch21: bltk-1.1.0-fix-tmp-files.patch
16f2df
16f2df
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16f2df
16f2df
BuildRequires:	libX11-devel
16f2df
16f2df
Requires: udisks2 gnuplot
16f2df
16f2df
%description
16f2df
This tool kit is used to measure battery life and performance under
16f2df
different workloads on Linux. Test can be used with various workloads to
16f2df
simulate different types of laptop usage.
16f2df
The following workloads are currently implemented:
16f2df
	a) Idle workload - collect statistics only
16f2df
	b) Developer workload - simulates code development in Linux environment
16f2df
	c) Reader workload - simulates text reading on laptop
16f2df
	d) DVD playback workload - simulates laptop entertaining usage
16f2df
	e) 3d game workload - simulates 3D-gaming on laptop
16f2df
	f) Office Activity workload - simulates laptop usage for different
16f2df
		office activities (based on OpenOffice.org office suit)
16f2df
16f2df
%prep
16f2df
%setup -q -n bltk
16f2df
16f2df
# %patch0 -p1 -b .all
16f2df
%patch1 -p1 -b .man
16f2df
%patch3 -p1 -b .bltk_paths
16f2df
%patch4 -p1 -b .opt_developer
16f2df
%patch5 -p1 -b .cond_install
16f2df
%patch6 -p1 -b .opt_game
16f2df
%patch7 -p1 -b .conf
16f2df
%patch8 -p1 -b .opt_office
16f2df
%patch10 -p1 -b .opt_player
16f2df
%patch11 -p1 -b .home_dir
16f2df
%patch12 -p1 -b .opt_reader
16f2df
%patch13 -p1 -b .installed
16f2df
%patch15 -p1 -b .xse
16f2df
%patch16 -p1 -b .conf_home
16f2df
%patch17 -p1 -b .rm_sudo
16f2df
%patch18 -p1 -b .plot-path
16f2df
%patch19 -p1 -b .rpm
16f2df
%patch20 -p1 -b .cflags-override
16f2df
%patch21 -p1 -b .fix-tmp-files
16f2df
16f2df
%build
16f2df
make CFLAGS="$RPM_OPT_FLAGS"
16f2df
#make %{?_smp_mflags}
16f2df
16f2df
%install
16f2df
rm -rf $RPM_BUILD_ROOT
16f2df
16f2df
make install DESTDIR=$RPM_BUILD_ROOT PACKAGE_BUILD=y
16f2df
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk/{bin,lib,doc,wl_developer,wl_game,wl_office,wl_player,wl_reader}
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_developer/bin
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_game/bin
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office/bin
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_player/bin
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_reader/bin
16f2df
mkdir -p ${RPM_BUILD_ROOT}/etc
16f2df
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,5}
16f2df
16f2df
install -m 644 %{SOURCE1}	${RPM_BUILD_ROOT}/etc
16f2df
install -m 644 doc/bltk.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1
16f2df
install -m 644 doc/bltk_report.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1
16f2df
install -m 644 doc/bltk.conf.5 ${RPM_BUILD_ROOT}/%{_mandir}/man5
16f2df
16f2df
install -m 755 bin/bat_drain	${RPM_BUILD_ROOT}%{_libdir}/bltk/bin/bat_drain
16f2df
install -m 755 bin/bat_drain_table	${RPM_BUILD_ROOT}%{_libdir}/bltk/bin/bat_drain_table
16f2df
16f2df
install -m 755 bin/bltk	${RPM_BUILD_ROOT}%{_libdir}/bltk/bin
16f2df
16f2df
install -m 755 lib/libxse.so.0	${RPM_BUILD_ROOT}%{_libdir}/bltk/lib/libxse.so.0
16f2df
16f2df
install -m 755 bin/bltk_*	${RPM_BUILD_ROOT}%{_libdir}/bltk/bin/
16f2df
install -m 755 bin/bat_*	${RPM_BUILD_ROOT}%{_libdir}/bltk/bin/
16f2df
16f2df
install -m 755 wl_developer/bin/bltk_wl_developer ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_developer/bin
16f2df
install -m 755 wl_developer/bin/bltk_wl_developer_xse ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_developer/bin
16f2df
install -m 755 wl_developer/bin/bltk_wl_developer_spy ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_developer/bin
16f2df
16f2df
install -m 755 wl_game/bin/bltk_wl_game ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_game/bin
16f2df
install -m 755 wl_game/bin/bltk_wl_game_xse ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_game/bin
16f2df
16f2df
install -m 755 wl_office/bin/bltk_wl_office ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office/bin
16f2df
install -m 755 wl_office/bin/bltk_wl_office_xse ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office/bin
16f2df
install -m 755 wl_office/bin/bltk_wl_office_run_app ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office/bin
16f2df
install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office
16f2df
install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office
16f2df
install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office
16f2df
install -m 644 wl_office/scen ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office
16f2df
install -m 644 wl_office/scen_install ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office
16f2df
install -m 644 wl_office/response_install ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office
16f2df
install -m 644 wl_office/text* ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_office
16f2df
16f2df
install -m 755 wl_player/bin/bltk_wl_player ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_player/bin
16f2df
install -m 755 wl_player/bin/bltk_wl_player_make_binary ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_player/bin
16f2df
16f2df
install -m 755 wl_reader/bin/bltk_wl_reader ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_reader/bin
16f2df
install -m 755 wl_reader/bin/bltk_wl_reader_xse ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_reader/bin
16f2df
install -m 644 wl_reader/war_and_peace.html ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_reader
16f2df
16f2df
cat << ":EOF" > ${RPM_BUILD_ROOT}%{_bindir}/bltk
16f2df
#!/bin/sh
16f2df
16f2df
bltk_native="$(rpm --eval '%%{_libdir}')/bltk/bin/$(basename $0)"
16f2df
16f2df
[ -x "$bltk_native" ] && exec "$bltk_native" "$@"
16f2df
exec /usr/lib/bltk/bin/$(basename $0) "$@"
16f2df
:EOF
16f2df
chmod a+rx ${RPM_BUILD_ROOT}%{_bindir}/bltk
16f2df
pushd ${RPM_BUILD_ROOT}%{_bindir}
16f2df
for f in bltk_plot bltk_report bltk_report_compress bltk_report_table bltk_report_uncompress;
16f2df
do
16f2df
  ln -s bltk $f
16f2df
done
16f2df
popd
16f2df
16f2df
%clean
16f2df
rm -rf $RPM_BUILD_ROOT
16f2df
16f2df
%post -p /sbin/ldconfig
16f2df
16f2df
%postun -p /sbin/ldconfig
16f2df
16f2df
%files
16f2df
%defattr(-,root,root,-)
16f2df
%doc doc/HOWTO doc/Manual doc/README
16f2df
%config(noreplace) %attr(0644,root,root) /etc/bltk.conf
16f2df
16f2df
%{_libdir}/bltk/bin/bltk
16f2df
%{_bindir}/bltk
16f2df
%{_bindir}/bltk_plot
16f2df
%{_bindir}/bltk_report
16f2df
%{_bindir}/bltk_report_compress
16f2df
%{_bindir}/bltk_report_table
16f2df
%{_bindir}/bltk_report_uncompress
16f2df
16f2df
%{_mandir}/man1/bltk*
16f2df
%{_mandir}/man5/bltk.conf.*
16f2df
16f2df
%{_libdir}/bltk/lib/libxse.so.0
16f2df
16f2df
%{_libdir}/bltk/bin/bat_drain
16f2df
%{_libdir}/bltk/bin/bat_drain_table
16f2df
%{_libdir}/bltk/bin/bltk_calc
16f2df
%{_libdir}/bltk/bin/bltk_check
16f2df
%{_libdir}/bltk/bin/bltk_display_state
16f2df
%{_libdir}/bltk/bin/bltk_get_ac_adapter
16f2df
%{_libdir}/bltk/bin/bltk_get_bat
16f2df
%{_libdir}/bltk/bin/bltk_get_cpufreq
16f2df
%{_libdir}/bltk/bin/bltk_get_cpuinfo
16f2df
%{_libdir}/bltk/bin/bltk_get_cpustat
16f2df
%{_libdir}/bltk/bin/bltk_get_cpustate
16f2df
%{_libdir}/bltk/bin/bltk_get_dmidecode
16f2df
%{_libdir}/bltk/bin/bltk_get_hdparm
16f2df
%{_libdir}/bltk/bin/bltk_get_hd_rpm
16f2df
%{_libdir}/bltk/bin/bltk_get_info
16f2df
%{_libdir}/bltk/bin/bltk_get_kernel_release
16f2df
%{_libdir}/bltk/bin/bltk_get_lspci
16f2df
%{_libdir}/bltk/bin/bltk_get_meminfo
16f2df
%{_libdir}/bltk/bin/bltk_get_realpath
16f2df
%{_libdir}/bltk/bin/bltk_get_stat
16f2df
%{_libdir}/bltk/bin/bltk_get_system_release
16f2df
%{_libdir}/bltk/bin/bltk_get_timer
16f2df
%{_libdir}/bltk/bin/bltk_get_user_field
16f2df
%{_libdir}/bltk/bin/bltk_get_xdpyinfo
16f2df
16f2df
%{_libdir}/bltk/bin/bltk_install
16f2df
%{_libdir}/bltk/bin/bltk_func
16f2df
%{_libdir}/bltk/bin/bltk_plot
16f2df
%{_libdir}/bltk/bin/bltk_report
16f2df
%{_libdir}/bltk/bin/bltk_report_check
16f2df
%{_libdir}/bltk/bin/bltk_report_compress
16f2df
%{_libdir}/bltk/bin/bltk_report_table
16f2df
%{_libdir}/bltk/bin/bltk_report_uncompress
16f2df
%{_libdir}/bltk/bin/bltk_save_sys_info
16f2df
%{_libdir}/bltk/bin/bltk_spy
16f2df
%{_libdir}/bltk/bin/bltk_time
16f2df
%{_libdir}/bltk/bin/bltk_type_command
16f2df
%{_libdir}/bltk/bin/bltk_winid
16f2df
%{_libdir}/bltk/bin/bltk_wl_common
16f2df
16f2df
%{_libdir}/bltk/wl_developer/bin/bltk_wl_developer
16f2df
%{_libdir}/bltk/wl_developer/bin/bltk_wl_developer_spy
16f2df
%{_libdir}/bltk/wl_developer/bin/bltk_wl_developer_xse
16f2df
16f2df
%{_libdir}/bltk/wl_game/bin/bltk_wl_game
16f2df
%{_libdir}/bltk/wl_game/bin/bltk_wl_game_xse
16f2df
16f2df
%{_libdir}/bltk/wl_office/bin/bltk_wl_office
16f2df
%{_libdir}/bltk/wl_office/bin/bltk_wl_office_xse
16f2df
%{_libdir}/bltk/wl_office/bin/bltk_wl_office_run_app
16f2df
%{_libdir}/bltk/wl_office/OOCALC_FILE_SAMPLE.ods
16f2df
%{_libdir}/bltk/wl_office/OODRAW_FILE_SAMPLE.odg
16f2df
%{_libdir}/bltk/wl_office/OOWRITER_FILE_SAMPLE.odt
16f2df
%{_libdir}/bltk/wl_office/scen
16f2df
%{_libdir}/bltk/wl_office/scen_install
16f2df
%{_libdir}/bltk/wl_office/response_install
16f2df
%{_libdir}/bltk/wl_office/text1
16f2df
%{_libdir}/bltk/wl_office/text2
16f2df
%{_libdir}/bltk/wl_office/text3
16f2df
16f2df
%{_libdir}/bltk/wl_player/bin/bltk_wl_player
16f2df
%{_libdir}/bltk/wl_player/bin/bltk_wl_player_make_binary
16f2df
16f2df
%{_libdir}/bltk/wl_reader/bin/bltk_wl_reader
16f2df
%{_libdir}/bltk/wl_reader/bin/bltk_wl_reader_xse
16f2df
%{_libdir}/bltk/wl_reader/war_and_peace.html
16f2df
16f2df
%changelog
16f2df
* Tue Mar 21 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 1.1.0-10
16f2df
- Fixed temporary files creation
16f2df
  Resolves: rhbz#1102089
16f2df
16f2df
* Wed Mar  5 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 1.1.0-9
16f2df
- Improved multilib
16f2df
  Related: rhbz#1057086
16f2df
16f2df
* Wed Mar  5 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 1.1.0-8
16f2df
- Fixed multilib
16f2df
  Resolves: rhbz#1057086
16f2df
16f2df
* Mon Mar  3 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 1.1.0-7
16f2df
- Fixed application of CFLAGS
16f2df
  Resolves: rhbz#1070787
16f2df
16f2df
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.1.0-6
16f2df
- Mass rebuild 2014-01-24
16f2df
16f2df
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.1.0-5
16f2df
- Mass rebuild 2013-12-27
16f2df
16f2df
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
16f2df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
16f2df
16f2df
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
16f2df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
16f2df
16f2df
* Mon May  7 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 1.1.0-2
16f2df
- Switched to udisks2
16f2df
16f2df
* Thu Mar 29 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 1.1.0-1
16f2df
- New version
16f2df
- Dropped office_scen patch (upstreamed)
16f2df
- Dropped hdparm patch (upstream added support for LVM)
16f2df
- Reworked rm_sudo patch
16f2df
16f2df
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-12
16f2df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
16f2df
16f2df
* Wed Feb 23 2011 Jiri Skala <jskala@redhat.com> 1.0.9-11
16f2df
- fixes #679022 - bltk_plot is broken
16f2df
- fixes paths in bltk_get_hd_rpm
16f2df
16f2df
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-10
16f2df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
16f2df
16f2df
* Mon May 10 2010 Jiri Skala <jskala@redhat.com> 1.0.9-9
16f2df
- added udisks dependency
16f2df
16f2df
* Thu Feb 04 2010 Jiri Skala <jskala@redhat.com> 1.0.9-8
16f2df
- removed requires openoffice
16f2df
16f2df
* Fri Dec 11 2009 Jiri Skala <jskala@redhat.com> 1.0.9-7
16f2df
- fixes #542688 - bltk will run any command as root
16f2df
16f2df
* Thu Sep 03 2009 Jiri Skala <jskala@redhat.com> 1.0.9-6
16f2df
- fixed misspelled bash variable with stop file
16f2df
16f2df
* Fri Jul 31 2009 Jiri Skala <jskala@redhat.com> 1.0.9-5
16f2df
- bltk.conf can be located in ~/.bltk
16f2df
16f2df
* Tue Jul 28 2009 Jiri Skala <jskala@redhat.com> 1.0.9-4
16f2df
- added man mages
16f2df
- splitted patch to more files
16f2df
- filled up scen file of office workload
16f2df
- updated to latest upstream sources
16f2df
16f2df
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-2
16f2df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
16f2df
16f2df
* Tue Jul 14 2009 Jiri Skala <jskala@redhat.com> 1.0.9-1
16f2df
- merged with latest upstream sources
16f2df
16f2df
* Fri Apr 10 2009 Jiri Skala <jskala@redhat.com> 1.0.8-2
16f2df
- optimized bltk.conf - SOFFICE_PROG
16f2df
- fixed working dir in reports
16f2df
- fixed SIGHUP handling
16f2df
- finalized implementation of stop file in office and reader WLs
16f2df
16f2df
* Thu Jan 29 2009 Jiri Skala <jskala@redhat.com> 1.0.8-1
16f2df
- assembling package