From c8216cfb152fa092ef45d6a0868f7130322736dd Mon Sep 17 00:00:00 2001 From: Sergey Zhemoitel Date: Tue, 7 Sep 2021 19:54:57 +0300 Subject: [PATCH] fix build --- i2pd.spec | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/i2pd.spec b/i2pd.spec index 68f05f5..882481c 100644 --- a/i2pd.spec +++ b/i2pd.spec @@ -3,7 +3,7 @@ Name: i2pd Version: 2.39.0 -Release: 1 +Release: 2 Summary: I2P router License: BSD URL: http://i2pd.website @@ -19,6 +19,7 @@ BuildRequires: systemd BuildRequires: cmake BuildRequires: miniupnpc-devel BuildRequires: chrpath +BuildRequires: openssl-devel #BuildRequires: pkgconfig(websocketpp) #Requires(post): /sbin/chkconfig @@ -59,7 +60,7 @@ using dedicated user's permissions. %build pushd build -cmake -DCMAKE_BUILD_TYPE=Release \ +cmake -DCMAKE_BUILD_TYPE=Release \ -DWITH_LIBRARY=OFF \ -DWITH_UPNP=ON \ -DWITH_HARDENING=ON \ @@ -68,35 +69,36 @@ cmake -DCMAKE_BUILD_TYPE=Release \ -DWITH_WEBSOCKETS=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \ . + %make popd %install + install -d %{buildroot}%{_sbindir} install -d %{buildroot}%{_datadir}/%{name} -install -d %{buildroot}%{_sysconfdir}/%{name} +install -d %{buildroot}%{_sysconfdir}/%{name}/tunnels.conf.d +install -d %{buildroot}%{_sysconfdir}/%{name}/certificates install -d %{buildroot}%{_localstatedir}/lib/%{name} install -d %{buildroot}%{_unitdir} install -d %{buildroot}%{_sharedstatedir}/%{name} +install -d %{buildroot}%{_mandir}/man1/ pushd build -#chrpath -d i2pd +chrpath -d i2pd install -Dm0755 %{name} %{buildroot}%{_sbindir} popd install -Dm0644 contrib/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}/ install -Dm0644 contrib/tunnels.conf %{buildroot}%{_sysconfdir}/%{name}/ install -Dm0644 contrib/subscriptions.txt %{buildroot}%{_sysconfdir}/%{name}/ -#install -Dm0755 debian/%{name}.init %{buildroot}%{_initddir}/%{name} -install -Dm0755 contrib/rpm/%{name}.service %{buildroot}%{_unitdir} -install -Dm0644 debian/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} -cp -r contrib/certificates %{buildroot}%{_datadir}/%{name}/ +install -Dm0644 contrib/%{name}.service %{buildroot}%{_unitdir} +install -Dm0644 contrib/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +install -Dm0644 debian/i2pd.1 %{buildroot}%{_mandir}/man1/ +cp -r contrib/certificates/ %{buildroot}%{_datadir}/%{name}/certificates +cp -r contrib/tunnels.d/ %{buildroot}%{_sysconfdir}/%{name}/tunnels.conf.d ln -s %{_datadir}/%{name}/certificates %{buildroot}%{_sharedstatedir}/%{name}/certificates -install -d -m 700 %{buildroot}/%{_sharedstatedir}/i2pd -install -d -m 700 %{buildroot}/%{_localstatedir}/log/i2pd - - %pre systemd getent group i2pd >/dev/null || %{_sbindir}/groupadd -r i2pd getent passwd i2pd >/dev/null || \ @@ -120,6 +122,6 @@ getent passwd i2pd >/dev/null || \ %{_sysconfdir}/%{name}/* %{_sysconfdir}/logrotate.d/%{name} %{_datadir}/%{name}/certificates -#{_initddir}/%{name} %{_sharedstatedir}/%{name}/certificates +%{_mandir}/man1/* %attr(0755,i2pd,i2pd) %dir %{_localstatedir}/lib/%{name} \ No newline at end of file