Search
SailfishOS Open Build Service
>
Projects
>
sailfishos
:
chum
:
testing
>
i2pd
> _service:tar_git:i2pd.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:i2pd.spec of Package i2pd
# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version 0.32 # Name: i2pd # >> macros # << macros %define custom_vardir /home/.system/%{_var}/lib %define with_daemon 1 %define with_family 1 %define with_ui 1 Summary: End-to-End encrypted and anonymous Internet daemon Version: 2.50.2+git3 Release: 1 Group: Applications/Internet License: BSD-3-Clause URL: https://i2pd.website Source0: %{name}-%{version}.tar.gz Source1: %{name}.conf Source2: %{name}.service Source3: openssl-family.cnf Source100: i2pd.yaml Requires: systemd Requires(post): systemd Requires(post): /sbin/ldconfig Requires(postun): systemd Requires(postun): /sbin/ldconfig BuildRequires: pkgconfig(libssl) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(atomic_ops) BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: boost-devel >= 1.49 BuildRequires: systemd BuildRequires: openssl BuildRequires: qt5-qmake BuildRequires: sailfish-svg2png %description %{summary}. I2P (Invisible Internet Protocol) is a universal anonymous network layer. All communications over I2P are anonymous and end-to-end encrypted, participants don't reveal their real IP addresses. I2P client is a software used for building and using anonymous I2P networks. Such networks are commonly used for anonymous peer-to-peer applications (filesharing, cryptocurrencies) and anonymous client-server applications (websites, instant messengers, chat-servers). I2P allows people from all around the world to communicate and share information without restrictions. Notices for SailfishOS: the config lives in `/home/.system/var/lib/i2pd`, not `/etc` the web console is reachable at http://127.0.0.1:7070 join the 'sailfishos' family! For more information, see the README at https://github.com/nephros/i2pd/blob/master/README.md %if "%{?vendor}" == "chum" PackageName: I2Pd Type: console-application DeveloperName: Purple I2P PackagerName: nephros Categories: - Network - P2P Custom: Repo: https://github.com/PurpleI2P/i2pd PackagingRepo: https://github.com/nephros/i2pd Icon: https://i2pd.website/images/favicon.png Url: Homepage: https://i2pd.website Help: https://i2pd.readthedocs.io/en/latest Donations: https://i2pd.website/#donations %endif %package ui Summary: UI components for %{name} License: ASL 2.0 and Public Domain Group: Applications/Internet BuildArch: noarch Requires: %{name} Requires: jolla-settings %description ui Settings UI integration for I2Pd. Adds a Settings entry and a TopMenu switch to start/stop the demon and show some state information. Installing this will install the daemon as well. For more information, see description of the daemon package and the README at https://github.com/nephros/i2pd/blob/master/README.md I2P (Invisible Internet Protocol) is a universal anonymous network layer. All communications over I2P are anonymous and end-to-end encrypted, participants don't reveal their real IP addresses. %if "%{?vendor}" == "chum" PackageName: I2Pd Settings UI Type: desktop-application DeveloperLogin: nephros Categories: - Network - P2P Custom: Repo: https://github.com/nephros/i2pd Icon: https://i2pd.website/images/favicon.png Screenshots: - https://raw.githubusercontent.com/nephros/i2pd/master/Screenshot_001.png %endif %prep %setup -q -n %{name}-%{version}/upstream # >> setup echo "rpm with macros:" %if %{with_daemon} echo "Building WITH daemon" %else echo "Building WITHOUT daemon" %endif %if %{with_family} echo "Family certificate: ENABLED" %endif %if %{with_ui} echo "UI components: ENABLED" %endif # << setup %build # >> build pre %if %{with_daemon} pushd build # << build pre %cmake . \ -DCMAKE_BUILD_TYPE=Release # >> build post popd %endif # generate familty certificate files: # TODO: build-time is probably not the brightest way to do that... %if %{with_family} mkdir -p %{_builddir}/family-cert pushd %{_builddir}/family-cert openssl ecparam -name prime256v1 -genkey -out sailfishos.key openssl req -new -key sailfishos.key -out sailfishos.csr -config %{SOURCE3} touch v3.ext openssl x509 -req -days 3650 -in sailfishos.csr -signkey sailfishos.key -out sailfishos.crt -extfile v3.ext popd %endif # << build post %install rm -rf %{buildroot} # >> install pre %if %{with_daemon} pushd build %make_install popd %endif # << install pre # >> install post %if %{with_daemon} install -m 644 -D %{SOURCE1} %{buildroot}%{custom_vardir}/%{name}/%{name}.conf install -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service pushd contrib install -m 644 -D tunnels.conf %{buildroot}%{custom_vardir}/%{name}/tunnels.conf.example install -m 644 -D %{name}.conf %{buildroot}%{custom_vardir}/%{name}/%{name}.conf.example mkdir -p %{buildroot}%{custom_vardir}/%{name}/tunnels.d mkdir -p %{buildroot}%{custom_vardir}/%{name}/addressbook mkdir -p %{buildroot}%{custom_vardir}/%{name}/certificates for f in certificates/family/* certificates/reseed/* ; do install -m 644 -D ${f} %{buildroot}%{custom_vardir}/%{name}/${f} done popd %endif %if %{with_family} install -m 640 -D %{_builddir}/family-cert/sailfishos.key %{buildroot}%{custom_vardir}/%{name}/family/sailfishos.key install -m 640 -D %{_builddir}/family-cert/sailfishos.crt %{buildroot}%{custom_vardir}/%{name}/family/sailfishos.crt %endif ## UI: %if %{with_ui} pushd %{_builddir}/%{name}-%{version} %qmake5 %qmake5_install popd %endif # << install post %post /sbin/ldconfig # >> post if [ "$1" -ge 1 ]; then systemctl daemon-reload || : systemctl try-restart %{name}.service || : fi # << post %postun /sbin/ldconfig # >> postun if [ "$1" -eq 0 ]; then systemctl stop %{name}.service || : systemctl daemon-reload || : fi # << postun %files %defattr(-,root,root,-) # >> files %if %{with_daemon} %license LICENSE %{_unitdir}/%{name}.service %{_bindir}/%{name} %{_libdir}/*.so %attr(775,root,inet) %dir %{custom_vardir}/%{name} %attr(770,root,inet) %dir %{custom_vardir}/%{name}/tunnels.d %attr(775,root,inet) %dir %{custom_vardir}/%{name}/addressbook %{custom_vardir}/%{name}/certificates/*/* %attr(640,root,inet) %config(noreplace) %{custom_vardir}/%{name}/%{name}.conf %config %{custom_vardir}/%{name}/%{name}.conf.example %config %{custom_vardir}/%{name}/tunnels.conf.example %if %{with_family} %attr(640,root,inet) %config %{custom_vardir}/%{name}/family/sailfishos.crt %attr(640,root,inet) %config %{custom_vardir}/%{name}/family/sailfishos.key %endif %endif # !!! this removes the following files section so we do not get an empty rpm: %if %{with_ui} # << files %files ui %defattr(-,root,root,-) # >> files ui %{_datadir}/jolla-settings/entries/i2pd.json %{_datadir}/jolla-settings/pages/i2p/* %{_datadir}/themes/*/meegotouch/*/icons/* %{_datadir}/icons/hicolor/scalable/apps/*.svg %endif # << files ui