Name: file-reorganize Version: 1.0 Release: 1%{?dist} Summary: file reoganize License: MulanPSL2.0 URL: https://atomgit.com/openeuler123/x_haihua.git Source0: %{name}-%{version}.tar.gz BuildRequires: wget, dnf-plugins-core, binutils, glibc-devel, gcc-c++, openssl %define debug_package %{nil} %description %prep %autosetup # 安装cangjie plt=`uname -m` if [[ $plt == "x86_64" ]]; then 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" tar -xzvf Cangjie-0.53.13-linux_x64.tar.gz source cangjie/envsetup.sh else wget -O Cangjie-0.53.13-linux_aarch64.tar.gz "https://cangjie-lang.cn/v1/files/auth/downLoad?nsId=142267&fileName=Cangjie-0.53.13-linux_aarch64.tar.gz&objectKey=6719f1ec3af6947e3c6af328" tar -xzvf Cangjie-0.53.13-linux_aarch64.tar.gz source cangjie/envsetup.sh fi %build source %{_builddir}/%{name}-%{version}/cangjie/envsetup.sh cp /usr/lib/gcc/x86_64-openEuler-linux/12/crtbeginS.o %{_builddir}/%{name}-%{version} cp /usr/lib/gcc/x86_64-openEuler-linux/12/crtendS.o %{_builddir}/%{name}-%{version} cjpm build %install # 将需要打包的文件拷贝到buildroot目录中去 mkdir -p %{buildroot}/root/file-reorganize/bin mkdir -p %{buildroot}/root/file-reorganize/config cp -r %{_builddir}/%{name}-%{version}/target/release/bin/* %{buildroot}/root/file-reorganize/bin cp -r %{_builddir}/%{name}-%{version}/config/* %{buildroot}/root/file-reorganize/config %files # 指定将要部署的文件有哪些 /root/file-reorganize/bin/* /root/file-reorganize/config/* %changelog * Tue Dec 24 2024 x_haihua -