i2pd/i2pd.spec

88 lines
2.4 KiB
RPMSpec
Raw Normal View History

2017-02-19 23:22:58 +03:00
Name: i2pd
Version: 2.12.0
Release: 2
2017-02-19 23:22:58 +03:00
Summary: I2P router
License: BSD
URL: https://bitbucket.org/orignal/i2pd/src
Group: Development/Other
Source: %{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: pkgconfig(libssl)
BuildRequires: boost-devel
BuildRequires: cjdns
BuildRequires: systemd
2017-02-20 15:26:53 +03:00
BuildRequires: cmake
BuildRequires: miniupnpc-devel
2017-02-19 23:22:58 +03:00
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig, /sbin/service
Requires(postun): /sbin/service
%description
load-balanced unspoofable packet switching network - C++ port
I2P is an anonymizing network, offering a simple layer that identity-sensitive
applications can use to securely communicate. All data is wrapped with several
layers of encryption, and the network is both distributed and dynamic, with no
trusted parties.
This package contains the port of the I2P router to C++. Unless willing
to test and report problems, you should install the 'i2p' package instead.
%prep
%setup -q
%build
cmake -DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
2017-02-19 23:22:58 +03:00
-DWITH_BINARY=ON \
-DWITH_LIBRARY=ON \
-DWITH_AESNI=OFF \
-DWITH_PCH=ON \
-DWITH_MESHNET=ON \
-DWITH_UPNP=ON \
2017-02-20 16:09:11 +03:00
./build
2017-02-19 23:22:58 +03:00
%make
%install
install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_datadir}/%{name}
install -d %{buildroot}%{_sysconfdir}/%{name}
install -d %{buildroot}/var/lib
install -Dm0755 %{name} %{buildroot}%{_sbindir}
install -Dm0644 docs/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}/
install -Dm0644 docs/tunnels.conf %{buildroot}%{_sysconfdir}/%{name}/
install -Dm0644 docs/subscriptions.txt %{buildroot}%{_sysconfdir}/%{name}/
install -Dm0755 debian/%{name}.init %{buildroot}%{_initddir}/%{name}
install -Dm0644 debian/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
cp -r contrib/certificates %{buildroot}%{_datadir}/%{name}/
%post
2017-02-21 00:30:32 +03:00
/sbin/chkconfig --add %{name}
2017-02-19 23:22:58 +03:00
%preun
2017-02-21 00:30:32 +03:00
if [ $1 -eq 0 ] ; then
/sbin/service %{name} stop &>/dev/null
/sbin/chkconfig --del %{name}
fi
exit 0
2017-02-19 23:22:58 +03:00
%postun
2017-02-21 00:30:32 +03:00
if [ $1 -ge 1 ]; then
/sbin/service %{name} condrestart &>/dev/null
fi
exit 0
2017-02-19 23:22:58 +03:00
%pre
2017-02-21 00:30:32 +03:00
groupadd -f -r i2pd >/dev/null 2>&1 || :
useradd -M -n -g i2pd -r -d /var/lib/i2pd -s /bin/bash \
-c "user for i2pd router" i2pd >/dev/null 2>&1 || :
2017-02-19 23:22:58 +03:00
%files
%doc README.md LICENSE docs/configuration.md
%{_sbindir}/%{name}
%{_sysconfdir}/%{name}/*
%{_sysconfdir}/logrotate.d/%{name}
%{_datadir}/%{name}/certificates
%{_initddir}/%{name}