i2pd/contrib/rpm/i2pd.spec

153 lines
4.0 KiB
RPMSpec
Raw Normal View History

%define build_timestamp %(date +"%Y%m%d")
2016-10-20 10:18:59 +00:00
Name: i2pd
2017-12-04 18:40:32 +00:00
Version: 2.17.0
Release: %{build_timestamp}git%{?dist}
2016-10-20 10:18:59 +00:00
Summary: I2P router written in C++
Obsoletes: %{name}-systemd
2016-10-20 10:18:59 +00:00
License: BSD
URL: https://github.com/PurpleI2P/i2pd
Source0: https://github.com/PurpleI2P/i2pd/archive/%{version}/%name-%version.tar.gz
%if 0%{?rhel} == 7
BuildRequires: cmake3
%else
BuildRequires: cmake
%endif
BuildRequires: chrpath
BuildRequires: gcc-c++
BuildRequires: zlib-devel
BuildRequires: boost-devel
BuildRequires: openssl-devel
BuildRequires: miniupnpc-devel
BuildRequires: systemd-units
Requires: systemd
Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd
%description
2016-10-20 10:18:59 +00:00
C++ implementation of I2P.
%prep
%setup -q
%build
cd build
2018-01-06 03:48:51 +00:00
%if 0%{?rhel} == 7
2016-10-20 10:18:59 +00:00
%cmake3 \
-DWITH_LIBRARY=OFF \
-DWITH_UPNP=ON \
-DWITH_HARDENING=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF
%else
%cmake \
-DWITH_LIBRARY=OFF \
-DWITH_UPNP=ON \
-DWITH_HARDENING=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF
%endif
make %{?_smp_mflags}
%install
cd build
chrpath -d i2pd
2018-01-22 18:55:12 +00:00
install -D -m 755 i2pd %{buildroot}%{_sbindir}/i2pd
install -D -m 755 %{_builddir}/%{name}-%{version}/contrib/i2pd.conf %{buildroot}%{_sysconfdir}/i2pd/i2pd.conf
install -D -m 755 %{_builddir}/%{name}-%{version}/contrib/tunnels.conf %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf
install -d -m 755 %{buildroot}/%{_datadir}/i2pd
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/certificates/ %{buildroot}%{_datadir}/i2pd/certificates
2016-10-20 13:49:56 +00:00
install -D -m 644 %{_builddir}/%{name}-%{version}/contrib/rpm/i2pd.service %{buildroot}/%{_unitdir}/i2pd.service
2016-10-20 10:18:59 +00:00
install -d -m 700 %{buildroot}/%{_sharedstatedir}/i2pd
2018-01-22 18:55:12 +00:00
install -d -m 700 %{buildroot}/%{_localstatedir}/log/i2pd
ln -s %{_datadir}/%{name}/certificates %{buildroot}%{_sharedstatedir}/%{name}/certificates
2016-10-20 10:18:59 +00:00
%pre
2016-10-20 10:18:59 +00:00
getent group i2pd >/dev/null || %{_sbindir}/groupadd -r i2pd
getent passwd i2pd >/dev/null || \
%{_sbindir}/useradd -r -g i2pd -s %{_sbindir}/nologin \
-d %{_sharedstatedir}/i2pd -c 'I2P Service' i2pd
%post
2016-10-20 10:18:59 +00:00
%systemd_post i2pd.service
%preun
2016-10-20 10:18:59 +00:00
%systemd_preun i2pd.service
%postun
2016-10-20 10:18:59 +00:00
%systemd_postun_with_restart i2pd.service
%files
%doc LICENSE README.md
2018-01-22 18:55:12 +00:00
%{_sbindir}/i2pd
%{_datadir}/i2pd/certificates
%config(noreplace) %{_sysconfdir}/i2pd/*
/%{_unitdir}/i2pd.service
%dir %attr(0700,i2pd,i2pd) %{_localstatedir}/log/i2pd
%dir %attr(0700,i2pd,i2pd) %{_sharedstatedir}/i2pd
%{_sharedstatedir}/i2pd/certificates
2016-10-20 10:18:59 +00:00
%changelog
* Sat Jan 30 2018 l-n-s <supervillain@riseup.net> - 2.17.0-1
- Added certificates and default configuration files
- Merge i2pd with i2pd-systemd package
- Fixed package changelogs to comply with guidelines
2017-12-04 18:40:32 +00:00
* Mon Dec 04 2017 orignal <i2porignal@yandex.ru> - 2.17.0
- update to 2.17.0
2017-12-04 18:40:32 +00:00
2017-11-13 19:17:30 +00:00
* Mon Nov 13 2017 orignal <i2porignal@yandex.ru> - 2.16.0
- update to 2.16.0
2017-11-13 19:17:30 +00:00
2017-08-17 18:09:16 +00:00
* Thu Aug 17 2017 orignal <i2porignal@yandex.ru> - 2.15.0
- update to 2.15.0
2017-08-17 18:09:16 +00:00
* Thu Jun 01 2017 orignal <i2porignal@yandex.ru> - 2.14.0
- update to 2.14.0
2017-06-03 22:23:22 +00:00
* Thu Apr 06 2017 orignal <i2porignal@yandex.ru> - 2.13.0
- update to 2.13.0
2017-06-03 22:23:22 +00:00
* Tue Feb 14 2017 orignal <i2porignal@yandex.ru> - 2.12.0
- update to 2.12.0
* Mon Dec 19 2016 orignal <i2porignal@yandex.ru> - 2.11.0
- update to 2.11.0
* Thu Oct 20 2016 Anatolii Vorona <vorona.tolik@gmail.com> - 2.10.0-3
2016-10-20 10:18:59 +00:00
- add support C7
2016-10-20 13:49:56 +00:00
- move rpm-related files to contrib folder
2016-10-20 10:18:59 +00:00
* Sun Oct 16 2016 Oleg Girko <ol@infoserver.lv> - 2.10.0-1
- update to 2.10.0
* Sun Aug 14 2016 Oleg Girko <ol@infoserver.lv> - 2.9.0-1
- update to 2.9.0
* Sun Aug 07 2016 Oleg Girko <ol@infoserver.lv> - 2.8.0-2
- rename daemon subpackage to systemd
* Sat Aug 06 2016 Oleg Girko <ol@infoserver.lv> - 2.8.0-1
- update to 2.8.0
- remove wrong rpath from i2pd binary
- add daemon subpackage with systemd unit file
* Sat May 21 2016 Oleg Girko <ol@infoserver.lv> - 2.7.0-1
- update to 2.7.0
* Tue Apr 05 2016 Oleg Girko <ol@infoserver.lv> - 2.6.0-1
- update to 2.6.0
* Tue Jan 26 2016 Yaroslav Sidlovsky <zawertun@gmail.com> - 2.3.0-1
- initial package for version 2.3.0