summaryrefslogtreecommitdiff
path: root/file-clas.spec
blob: b94c462751765f0afdc5f4c6752c799acd2d813a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Name:           file-clas
Version:        1.0.0
Release:        1
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
if [ ! -f Cangjie.tar.gz ]; then
    %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
fi

tar zxvf Cangjie.tar.gz


%install
cd %{_builddir}/%{name}-%{version}
source cangjie/envsetup.sh
cp /usr/lib/gcc/x86_64-openEuler-linux/12/crtbeginS.o ./
cp /usr/lib/gcc/x86_64-openEuler-linux/12/crtendS.o ./
cjpm build


%files
%{_builddir}/%{name}-%{version}/target/release/bin/main


%changelog
* Sun Jan 12 2025 lishuying <sjbei2022@163.com>
- Cangjie EUR demo