Name: file-clas Version: 1.0.0 Release: 1%{?dist} Summary: Cangjie EUR Summary(zh_CN): 仓颉EUR License: Mulan URL: https://atomgit.com/openeuler123/lanshitou Source0: file-clas-1.0.0.tar.gz BuildRequires: wget BuildRequires: dnf-plugins-core BuildRequires: binutils BuildRequires: glibc-devel BuildRequires: gcc-c++ BuildRequires: openssl %description Cangjie EUR %prep %autosetup %build %ifarch x86_64 # 下载仓颉工具链x86_64版本 wget "https://cangjie-lang.cn/v1/files/auth/downLoad?nsId=142267&fileName=Cangjie-0.53.13-linux_x64.tar.gz&objectKey=6719f1eb3af6947e3c6af327" -O Cangjie.tar.gz %endif %ifarch aarch64 # 下载仓颉工具链aarch64版本 wget "https://cangjie-lang.cn/v1/files/auth/downLoad?nsId=142267&fileName=Cangjie-0.53.13-linux_aarch64.tar.gz&objectKey=6719f1ec3af6947e3c6af328" -O Cangjie.tar.gz %endif tar zxvf Cangjie.tar.gz source cangjie/envsetup.sh %ifarch x86_64 cp /usr/lib/gcc/x86_64-openEuler-linux/12/crtbeginS.o ./ cp /usr/lib/gcc/x86_64-openEuler-linux/12/crtendS.o ./ %endif %ifarch aarch64 cp /usr/lib/gcc/aarch64-openEuler-linux/12/crtbeginS.o ./ cp /usr/lib/gcc/aarch64-openEuler-linux/12/crtendS.o ./ %endif cjpm build %install mkdir -p %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}/tmp/%{name} cp -r %{_builddir}/%{name}-%{version}/target/release/bin/lanshitou.bchir2 %{_builddir}/%{name}-%{version}/target/release/bin/lanshitou.cjo %{_builddir}/%{name}-%{version}/target/release/bin/main %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}/tmp/%{name} cp -r %{_builddir}/%{name}-%{version}/config/targetDirMap.cfg %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}/tmp/%{name} %files %{name}-%{version}-%{release}.%{_arch} %changelog * Sun Jan 12 2025 lishuying - Cangjie EUR demo