spec: cleanup (fedora-review fixes)

Remove redundant %defattr, install translation, don't define
BuildRoot, etc.

Version: 5.2.0-1
This commit is contained in:
Pavel Raiskup 2015-01-05 08:44:28 +01:00
parent 729c7139dd
commit e75244ba15

26
xz.spec
View File

@ -15,7 +15,6 @@ Source100: colorxzgrep.sh
Source101: colorxzgrep.csh Source101: colorxzgrep.csh
URL: http://tukaani.org/%{name}/ URL: http://tukaani.org/%{name}/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@ -70,7 +69,7 @@ Summary: Older LZMA format compatibility binaries
Group: Development/Libraries Group: Development/Libraries
# lz{grep,diff,more} are GPLv2+. Other binaries are LGPLv2+ # lz{grep,diff,more} are GPLv2+. Other binaries are LGPLv2+
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: lzma < %{version} Obsoletes: lzma < %{version}
Provides: lzma = %{version} Provides: lzma = %{version}
@ -105,24 +104,22 @@ make %{?_smp_mflags}
popd popd
%install %install
rm -rf %{buildroot} make install DESTDIR=%{buildroot}
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/*.la
rm -rf %{buildroot}%{_docdir}/%{name}
rm -rf %{buildroot}%{_datadir}/locale
cp -r %{compat_ver}/src/liblzma/.libs/liblzma.so.0* %{buildroot}%{_libdir} cp -r %{compat_ver}/src/liblzma/.libs/liblzma.so.0* %{buildroot}%{_libdir}
# xzgrep colorization
%global profiledir %{_sysconfdir}/profile.d %global profiledir %{_sysconfdir}/profile.d
mkdir -p %{buildroot}%{profiledir} mkdir -p %{buildroot}%{profiledir}
install -p -m 644 %{SOURCE100} %{buildroot}%{profiledir} install -p -m 644 %{SOURCE100} %{buildroot}%{profiledir}
install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir}
%find_lang %name
%check %check
LD_LIBRARY_PATH=$PWD/src/liblzma/.libs make check LD_LIBRARY_PATH=$PWD/src/liblzma/.libs make check
%clean
rm -rf %{buildroot}
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig
@ -131,35 +128,30 @@ rm -rf %{buildroot}
%postun compat-libs -p /sbin/ldconfig %postun compat-libs -p /sbin/ldconfig
%files %files -f %{name}.lang
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING* %license COPYING*
%doc AUTHORS NEWS README THANKS TODO %doc %{_docdir}
%{_bindir}/*xz* %{_bindir}/*xz*
%{_mandir}/man1/*xz* %{_mandir}/man1/*xz*
%{profiledir}/* %{profiledir}/*
%files libs %files libs
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING* %license COPYING*
%{_libdir}/lib*.so.5* %{_libdir}/lib*.so.5*
%files static %files static
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING* %license COPYING*
%{_libdir}/liblzma.a %{_libdir}/liblzma.a
%files compat-libs %files compat-libs
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING* %license COPYING*
%{_libdir}/lib*.so.0* %{_libdir}/lib*.so.0*
%files devel %files devel
%defattr(-,root,root,-)
%dir %{_includedir}/lzma %dir %{_includedir}/lzma
%{_includedir}/lzma/*.h %{_includedir}/lzma/*.h
%{_includedir}/lzma.h %{_includedir}/lzma.h
@ -167,7 +159,6 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/liblzma.pc %{_libdir}/pkgconfig/liblzma.pc
%files lzma-compat %files lzma-compat
%defattr(-,root,root,-)
%{_bindir}/*lz* %{_bindir}/*lz*
%{_mandir}/man1/*lz* %{_mandir}/man1/*lz*
@ -175,6 +166,7 @@ rm -rf %{buildroot}
* Tue Dec 23 2014 Pavel Raiskup <praiskup@redhat.com> - 5.2.0-1 * Tue Dec 23 2014 Pavel Raiskup <praiskup@redhat.com> - 5.2.0-1
- rebase per upstream release notes (#1023718) - rebase per upstream release notes (#1023718)
http://www.mail-archive.com/xz-devel@tukaani.org/msg00216.html http://www.mail-archive.com/xz-devel@tukaani.org/msg00216.html
- fedora-review fixes
* Tue Aug 26 2014 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-15alpha * Tue Aug 26 2014 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-15alpha
- xz*grep's output is colored iff grep's is (#1034846) - xz*grep's output is colored iff grep's is (#1034846)