added spec
This commit is contained in:
parent
6a81f50c77
commit
8bede44aa8
1 changed files with 113 additions and 0 deletions
113
zerotier-one.spec
Normal file
113
zerotier-one.spec
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
Name: zerotier-one
|
||||
Version: 1.12.2
|
||||
|
||||
Release: alt1
|
||||
Summary: ZeroTier network virtualization service
|
||||
|
||||
License: BUSL-1.1
|
||||
#ZeroTier BUSL 1.1
|
||||
Group: Networking/Other
|
||||
Url: https://www.zerotier.com
|
||||
|
||||
# Source-url: # upstream submodule packaged with ./*.sh
|
||||
Source0: %name.tar
|
||||
|
||||
# Cargo modules for build rust code in the zeroidc dir
|
||||
Source1: vendor.tar
|
||||
|
||||
ExcludeArch: armh
|
||||
|
||||
BuildRequires: udev-rules clang libstdc++-devel
|
||||
BuildRequires: rust-cargo
|
||||
BuildRequires: libssl-devel libminiupnpc-devel
|
||||
|
||||
# for man pages
|
||||
BuildRequires: /usr/bin/ronn
|
||||
|
||||
Requires: udev-rules
|
||||
Requires(pre): %_sbindir/useradd, %_bindir/getent
|
||||
|
||||
%description
|
||||
ZeroTier is a software defined networking layer for Earth.
|
||||
|
||||
It can be used for on-premise network virtualization, as a peer to peer VPN
|
||||
for mobile teams, for hybrid or multi-data-center cloud deployments, or just
|
||||
about anywhere else secure software defined virtual networking is useful.
|
||||
|
||||
This is our OS-level client service. It allows Mac, Linux, Windows,
|
||||
FreeBSD, and soon other types of clients to join ZeroTier virtual networks
|
||||
like conventional VPNs or VLANs. It can run on native systems, VMs, or
|
||||
containers (Docker, OpenVZ, etc.).
|
||||
|
||||
%prep
|
||||
mkdir -p zerotier-one
|
||||
tar -xf %SOURCE0 -C zerotier-one
|
||||
|
||||
cd zerotier-one
|
||||
|
||||
tar -xf %SOURCE1 -C .
|
||||
|
||||
mkdir -p zeroidc/.cargo
|
||||
###
|
||||
grep 'vendored-sources' zeroidc/.cargo/config.toml || cat >> zeroidc/.cargo/config.toml <<EOF
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/glimberg/rust-jwt"]
|
||||
git = "https://github.com/glimberg/rust-jwt.git"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "$PWD/vendor"
|
||||
|
||||
[net]
|
||||
offline = true
|
||||
EOF
|
||||
#==
|
||||
cp -a vendor/time-0.3.25 vendor/time-0.3.25-patched
|
||||
perl -0777 -pi -e 's/let items = format_items\s*\n\s*\.map\(\|res\|\s*res\.map\(Into::into\)\)\s*\n\s*\.collect::<Result<Box<_>, _>>\(\)\?\s*;/let items = format_items.collect::<Result<Box<_>, _>>()?;/s' \
|
||||
vendor/time-0.3.25-patched/src/format_description/parse/mod.rs
|
||||
###
|
||||
grep zeroidc/Cargo.toml 'time-0.3.25-patched' || cat >> zeroidc/Cargo.toml <<EOF
|
||||
[patch.crates-io]
|
||||
time = { path = "../vendor/time-0.3.25-patched" }
|
||||
EOF
|
||||
#==
|
||||
|
||||
%build
|
||||
cd zerotier-one
|
||||
%make_build ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one
|
||||
|
||||
%pre
|
||||
%_bindir/getent passwd zerotier-one || %_sbindir/useradd -r -d /var/lib/zerotier-one -s /sbin/nologin zerotier-one
|
||||
|
||||
%install
|
||||
cd zerotier-one
|
||||
%makeinstall_std
|
||||
mkdir -p %buildroot%_unitdir/
|
||||
cp debian/zerotier-one.service %buildroot%_unitdir/%name.service
|
||||
|
||||
%files
|
||||
%{_sbindir}/*
|
||||
#%{_mandir}/*
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man8/zerotier-one.8.xz
|
||||
%{_localstatedir}/*
|
||||
%{_unitdir}/%{name}.service
|
||||
|
||||
%post
|
||||
%systemd_post zerotier-one.service
|
||||
|
||||
%preun
|
||||
%systemd_preun zerotier-one.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart zerotier-one.service
|
||||
|
||||
%changelog
|
||||
* Mon Dec 25 2023 Vitaly Lipatov <lav@altlinux.ru> 1.12.2-alt1
|
||||
- new version 1.12.2 (with rpmrb script)
|
||||
|
||||
* Sun Apr 23 2023 Vitaly Lipatov <lav@altlinux.ru> 1.10.6-alt1
|
||||
- initial build for ALT Sisyphus
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue