SHA256
1
0
forked from pool/xz

Accepting request 1164597 from home:dancermak:branches:Base:System

- switch to obs_scm
- don't abuse %bcond for multibuild
- add rpmlintrc for dubious rpmlint warning
- add a package suffix for the multibuild lang flavor

OBS-URL: https://build.opensuse.org/request/show/1164597
OBS-URL: https://build.opensuse.org/package/show/Base:System/xz?expand=0&rev=158
This commit is contained in:
Danilo Spinella 2024-04-04 14:51:12 +00:00 committed by Git OBS Bridge
parent 6e6c8a9fd4
commit 02fb01d80f
7 changed files with 41 additions and 30 deletions

View File

@ -1,5 +1,5 @@
<services>
<service name="tar_scm" mode="manual">
<service name="obs_scm" mode="manual">
<param name="url">https://git.tukaani.org/xz.git</param>
<param name="scm">git</param>
<param name="revision">v5.4.6</param>
@ -7,10 +7,9 @@
<param name="changesgenerate">enable</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>
<service mode="manual" name="set_version">
</service>
<service name="recompress" mode="manual">
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">zstd</param>
<param name="compression">zst</param>
</service>
</services>

3
xz-5.4.6.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:31f8f522274b3c530492c0309d1b51b8a9a999efc72201282601b82ec799635b
size 5001740

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:efbbd1d2917dd3b1b8e7c691ad287f96792b87c6888efc28482c06dc6e5044e5
size 907627

4
xz-rpmlintrc Normal file
View File

@ -0,0 +1,4 @@
# rpmlint freaks out because we declare the lang multibuild as noarch and
# %_libdir is archspecific, but we either exclude %_libdir or it's in the part
# belonging to the archfull build
addFilter("libdir-macro-in-noarch-package.*%{_libdir}")

View File

@ -5,6 +5,7 @@ Thu Apr 4 07:16:46 UTC 2024 - Dan Čermák <dcermak@suse.com>
tarballs on github are gone
- introduce _multibuild to allow building the translations outside
of Ring0 and everything else in Ring0
- add rpmlintrc to silence harmless warnings
-------------------------------------------------------------------
Thu Mar 28 13:51:05 UTC 2024 - Dirk Müller <dmueller@suse.com>

4
xz.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: xz
version: 5.4.6
mtime: 1706269280
commit: 6e8732c5a317a349986a4078718f1d95b67072c5

47
xz.spec
View File

@ -17,9 +17,11 @@
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "lang"
%bcond_without lang
%global with_lang 1
%global psuffix -lang
%else
%bcond_with lang
%global with_lang 0
%global psuffix %{nil}
%endif
@ -33,17 +35,18 @@
%global real_ver 5.4.6
Name: xz
Name: xz%{psuffix}
Version: 5.6.1.revertto5.4
Release: 0
Summary: A Program for Compressing Files with the LempelZivMarkov algorithm
License: 0BSD AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later
Group: Productivity/Archiving/Compression
URL: https://tukaani.org/xz/
Source0: %{name}-%{real_ver}.tar.zst
Source2: baselibs.conf
Source4: xznew
Source5: xznew.1
Source0: xz-%{real_ver}.tar.zst
Source1: xznew
Source2: xznew.1
Source3: xz-rpmlintrc
Source4: baselibs.conf
BuildRequires: pkgconfig
BuildRequires: zstd
# for autoreconf
@ -54,7 +57,7 @@ BuildRequires: gettext-tools
# needed by autopoint
BuildRequires: findutils
BuildRequires: libtool
%if %{with lang}
%if %{with_lang}
# required to update manpage translations
BuildRequires: po4a
BuildArch: noarch
@ -77,9 +80,8 @@ The xz command is a program for compressing files.
decompressing speed.
* Very similar command line interface to what gzip and bzip2 have.
%if %{with lang}
%lang_package
%if %{with_lang}
%{lang_package -n xz}
%else
%package -n liblzma5
@ -120,7 +122,7 @@ Static library for the LZMA library
%endif
%prep
%autosetup -n %{name}-%{real_ver}
%autosetup -n xz-%{real_ver}
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
@ -152,7 +154,7 @@ cp ./src/liblzma/.libs/liblzma.a liblzma.a
%make_build
%endif
%if %{with lang}
%if %{with_lang}
# update manpage translations
./po4a/update-po
%endif
@ -164,26 +166,26 @@ cp ./src/liblzma/.libs/liblzma.a liblzma.a
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name} --all-name --with-man
install -Dpm 0755 %{SOURCE4} %{buildroot}%{_bindir}/xznew
install -Dpm 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1
install -Dpm 0755 %{SOURCE1} %{buildroot}%{_bindir}/xznew
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/xznew.1
%if %{with static}
install -Dpm 0644 liblzma.a %{buildroot}%{_libdir}/
%endif
rm -vf %{buildroot}%{_docdir}/%{name}/{COPYING,COPYING.GPLv2}
%if %{without lang}
%if ! %{with_lang}
%post -n liblzma5 -p /sbin/ldconfig
%postun -n liblzma5 -p /sbin/ldconfig
%endif
%if %{with lang}
%files lang -f %{name}.lang
%if %{with_lang}
%files -n xz-lang -f %{name}.lang
# exclude everything of the other packages
%exclude %_docdir
%exclude %_bindir
%exclude %_mandir/man1
%exclude %{_includedir}
%exclude %_libdir
%exclude %{_libdir}
%exclude /usr/src/debug/
%exclude /usr/lib/debug/
@ -194,9 +196,10 @@ rm -vf %{buildroot}%{_docdir}/%{name}/{COPYING,COPYING.GPLv2}
%dir %{_mandir}/ro
%dir %{_mandir}/uk
%endif
%endif
%if %{without lang}
# with_lang
%else
%files
%license COPYING COPYING.GPLv2
%{_docdir}/%{name}
@ -273,7 +276,7 @@ rm -vf %{buildroot}%{_docdir}/%{name}/{COPYING,COPYING.GPLv2}
%{_libdir}/liblzma.a
%endif
# without lang end
# with_lang end
%endif
%changelog