From 1a0ddee82e065d4e4d8f49f4694c9a59b1e659cd206debc0d9f625d125b161c9 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 10 Oct 2011 18:44:15 +0000 Subject: [PATCH] Accepting request 86660 from home:rudi_m:branches:Base:System minor portability fixes OBS-URL: https://build.opensuse.org/request/show/86660 OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=27 --- tar.changes | 5 +++++ tar.spec | 25 ++++++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/tar.changes b/tar.changes index 58c2a0e..55a0e1c 100644 --- a/tar.changes +++ b/tar.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 5 11:38:57 UTC 2011 - sweet_f_a@gmx.de + +- minor portability fixes + ------------------------------------------------------------------- Thu Sep 29 11:32:04 UTC 2011 - sweet_f_a@gmx.de diff --git a/tar.spec b/tar.spec index f053bc7..237ba0d 100644 --- a/tar.spec +++ b/tar.spec @@ -16,6 +16,8 @@ # +# minimum suse version where the full featured package builds +%define min_suse_ver 1010 Name: tar Version: 1.26 @@ -28,10 +30,12 @@ Source0: %{name}-%{version}.tar.bz2 # Patch3: tar-wildcards.patch Patch6: tar-backup-spec-fix-paths.patch +%if 0%{?suse_version} >= %min_suse_ver BuildRequires: help2man -Requires(pre): info Recommends: tar-lang = %{version} Recommends: xz +%endif +Requires(pre): info Provides: base:/bin/tar BuildRoot: %{_tmppath}/%{name}-%{version}-build %define _bindir /bin @@ -53,8 +57,8 @@ Requires: %{name} = %{version} %description backup-scripts Shell scripts for system backup/restore +%{?lang_package} -%lang_package %prep %setup -q %patch3 -p1 @@ -74,16 +78,17 @@ make check %install %{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}} +%if 0%{?suse_version} >= %min_suse_ver install -d -m 755 %{buildroot}/%{_mandir}/man1 help2man ./src/tar --name "The GNU version of the tar archiving utility" -p tar \ | gzip -c > %{buildroot}/%{_mandir}/man1/tar.1.gz +%endif install -d -m 755 %{buildroot}%{_sysconfdir}/backup install -D -m 644 scripts/backup-specs %{buildroot}%{_sysconfdir}/backup/backup-specs rm -rf %{buildroot}%{_libexecdir}/rmt +rm -f %{buildroot}%{_infodir}/dir %find_lang %{name} -%files lang -f %{name}.lang - %files backup-scripts %defattr(-,root, root) %{_sbindir}/backup @@ -93,12 +98,22 @@ rm -rf %{buildroot}%{_libexecdir}/rmt %dir %{_sysconfdir}/backup %config(noreplace) %{_sysconfdir}/backup/backup-specs +%if 0%{?lang_package:1} + +%files lang -f %{name}.lang + %files +%else + +%files -f %{name}.lang +%endif %defattr(-, root, root) %{_bindir}/tar %doc README* ABOUT-NLS AUTHORS COPYING NEWS THANKS ChangeLog TODO -%{_infodir}/tar.info*.gz +%{_infodir}/tar.info* +%if 0%{?suse_version} >= %min_suse_ver %{_mandir}/man1/tar.1.gz +%endif %post %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz