Modernize spec file

This commit is contained in:
Kalev Lember 2016-08-08 16:11:28 +02:00
parent 08d29d31ad
commit 45112012aa

View File

@ -2,13 +2,12 @@ Name: sysprof
Version: 3.20.0 Version: 3.20.0
Release: 1%{?dist} Release: 1%{?dist}
Summary: A system-wide Linux profiler Summary: A system-wide Linux profiler
Group: Development/System
License: GPLv3+ License: GPLv3+
URL: http://www.sysprof.com URL: http://www.sysprof.com
Source0: https://download.gnome.org/sources/sysprof/3.20/sysprof-%{version}.tar.xz Source0: https://download.gnome.org/sources/sysprof/3.20/sysprof-%{version}.tar.xz
# Backported from upstream # Backported from upstream
Patch0: 0001-callgraph-Use-U64_TO_POINTER.patch Patch0: 0001-callgraph-Use-U64_TO_POINTER.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: binutils-devel BuildRequires: binutils-devel
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
@ -38,28 +37,24 @@ developing applications that use %{name}.
%prep %prep
%setup -q -n sysprof-%{version} %setup -q
%patch0 -p1 %patch0 -p1
%build %build
%configure --disable-static %configure --disable-static
make %{?_smp_mflags} %make_build
%install %install
rm -rf ${RPM_BUILD_ROOT} %make_install
make install DESTDIR=${RPM_BUILD_ROOT}
find $RPM_BUILD_ROOT -name '*.la' -delete find $RPM_BUILD_ROOT -name '*.la' -delete
%find_lang %{name} --all-name --with-gnome %find_lang %{name} --all-name --with-gnome
desktop-file-install \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
%{SOURCE1}
%check
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
%clean
rm -rf ${RPM_BUILD_ROOT}
%post %post
/sbin/ldconfig /sbin/ldconfig
@ -77,8 +72,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root,-) %license COPYING
%doc NEWS README COPYING TODO AUTHORS %doc NEWS README TODO AUTHORS
%{_bindir}/sysprof %{_bindir}/sysprof
%{_bindir}/sysprof-cli %{_bindir}/sysprof-cli
%{_libdir}/libsysprof-2.so %{_libdir}/libsysprof-2.so
@ -102,6 +97,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog %changelog
* Mon Aug 08 2016 Kalev Lember <klember@redhat.com> - 3.20.0-1 * Mon Aug 08 2016 Kalev Lember <klember@redhat.com> - 3.20.0-1
- Update to 3.20.0 - Update to 3.20.0
- Modernize spec file
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-8 * Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild