[rpm] add Fedora ELN support

Signed-off-by: r4sas <r4sas@i2pmail.org>
pull/1968/head
r4sas 9 months ago
parent 4ed19c05f6
commit 70829ee79e
No known key found for this signature in database
GPG Key ID: 66F6C87B98EBCFE2

@ -11,9 +11,9 @@ URL: https://github.com/PurpleI2P/i2pd
Source0: https://github.com/PurpleI2P/i2pd/archive/openssl/i2pd-openssl.tar.gz Source0: https://github.com/PurpleI2P/i2pd/archive/openssl/i2pd-openssl.tar.gz
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
BuildRequires: cmake3 BuildRequires: cmake3
%else %else
BuildRequires: cmake BuildRequires: cmake
%endif %endif
BuildRequires: chrpath BuildRequires: chrpath
@ -28,9 +28,11 @@ Requires: logrotate
Requires: systemd Requires: systemd
Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd
%description %description
C++ implementation of I2P. C++ implementation of I2P.
%prep %prep
%setup -q -n i2pd-openssl %setup -q -n i2pd-openssl
@ -38,72 +40,56 @@ C++ implementation of I2P.
%build %build
cd build cd build
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
%cmake3 \ %cmake3 \
-DWITH_LIBRARY=OFF \ -DWITH_LIBRARY=OFF \
-DWITH_UPNP=ON \ -DWITH_UPNP=ON \
-DWITH_HARDENING=ON \ -DWITH_HARDENING=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF
%else %else
%cmake \ %cmake \
-DWITH_LIBRARY=OFF \ -DWITH_LIBRARY=OFF \
-DWITH_UPNP=ON \ -DWITH_UPNP=ON \
-DWITH_HARDENING=ON \ -DWITH_HARDENING=ON \
%if 0%{?fedora} > 29 %if 0%{?fedora} > 29
-DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \
. .
%else %else
-DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF
%endif
%endif %endif
%endif
%if 0%{?rhel} == 9 %if 0%{?rhel} == 9 || 0%{?fedora} >= 35 || 0%{?eln}
pushd redhat-linux-build pushd redhat-linux-build
%endif
%if 0%{?fedora} >= 35
pushd redhat-linux-build
%else %else
%if 0%{?fedora} >= 33 %if 0%{?fedora} >= 33
pushd %{_target_platform} pushd %{_target_platform}
%endif %endif
%endif
%if 0%{?mageia} > 7 %if 0%{?mageia} > 7
pushd build pushd build
%endif
%endif %endif
make %{?_smp_mflags} make %{?_smp_mflags}
%if 0%{?rhel} == 9 %if 0%{?rhel} == 9 || 0%{?fedora} >= 33 || 0%{?mageia} > 7
popd popd
%endif %endif
%if 0%{?fedora} >= 33
popd
%endif
%if 0%{?mageia} > 7
popd
%endif
%install %install
pushd build pushd build
%if 0%{?rhel} == 9 %if 0%{?rhel} == 9 || 0%{?fedora} >= 35 || 0%{?eln}
pushd redhat-linux-build pushd redhat-linux-build
%endif
%if 0%{?fedora} >= 35
pushd redhat-linux-build
%else %else
%if 0%{?fedora} >= 33 %if 0%{?fedora} >= 33
pushd %{_target_platform} pushd %{_target_platform}
%endif %endif
%endif
%if 0%{?mageia} %if 0%{?mageia}
pushd build pushd build
%endif
%endif %endif
chrpath -d i2pd chrpath -d i2pd

@ -1,6 +1,6 @@
Name: i2pd Name: i2pd
Version: 2.48.0 Version: 2.48.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: I2P router written in C++ Summary: I2P router written in C++
Conflicts: i2pd-git Conflicts: i2pd-git
@ -9,9 +9,9 @@ URL: https://github.com/PurpleI2P/i2pd
Source0: https://github.com/PurpleI2P/i2pd/archive/%{version}/%name-%version.tar.gz Source0: https://github.com/PurpleI2P/i2pd/archive/%{version}/%name-%version.tar.gz
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
BuildRequires: cmake3 BuildRequires: cmake3
%else %else
BuildRequires: cmake BuildRequires: cmake
%endif %endif
BuildRequires: chrpath BuildRequires: chrpath
@ -26,9 +26,11 @@ Requires: logrotate
Requires: systemd Requires: systemd
Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd
%description %description
C++ implementation of I2P. C++ implementation of I2P.
%prep %prep
%setup -q %setup -q
@ -36,71 +38,56 @@ C++ implementation of I2P.
%build %build
cd build cd build
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
%cmake3 \ %cmake3 \
-DWITH_LIBRARY=OFF \ -DWITH_LIBRARY=OFF \
-DWITH_UPNP=ON \ -DWITH_UPNP=ON \
-DWITH_HARDENING=ON \ -DWITH_HARDENING=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF
%else %else
%cmake \ %cmake \
-DWITH_LIBRARY=OFF \ -DWITH_LIBRARY=OFF \
-DWITH_UPNP=ON \ -DWITH_UPNP=ON \
-DWITH_HARDENING=ON \ -DWITH_HARDENING=ON \
%if 0%{?fedora} > 29 %if 0%{?fedora} > 29
-DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \
. .
%else %else
-DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF
%endif %endif
%endif %endif
%if 0%{?rhel} == 9 %if 0%{?rhel} == 9 || 0%{?fedora} >= 35 || 0%{?eln}
pushd redhat-linux-build pushd redhat-linux-build
%endif
%if 0%{?fedora} >= 35
pushd redhat-linux-build
%else %else
%if 0%{?fedora} >= 33 %if 0%{?fedora} >= 33
pushd %{_target_platform} pushd %{_target_platform}
%endif %endif
%endif
%if 0%{?mageia} > 7 %if 0%{?mageia} > 7
pushd build pushd build
%endif
%endif %endif
make %{?_smp_mflags} make %{?_smp_mflags}
%if 0%{?rhel} == 9 %if 0%{?rhel} == 9 || 0%{?fedora} >= 33 || 0%{?mageia} > 7
popd popd
%endif %endif
%if 0%{?fedora} >= 33
popd
%endif
%if 0%{?mageia} > 7
popd
%endif
%install %install
pushd build pushd build
%if 0%{?rhel} == 9 %if 0%{?rhel} == 9 || 0%{?fedora} >= 35 || 0%{?eln}
pushd redhat-linux-build pushd redhat-linux-build
%endif
%if 0%{?fedora} >= 35
pushd redhat-linux-build
%else %else
%if 0%{?fedora} >= 33 %if 0%{?fedora} >= 33
pushd %{_target_platform} pushd %{_target_platform}
%endif %endif
%endif
%if 0%{?mageia} %if 0%{?mageia}
pushd build pushd build
%endif
%endif %endif
chrpath -d i2pd chrpath -d i2pd

Loading…
Cancel
Save