From 5e161765a21b16de6225dfc734fb85f8b853b53a2b40b83e10c02849234e358e Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 24 Jul 2015 10:51:09 +0000 Subject: [PATCH] - Cleanup spec file with spec-cleaner - Unconditionally build gui - Use proper scriplets for desktop files/icons - Update license information OBS-URL: https://build.opensuse.org/package/show/hardware/lshw?expand=0&rev=6 --- lshw.changes | 8 +++++ lshw.spec | 93 ++++++++++++++++++++++++++-------------------------- 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/lshw.changes b/lshw.changes index 9c0eb14..89c17cc 100644 --- a/lshw.changes +++ b/lshw.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jul 24 10:48:58 UTC 2015 - mpluskal@suse.com + +- Cleanup spec file with spec-cleaner +- Unconditionally build gui +- Use proper scriplets for desktop files/icons +- Update license information + ------------------------------------------------------------------- Wed Oct 16 20:13:46 UTC 2013 - xrigou@otenet.gr diff --git a/lshw.spec b/lshw.spec index 8cce1e2..2125e7a 100644 --- a/lshw.spec +++ b/lshw.spec @@ -1,3 +1,7 @@ +# +# spec file for package lshw +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2013 Pascal Bleser # # All modifications and additions to the file contributed by third parties @@ -10,34 +14,32 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# -# vim: set ts=4 sw=4 et: - -%if %{?!_without_gui:1}0 -%define with_gui 1 -%endif Name: lshw Version: B.02.17 Release: 0 Summary: HardWare LiSter +License: GPL-2.0 +Group: Hardware/Other +Url: http://ezix.org/project/wiki/HardwareLiSter Source: http://ezix.org/software/files/lshw-%{version}.tar.gz -Source1: %{name}.desktop.in -Source2: %{name}.png +Source1: lshw.desktop.in +Source2: lshw.png Patch1: lshw-gcc43.patch Patch2: lshw-stack-corruption.patch -URL: http://ezix.org/project/wiki/HardwareLiSter -Group: Hardware/Other -License: GNU General Public License (GPL) -BuildRoot: %{_tmppath}/build-%{name}-%{version} -BuildRequires: make gcc gcc-c++ update-desktop-files -BuildRequires: sqlite3-devel -BuildRequires: libstdc++-devel -%if %{?with_gui:1}0 +BuildRequires: gcc-c++ BuildRequires: gtk2-devel >= 2.4.0 +BuildRequires: hicolor-icon-theme BuildRequires: libglade2-devel -BuildRequires: libpng-devel pango-devel zlib-devel -%endif +BuildRequires: libpng-devel +BuildRequires: libstdc++-devel +BuildRequires: pango-devel +BuildRequires: sqlite3-devel +BuildRequires: update-desktop-files +BuildRequires: zlib-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description lshw (Hardware Lister) is a small tool to provide detailed informaton on the @@ -52,11 +54,11 @@ For detailed information on lshw features and usage, please see the included documentation or go to the lshw Web page, http://www.ezix.org/software/lshw.html -%if %{?with_gui:1}0 %package gui Summary: HardWare LiSter (GUI Frontend) Group: Hardware/Other Requires: %{name} = %{version}-%{release} +Requires: hicolor-icon-theme %description gui lshw (Hardware Lister) is a small tool to provide detailed informaton on the @@ -71,76 +73,75 @@ information. For detailed information on lshw features and usage, please see the included documentation or go to the lshw Web page, http://www.ezix.org/software/lshw.html -%endif -%debug_package %prep %setup -q %patch1 %patch2 %build -%__make %{?_smp_flags} \ +make %{?_smp_mflags} \ PREFIX="%{_prefix}" \ SBINDIR="%{_sbindir}" \ MANDIR="%{_mandir}" \ DATADIR="%{_datadir}" \ - CXX="%__cxx" \ - CC="%__cc" \ + CXX="g++" \ + CC="gcc" \ RPM_OPT_FLAGS="%{optflags}" \ STRIP=touch \ all -%if %{?with_gui:1}0 -%__make %{?_smp_flags} \ +make %{?_smp_mflags} \ PREFIX="%{_prefix}" \ SBINDIR="%{_sbindir}" \ MANDIR="%{_mandir}" \ DATADIR="%{_datadir}" \ - CXX="%__cxx" \ - CC="%__cc" \ + CXX="g++" \ + CC="gcc" \ RPM_OPT_FLAGS="%{optflags}" \ STRIP=touch \ gui -%endif %install -%__make %{?_smp_flags} \ - DESTDIR="%{buildroot}" \ +make %{?_smp_flags} \ + DESTDIR=%{buildroot} \ PREFIX="%{_prefix}" \ SBINDIR="%{_sbindir}" \ MANDIR="%{_mandir}" \ DATADIR="%{_datadir}" \ - CXX="%__cxx" \ - CC="%__cc" \ + CXX="g++" \ + CC="gcc" \ OPTFLAGS="%{optflags}" \ install -%if %{?with_gui:1}0 -%__make %{?_smp_flags} \ - DESTDIR="%{buildroot}" \ +make %{?_smp_flags} \ + DESTDIR=%{buildroot} \ PREFIX="%{_prefix}" \ SBINDIR="%{_sbindir}" \ MANDIR="%{_mandir}" \ DATADIR="%{_datadir}" \ - CXX="%__cxx" \ - CC="%__cc" \ + CXX="g++" \ + CC="gcc" \ OPTFLAGS="%{optflags}" \ install-gui -%endif -%__install -d "%{buildroot}%{_datadir}/applications" -%__sed 's,@@EXEC@@,%{_sbindir}/gtk-lshw,g' < "%{SOURCE1}" \ +install -d "%{buildroot}%{_datadir}/applications" +sed 's,@@EXEC@@,%{_sbindir}/gtk-lshw,g' < "%{SOURCE1}" \ > "%{buildroot}%{_datadir}/applications/%{name}.desktop" -%__chmod 0644 "%{buildroot}%{_datadir}/applications/%{name}.desktop" -%__install -D -m 0644 "%{SOURCE2}" "%{buildroot}%{_datadir}/pixmaps/%{name}.png" +chmod 0644 "%{buildroot}%{_datadir}/applications/%{name}.desktop" +install -D -m 0644 "%{SOURCE2}" "%{buildroot}%{_datadir}/pixmaps/%{name}.png" %suse_update_desktop_file -r "%{name}" System HardwareSettings %find_lang lshw -%clean -%{?buildroot:%__rm -rf "%{buildroot}"} +%post gui +%desktop_database_post +%icon_theme_cache_post + +%postun gui +%desktop_database_postun +%icon_theme_cache_postun %files -f lshw.lang %defattr(-,root,root,0755) @@ -149,9 +150,8 @@ http://www.ezix.org/software/lshw.html %dir %{_datadir}/lshw %{_datadir}/lshw/*.txt %{_datadir}/lshw/*.ids -%doc %{_mandir}/man1/lshw.1%{ext_man} +%{_mandir}/man1/lshw.1%{ext_man} -%if %{?with_gui:1}0 %files gui %defattr(-,root,root,0755) %doc COPYING @@ -160,6 +160,5 @@ http://www.ezix.org/software/lshw.html %{_datadir}/lshw/ui %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png -%endif %changelog