fix build

This commit is contained in:
Sergey Zhemoitel 2021-09-07 19:54:57 +03:00
parent 35b0a1c0e4
commit c8216cfb15

View file

@ -3,7 +3,7 @@
Name: i2pd Name: i2pd
Version: 2.39.0 Version: 2.39.0
Release: 1 Release: 2
Summary: I2P router Summary: I2P router
License: BSD License: BSD
URL: http://i2pd.website URL: http://i2pd.website
@ -19,6 +19,7 @@ BuildRequires: systemd
BuildRequires: cmake BuildRequires: cmake
BuildRequires: miniupnpc-devel BuildRequires: miniupnpc-devel
BuildRequires: chrpath BuildRequires: chrpath
BuildRequires: openssl-devel
#BuildRequires: pkgconfig(websocketpp) #BuildRequires: pkgconfig(websocketpp)
#Requires(post): /sbin/chkconfig #Requires(post): /sbin/chkconfig
@ -68,35 +69,36 @@ cmake -DCMAKE_BUILD_TYPE=Release \
-DWITH_WEBSOCKETS=OFF \ -DWITH_WEBSOCKETS=OFF \
-DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \
. .
%make %make
popd popd
%install %install
install -d %{buildroot}%{_sbindir} install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_datadir}/%{name} 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}%{_localstatedir}/lib/%{name}
install -d %{buildroot}%{_unitdir} install -d %{buildroot}%{_unitdir}
install -d %{buildroot}%{_sharedstatedir}/%{name} install -d %{buildroot}%{_sharedstatedir}/%{name}
install -d %{buildroot}%{_mandir}/man1/
pushd build pushd build
#chrpath -d i2pd chrpath -d i2pd
install -Dm0755 %{name} %{buildroot}%{_sbindir} install -Dm0755 %{name} %{buildroot}%{_sbindir}
popd popd
install -Dm0644 contrib/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}/ install -Dm0644 contrib/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}/
install -Dm0644 contrib/tunnels.conf %{buildroot}%{_sysconfdir}/%{name}/ install -Dm0644 contrib/tunnels.conf %{buildroot}%{_sysconfdir}/%{name}/
install -Dm0644 contrib/subscriptions.txt %{buildroot}%{_sysconfdir}/%{name}/ install -Dm0644 contrib/subscriptions.txt %{buildroot}%{_sysconfdir}/%{name}/
#install -Dm0755 debian/%{name}.init %{buildroot}%{_initddir}/%{name} install -Dm0644 contrib/%{name}.service %{buildroot}%{_unitdir}
install -Dm0755 contrib/rpm/%{name}.service %{buildroot}%{_unitdir} install -Dm0644 contrib/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -Dm0644 debian/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -Dm0644 debian/i2pd.1 %{buildroot}%{_mandir}/man1/
cp -r contrib/certificates %{buildroot}%{_datadir}/%{name}/ 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 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 %pre systemd
getent group i2pd >/dev/null || %{_sbindir}/groupadd -r i2pd getent group i2pd >/dev/null || %{_sbindir}/groupadd -r i2pd
getent passwd i2pd >/dev/null || \ getent passwd i2pd >/dev/null || \
@ -120,6 +122,6 @@ getent passwd i2pd >/dev/null || \
%{_sysconfdir}/%{name}/* %{_sysconfdir}/%{name}/*
%{_sysconfdir}/logrotate.d/%{name} %{_sysconfdir}/logrotate.d/%{name}
%{_datadir}/%{name}/certificates %{_datadir}/%{name}/certificates
#{_initddir}/%{name}
%{_sharedstatedir}/%{name}/certificates %{_sharedstatedir}/%{name}/certificates
%{_mandir}/man1/*
%attr(0755,i2pd,i2pd) %dir %{_localstatedir}/lib/%{name} %attr(0755,i2pd,i2pd) %dir %{_localstatedir}/lib/%{name}