Skip to content

Commit

Permalink
Specs refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Sep 5, 2024
1 parent 2c081c3 commit 9ff089e
Show file tree
Hide file tree
Showing 47 changed files with 183 additions and 1,702 deletions.
32 changes: 12 additions & 20 deletions specs/7zip.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

################################################################################

%define major_ver 22
%define minor_ver 01
%define major_ver 24
%define minor_ver 08

%define shortname 7z

Expand All @@ -26,12 +26,7 @@ Source100: checksum.sha512

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: make dos2unix
%if 0%{?rhel} <= 7
BuildRequires: devtoolset-9-gcc-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: make gcc-c++ dos2unix

Provides: %{name} = %{version}-%{release}
Provides: %{shortname} = %{version}-%{release}
Expand All @@ -44,15 +39,19 @@ Provides: %{shortname} = %{version}-%{release}
################################################################################

%prep
%{crc_check}
%crc_check
%autosetup -cn 7z%{major_ver}%{minor_ver}-linux

%setup -qcn 7z%{major_ver}%{minor_ver}-linux
dos2unix DOC/*.txt

# perfecto:ignore
chmod -x DOC/*.txt

# Install asmc to deps directory
mkdir deps
cp %{SOURCE1} deps/asmc

# perfecto:ignore
chmod +x deps/asmc

%if 0%{?rhel} < 9
Expand All @@ -64,11 +63,6 @@ sed -i 's#LFLAGS_ALL = -s#LFLAGS_ALL =#' CPP/7zip/7zip_gcc.mak
sed -i 's/$(CXX) -o $(PROGPATH)/$(CXX) -Wl,-z,noexecstack -o $(PROGPATH)/' CPP/7zip/7zip_gcc.mak

%build
%if 0%{?rhel} <= 7
# Use gcc and gcc-c++ from DevToolSet 9
export PATH="/opt/rh/devtoolset-9/root/usr/bin:$PATH"
%endif

# Add directory with asmc to PATH
export PATH="$(pwd)/deps:$PATH"

Expand All @@ -86,11 +80,6 @@ ln -sf %{_bindir}/7zz %{buildroot}%{_bindir}/%{shortname}

################################################################################

%clean
rm -rf %{buildroot}

################################################################################

%files
%defattr(-,root,root,-)
%doc DOC/*.txt
Expand All @@ -100,6 +89,9 @@ rm -rf %{buildroot}
################################################################################

%changelog
* Fri Sep 06 2024 Anton Novojilov <[email protected]> - 24.08-0
- https://sourceforge.net/p/sevenzip/discussion/45797/thread/f162d68dcd/

* Fri Dec 16 2022 Anton Novojilov <[email protected]> - 22.01-0
- UDF support was improved to UDF version 2.60.
- HFS and APFS support was improved.
23 changes: 3 additions & 20 deletions specs/erlang/erlang22.spec
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel unixODBC-devel tcl-devel make
BuildRequires: tk-devel flex bison gd-devel gd-devel libxslt
BuildRequires: valgrind-devel java-1.8.0-openjdk-devel
BuildRequires: lksctp-tools-devel autoconf

%if 0%{?rhel} <= 7
BuildRequires: devtoolset-11-gcc-c++ devtoolset-11-binutils
%else
BuildRequires: gcc-c++
%endif
BuildRequires: lksctp-tools-devel autoconf gcc-c++

Requires: tk tcl

Expand Down Expand Up @@ -722,24 +716,16 @@ a few bugs in the scanner, and improves HTML export.
################################################################################

%prep
%{crc_check}

%setup -qn otp-OTP-%{ver_string}
%crc_check
%autosetup -p1 -n otp-OTP-%{ver_string}

tar xzvf %{SOURCE10}

%patch0 -p1

%build
export CFLAGS="%{optflags} -fPIC"
export CXXLAGS=$CFLAGS
export BUILDDIR=$(pwd)

%if 0%{?rhel} <= 7
# Use gcc and gcc-c++ from DevToolSet 11
export PATH="/opt/rh/devtoolset-11/root/usr/bin:$PATH"
%endif

### Static LibreSSL build start ###

pushd libressl-%{libre_ver}
Expand Down Expand Up @@ -858,9 +844,6 @@ if [[ $1 -ge 1 ]] ; then
%{__sysctl} daemon-reload &>/dev/null || :
fi

%clean
rm -rf %{buildroot}

################################################################################

%files
Expand Down
21 changes: 3 additions & 18 deletions specs/erlang/erlang23.spec
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel unixODBC-devel tcl-devel make
BuildRequires: tk-devel flex bison gd-devel gd-devel libxslt
BuildRequires: valgrind-devel java-1.8.0-openjdk-devel
BuildRequires: lksctp-tools-devel autoconf

%if 0%{?rhel} <= 7
BuildRequires: devtoolset-11-gcc-c++ devtoolset-11-binutils
%else
BuildRequires: gcc-c++
%endif
BuildRequires: lksctp-tools-devel autoconf gcc-c++

Requires: tk tcl

Expand Down Expand Up @@ -722,24 +716,18 @@ a few bugs in the scanner, and improves HTML export.
################################################################################

%prep
%{crc_check}
%crc_check
%autosetup -p1 -n otp-OTP-%{ver_string}

%setup -qn otp-OTP-%{ver_string}

tar xzvf %{SOURCE10}

%patch0 -p1

%build
export CFLAGS="%{optflags} -fPIC"
export CXXLAGS=$CFLAGS
export BUILDDIR=$(pwd)

%if 0%{?rhel} <= 7
# Use gcc and gcc-c++ from DevToolSet 11
export PATH="/opt/rh/devtoolset-11/root/usr/bin:$PATH"
%endif

### Static LibreSSL build start ###

pushd libressl-%{libre_ver}
Expand Down Expand Up @@ -858,9 +846,6 @@ if [[ $1 -ge 1 ]] ; then
%{__sysctl} daemon-reload &>/dev/null || :
fi

%clean
rm -rf %{buildroot}

################################################################################

%files
Expand Down
23 changes: 3 additions & 20 deletions specs/erlang/erlang24.spec
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel unixODBC-devel tcl-devel make
BuildRequires: tk-devel flex bison gd-devel gd-devel libxslt
BuildRequires: valgrind-devel java-1.8.0-openjdk-devel
BuildRequires: lksctp-tools-devel autoconf

%if 0%{?rhel} <= 7
BuildRequires: devtoolset-11-gcc-c++ devtoolset-11-binutils
%else
BuildRequires: gcc-c++
%endif
BuildRequires: lksctp-tools-devel autoconf gcc-c++

Requires: tk tcl

Expand Down Expand Up @@ -704,24 +698,16 @@ a few bugs in the scanner, and improves HTML export.
################################################################################

%prep
%{crc_check}

%setup -qn otp-OTP-%{ver_string}
%crc_check
%autosetup -p1 -n otp-OTP-%{ver_string}

tar xzvf %{SOURCE10}

%patch0 -p1

%build
export CFLAGS="%{optflags} -fPIC"
export CXXLAGS=$CFLAGS
export BUILDDIR=$(pwd)

%if 0%{?rhel} <= 7
# Use gcc and gcc-c++ from DevToolSet 11
export PATH="/opt/rh/devtoolset-11/root/usr/bin:$PATH"
%endif

### Static LibreSSL build start ###

pushd libressl-%{libre_ver}
Expand Down Expand Up @@ -839,9 +825,6 @@ if [[ $1 -ge 1 ]] ; then
%{__sysctl} daemon-reload &>/dev/null || :
fi

%clean
rm -rf %{buildroot}

################################################################################

%files
Expand Down
7 changes: 2 additions & 5 deletions specs/goaccess/goaccess.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ for system administrators that require a visual server report on the fly.
################################################################################

%prep
%{crc_check}

%setup -q

%patch1 -p1
%crc_check
%autosetup -p1

%build
%configure --enable-utf8 \
Expand Down
7 changes: 2 additions & 5 deletions specs/golang/golang.spec
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ for _,d in pairs({"api", "doc", "include", "lib", "src"}) do
end

%prep
%{crc_check}

%setup -qn go

%patch0 -p1
%crc_check
%autosetup -p1 -n go

%build
export CC="gcc"
Expand Down
8 changes: 3 additions & 5 deletions specs/hdf/hdf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,10 @@ HDF4 static libraries.
################################################################################

%prep
%{crc_check}

%setup -q

%patch0 -p1 -b .maxavailfiles
%crc_check
%autosetup -p1

# perfecto:ignore
chmod a-x *hdf/*/*.c hdf/*/*.h

%build
Expand Down
48 changes: 18 additions & 30 deletions specs/id3lib/id3lib.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Source2: id3.pc
Source100: checksum.sha512

Patch0: %{name}-dox.patch
Patch1: %{name}-%{version}-autoreconf.patch
Patch2: %{name}-%{version}-io_helpers-163101.patch
Patch3: %{name}-%{version}-mkstemp.patch
Patch4: %{name}-%{version}-includes.patch
Patch5: %{name}-vbr_buffer_overflow.diff
Patch6: 20-create-manpages.patch
Patch7: 60-fix_make_check.patch
Patch8: 60-%{name}-missing-nullpointer-check.patch
Patch9: %{name}-%{version}-fix-utf16-stringlists.patch
Patch11: %{name}-%{version}-autoreconf.patch
Patch12: %{name}-%{version}-io_helpers-163101.patch
Patch13: %{name}-%{version}-mkstemp.patch
Patch14: %{name}-%{version}-includes.patch
Patch15: %{name}-vbr_buffer_overflow.diff
Patch16: 20-create-manpages.patch
Patch17: 60-fix_make_check.patch
Patch18: 60-%{name}-missing-nullpointer-check.patch
Patch19: %{name}-%{version}-fix-utf16-stringlists.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Expand All @@ -54,33 +54,24 @@ tell mp3 header info, like bitrate etc.

%package devel

Summary: Development tools for the id3lib library
Group: Development/Libraries
Summary: Development tools for the id3lib library
Group: Development/Libraries

Requires: %{name} = %{version}-%{release}
Requires: zlib-devel
Requires: %{name} = %{version}-%{release}
Requires: zlib-devel

%description devel
This package provides files needed to develop with the id3lib library.

################################################################################

%prep
%{crc_check}

%setup -q

%patch0 -p0
%patch1 -p1 -b .autoreconf
%patch2 -p1 -b .io_helpers-163101
%patch3 -p1 -b .mkstemp
%patch4 -p1 -b .gcc43
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%crc_check
%autosetup -N
%autopatch -p0 -M 9
%autopatch -p1 -m 10

# perfecto:ignore
chmod -x src/*.h src/*.cpp include/id3/*.h

sed -i -e 's/\r//' doc/id3v2.3.0.*
Expand Down Expand Up @@ -132,9 +123,6 @@ install -pm 644 %{SOURCE2} %{buildroot}%{_libdir}/pkgconfig/id3.pc
%postun
/sbin/ldconfig

%clean
rm -rf %{buildroot}

################################################################################

%files
Expand Down
Loading

0 comments on commit 9ff089e

Please sign in to comment.