Compare commits

...
Sign in to create a new pull request.

15 commits

Author SHA1 Message Date
Benjamin A. Beasley
46d6a5814d Add a SourceLicense field 2024-12-11 17:03:12 -05:00
Benjamin A. Beasley
6151049d5b Improve the license-breakdown spec-file comment 2024-12-11 16:51:41 -05:00
Benjamin A. Beasley
618e4aaaab Improve the rpmlintrc file
[skip changelog]
2024-12-11 16:51:31 -05:00
Benjamin A. Beasley
0801ef07cf Update to 2.6 (close RHBZ#2243085) 2024-12-11 16:51:04 -05:00
Benjamin A. Beasley
ecfcb6a461 Unbundle zopfli
- We now have libzopfli/zopfli-devel in EPEL9
2024-12-11 16:48:59 -05:00
Benjamin A. Beasley
e4002e09f4 Trivial tidying
[skip changelog]
2024-12-11 16:43:27 -05:00
Benjamin A. Beasley
b1cfafe52d Break a long line with a macro
[skip changelog]
2024-12-11 16:42:18 -05:00
Benjamin A. Beasley
e657c43f32 Do not number the sole Source
[skip changelog]
2024-12-11 16:42:05 -05:00
Benjamin A. Beasley
157407d90f Add an rpmlintrc file 2024-12-11 16:41:56 -05:00
Benjamin A. Beasley
8889cf26b5 Update to 2.5 (close RHBZ#2162990; fix RHBZ#2161641) 2023-01-22 15:01:43 -05:00
Benjamin A. Beasley
58d6ca9377 Update to 2.4 (close RHBZ#2145023)
- Security fix for CVE-2022-35014, CVE-2022-35015, CVE-2022-35016,
  CVE-2022-35017, CVE-2022-35018, CVE-2022-35019, CVE-2022-35020
2022-11-24 07:52:51 -05:00
Benjamin A. Beasley
ae9b9166a2 Identify bundled 7-Zip as “7zip” rather than “7z”
This is closer to the upstream name, to “p7zip”, and to existing usage
in the “retroarch” package.
2022-11-24 07:52:49 -05:00
Benjamin A. Beasley
d231025a38 Add a comment about upstream tests 2022-11-24 07:52:48 -05:00
Benjamin A. Beasley
240798db12 Stricter file globs 2022-11-24 07:52:44 -05:00
Benjamin A. Beasley
4d272fa29d Drop conditionals for Fedora and other EPELs 2022-09-28 11:56:31 -04:00
4 changed files with 42 additions and 37 deletions

3
.gitignore vendored
View file

@ -7,3 +7,6 @@ advancecomp-1.15.tar.gz
/advancecomp-1.23.tar.gz
/advancecomp-2.1.tar.gz
/advancecomp-2.3.tar.gz
/advancecomp-2.4.tar.gz
/advancecomp-2.5.tar.gz
/advancecomp-2.6.tar.gz

6
advancecomp.rpmlintrc Normal file
View file

@ -0,0 +1,6 @@
# Spec file comment shows that exact version is unknown
addFilter(r" unversioned-explicit-provides bundled\(7zip\)")
# Not real spelling errors
addFilter(r" spelling-error \('[Rr]ecompression',")
addFilter(r" spelling-error \('([pm]ng|gz)',")
addFilter(r" spelling-error \('adv(zip|[pm]ng|def)',")

View file

@ -1,5 +1,5 @@
Name: advancecomp
Version: 2.3
Version: 2.6
Release: %autorelease
Summary: Recompression utilities for .png, .mng, .zip and .gz files
@ -14,15 +14,21 @@ Summary: Recompression utilities for .png, .mng, .zip and .gz files
# of the sources that would be covered by the “unRAR license restriction” or
# the BSD-3-Clause license for LZFSE are present in this fork.
#
# Certain build-system files, which do not contribute to the license of the
# binary RPM, are under other permissible licenses.
#
# However, in version 1.17, the COPYING file was updated to GPLv3, with a
# changelog message (in HISTORY and elsewhere) of “Changes to GPL3.” We
# interpret this as an overall license of GPL-3.0-only.
License: GPL-3.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
# Additionally, the following bundled libraries are removed in %%prep and do
# not contribute to the licenses of the binary RPMs:
#
# Apache-2.0:
# - zopfli/
# MIT:
# - libdeflate/
SourceLicense: %{license} AND Apache-2.0 AND MIT
URL: https://www.advancemame.it/
Source0: https://github.com/amadvance/advancecomp/archive/v%{version}/advancecomp-%{version}.tar.gz
%global forgeurl https://github.com/amadvance/advancecomp
Source: %{forgeurl}/archive/v%{version}/advancecomp-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
@ -36,23 +42,13 @@ BuildRequires: dos2unix
# System library supported by upstream
BuildRequires: zlib-devel
%if 0%{?el7}
# No libdeflate package in EPEL7
Provides: bundled(libdeflate) = 0.6
%else
# Unbundled downstream
BuildRequires: pkgconfig(libdeflate)
%endif
%if 0%{?el9} || 0%{?el8} || 0%{?el7}
# No libzopfli/zopfli-devel in these distributions
# Version number based on HISTORY, which mentions that upstream commit
# 6818a0859063b946094fb6f94732836404a0d89a was used from
# https://github.com/google/zopfli/.
Provides: bundled(zopfli) = 1.0.2%{?!el7:^20160527git6818a08}
%else
BuildRequires: pkgconfig(libdeflate) >= 1.19
BuildRequires: zopfli-devel
%endif
# The point of the 2.6 release was to upgrade the bundled libdeflate; enforce
# this on the unbundled libdeflate.
Requires: libdeflate >= 1.19
# From 7z/README:
#
@ -70,7 +66,7 @@ BuildRequires: zopfli-devel
# library, and because the implementation is modified, there is no possibility
# of unbundling. Note that this was forked from the original 7-Zip, not from
# p7zip.
Provides: bundled(7z)
Provides: bundled(7zip)
%description
AdvanceCOMP contains recompression utilities for your .zip archives,
@ -88,12 +84,12 @@ This package contains:
%prep
%autosetup -p1
%autosetup
dos2unix -k doc/*.txt
%if ! 0%{?el7}
# Patch out bundled libdeflate
rm -rvf libdeflate
rm -rv libdeflate
sed -r -i '/libdeflate[\/_]/d' Makefile.am
# Fix up #include paths. The find-then-modify pattern keeps us from discarding
# mtimes on any sources that do not need modification.
@ -101,11 +97,9 @@ find . -type f -exec gawk \
'/^[[:blank:]]*#include.*libdeflate/ { print FILENAME; nextfile }' \
'{}' '+' |
xargs -r -t sed -r -i 's@^([[:blank:]]*#include.*)libdeflate/@\1@'
%endif
%if !(0%{?el9} || 0%{?el8} || 0%{?el7})
# Patch out bundled zopfli
rm -rvf zopfli
rm -rv zopfli
sed -r -i \
-e '/zopfli[\/_]/d' \
-e 's/((\(7z_SOURCES\)|WindowOut\.h).*)[[:blank:]]*\\/\1/' \
@ -116,24 +110,19 @@ find . -type f -exec gawk \
'/^[[:blank:]]*#include.*zopfli/ { print FILENAME; nextfile }' \
'{}' '+' |
xargs -r -t sed -r -i -e 's@^([[:blank:]]*#include.*)zopfli/@\1@'
%endif
%build
%set_build_flags
autoreconf --force --install --verbose
%if ! 0%{?el7}
# Link against system libdeflate
export CFLAGS="$(pkgconf --cflags libdeflate) ${CFLAGS-}"
export CXXFLAGS="$(pkgconf --cflags libdeflate) ${CXXFLAGS-}"
export LDFLAGS="$(pkgconf --libs libdeflate) ${LDFLAGS-}"
%endif
%if !(0%{?el9} || 0%{?el8} || 0%{?el7})
# Link against system zopfli
export LDFLAGS="-lzopfli ${LDFLAGS-}"
%endif
%configure
%make_build
@ -143,13 +132,20 @@ export LDFLAGS="-lzopfli ${LDFLAGS-}"
%make_install
# We dont run upstream tests (%%make_build check) because they are too
# brittle, expecting recompressed outputs to be identical. Across platforms,
# compilers, and unbundled library versions, this doesnt hold up.
%files
%license COPYING
%doc AUTHORS HISTORY README
%doc doc/adv*.txt
%doc AUTHORS
%doc HISTORY
%doc README
%doc doc/adv{def,mng,png,zip}.txt
%{_bindir}/*
%{_mandir}/man1/*
%{_bindir}/adv{def,mng,png,zip}
%{_mandir}/man1/adv{def,mng,png,zip}.1*
%changelog

View file

@ -1 +1 @@
SHA512 (advancecomp-2.3.tar.gz) = 129bb820a044b03b94d9980c7fc675ee5c273ba8ba84f1fdd341c6b2d9847c3f379cc21e64bb75c0a3c5a45a3df9e560d92143728adb4e8834ae0525ff7d5d1c
SHA512 (advancecomp-2.6.tar.gz) = 63cbb0578f96fd3f55ccb49e31bfe945649d36a11558aa482332440943d6d347f161de797b8d4469562b1d551b274c22fe08818179926d56aa4746581d3926dd