2024-04-01 11:52:38 +08:00
|
|
|
# Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS)
|
|
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
%global _bin_path /usr/local/bin
|
|
|
|
|
%global _service_path /usr/lib/systemd/system
|
|
|
|
|
%global debug_package %{nil}
|
2024-04-02 11:28:31 +08:00
|
|
|
%global package_name space-agent
|
2024-04-01 11:52:38 +08:00
|
|
|
|
|
|
|
|
Name: ao.space
|
2024-04-02 11:28:31 +08:00
|
|
|
Version: 1.0.2
|
2024-04-02 11:28:31 +08:00
|
|
|
Release: 3
|
2024-04-01 11:52:38 +08:00
|
|
|
Summary: AO.space is a open source project that focuses on protecting personal data security and privacy. Utilizing end-to-end encryption and device-based authentication, users have complete control over their personal accounts and data.
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
URL: https://github.com/ao-space/space-agent
|
2024-04-02 11:28:31 +08:00
|
|
|
Source0: space-agent-%{version}.tar.gz
|
2024-04-01 11:52:38 +08:00
|
|
|
|
|
|
|
|
AutoReq: no
|
|
|
|
|
AutoProv: yes
|
|
|
|
|
|
|
|
|
|
Provides: aospace = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
BuildRequires: golang >= 1.20
|
|
|
|
|
Requires: docker
|
|
|
|
|
|
|
|
|
|
ExclusiveArch: aarch64 x86_64 riscv64
|
|
|
|
|
ExclusiveOS: Linux
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
AO.space is a open source project that focuses on protecting personal data security and privacy. Utilizing end-to-end encryption and device-based authentication, users have complete control over their personal accounts and data.
|
|
|
|
|
|
|
|
|
|
%prep
|
2024-04-02 11:28:31 +08:00
|
|
|
%setup -q -n %{package_name}-%{version} -c
|
2024-04-01 11:52:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
go version
|
|
|
|
|
go env -w GO111MODULE=on
|
2024-04-02 11:28:31 +08:00
|
|
|
cd %{package_name}-%{version}
|
2024-04-01 11:52:38 +08:00
|
|
|
ls -l
|
|
|
|
|
if [ %{_arch} == "x86_64" ];then
|
|
|
|
|
make -f Makefile.amd64
|
2024-04-02 11:28:31 +08:00
|
|
|
elif [ %{_arch} == "aarch64" -o %{_arch} == "riscv64" ];then
|
2024-04-01 11:52:38 +08:00
|
|
|
make -f Makefile
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%install
|
2024-04-02 11:28:31 +08:00
|
|
|
cd %{package_name}-%{version}
|
2024-04-01 11:52:38 +08:00
|
|
|
ls -l
|
|
|
|
|
mkdir -p %{buildroot}%{_bin_path}
|
|
|
|
|
mkdir -p %{buildroot}%{_service_path}
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}
|
|
|
|
|
install -p -m 755 build/aospace %{buildroot}%{_bin_path}
|
|
|
|
|
install -p -m 644 res/aospace.service %{buildroot}%{_service_path}
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr (-, root, root)
|
|
|
|
|
%doc
|
|
|
|
|
%{_bin_path}/*
|
|
|
|
|
%{_service_path}/*
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
echo "ao.space installation is finished, will restart docker"
|
|
|
|
|
systemctl restart docker
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%systemd_post aospace.service
|
|
|
|
|
systemctl enable aospace.service
|
|
|
|
|
systemctl start aospace.service
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
%systemd_preun aospace.service
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%systemd_postun_with_restart aospace.service
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-04-02 11:28:31 +08:00
|
|
|
* Fri Apr 12 2024 ZhangXuyang<zhangxuyang@iscas.ac.cn> - 1.0.2-3
|
|
|
|
|
- fix riscv64 makefile
|
|
|
|
|
|
|
|
|
|
* Fri Apr 12 2024 ZhangXuyang<zhangxuyang@iscas.ac.cn> - 1.0.2-2
|
|
|
|
|
- fix riscv64 makefile
|
|
|
|
|
|
2024-04-02 11:28:31 +08:00
|
|
|
* Tue Apr 2 2024 ZhangXuyang<zhangxuyang@iscas.ac.cn> - 1.0.2-1
|
|
|
|
|
- Release 1.0.2-1
|
|
|
|
|
|
2024-04-01 11:52:38 +08:00
|
|
|
* Mon Apr 1 2024 ZhangXuyang<zhangxuyang@iscas.ac.cn> - 1.0.1-2
|
|
|
|
|
- Release 1.0.1-2
|
|
|
|
|
|
|
|
|
|
* Mon Apr 1 2024 ZhangXuyang<zhangxuyang@iscas.ac.cn> - 1.0.1-1
|
|
|
|
|
- Release 1.0.1-1
|