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