diff options
author | CoprDistGit <infra@openeuler.org> | 2025-01-12 07:30:28 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-01-12 07:30:28 +0000 |
commit | fc2716d97a85d580d916dfc22bc763648c13bae3 (patch) | |
tree | 770386949dd13be42d7a09bf924f1043f1871979 /hello_cangjie_eur.spec | |
parent | 44aa691c346b07b66423ae6118e0e3e5a29b0bcb (diff) |
automatic import of hello-cangjie-eur
Diffstat (limited to 'hello_cangjie_eur.spec')
-rw-r--r-- | hello_cangjie_eur.spec | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/hello_cangjie_eur.spec b/hello_cangjie_eur.spec new file mode 100644 index 0000000..cf6bf11 --- /dev/null +++ b/hello_cangjie_eur.spec @@ -0,0 +1,58 @@ +Name: hello-cangjie-eur +Version: v0.0.5 +Release: 1%{?dist} +Summary: Cangjie Eur demo. +License: MIT +Source: https://github.com/stevending1st/%{name}/archive/refs/tags/%{version}.tar.gz + +BuildRequires: wget, dnf-plugins-core, binutils, glibc-devel, gcc-c++, openssl + +%description +A demo for Cangjie and Eur. + + +%global debug_package %{nil} + +# 检查文件是否存在,并设置一个宏 +%global file_exists 0 +if [ ! -f %{_builddir}/Cangjie-0.53.13-linux_x64.tar.gz ]; then + %global file_not_exists 1 +else + %global file_not_exists 0 +fi + + +%prep +%setup -q + +%build +cd %{_builddir} + +%if %{file_not_exists} + wget -O Cangjie-0.53.13-linux_x64.tar.gz "https://cangjie-lang.cn/v1/files/auth/downLoad?nsId=142267&fileName=Cangjie-0.53.13-linux_x64.tar.gz&objectKey=6719f1eb3af6947e3c6af327" +%endif + +tar xvf Cangjie-0.53.13-linux_x64.tar.gz +source %{_builddir}/cangjie/envsetup.sh + + +%install +cd %{_builddir}/%{name}-%{version} +rm -rf %{_buildrootdir} +cjpm install --root %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch} + + +%clean +rm -rf %{buildroot} + + +%files +# %license add-license-file-here +# %doc add-docs-here +/bin/hello_cangjie_eur +%exclude /.packages.toml + + +%changelog +* Thu Jan 02 2025 stevending1st <stevending1st@163.com> +Project init. |