diff options
| author | CoprDistGit <infra@openeuler.org> | 2025-02-16 07:04:00 +0000 | 
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2025-02-16 07:04:00 +0000 | 
| commit | f7e2a1161f806377fb96b7965be7fd2e7ac6f56d (patch) | |
| tree | a38142335d2db6ceb1c9b990c05c2f186167de30 | |
| parent | d75fcbfd5e4341ad73d9c2941cc7150f9d8e26f4 (diff) | |
automatic import of hello-cangjie-eur
| -rw-r--r-- | hello_cangjie_eur.spec | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/hello_cangjie_eur.spec b/hello_cangjie_eur.spec index 3da89ab..653971d 100644 --- a/hello_cangjie_eur.spec +++ b/hello_cangjie_eur.spec @@ -11,6 +11,8 @@ Requires(pre):  wget  %description  A demo for Cangjie and Eur. +%global output_name "hello_cangjie_eur" +  %global debug_package %{nil}  # 根据环境设置下载地址 @@ -106,7 +108,7 @@ do    if [ -d "$user_dir" ]; then      # 获取 .bashrc 的完整路径      bashrc="$user_dir/.bashrc" -    content="alias main='/usr/bin/%{name}'" +    content="alias main='/usr/bin/%{output_name}'"      # 检查 .bashrc 是否存在      if [ -f "$bashrc" ]; then @@ -138,8 +140,8 @@ do      # 检查 .bashrc 是否存在      if [ -f "$bashrc" ]; then -      sed -i '\|source .*/cangjie/envsetup.sh|d' "$bashrc" -      sed -i "\|alias main='/usr/bin/%{name}'|d" "$bashrc" +      sed -i '\|source %{_libdir}/cangjie/envsetup.sh|d' "$bashrc" +      sed -i "\|alias main='/usr/bin/%{output_name}'|d" "$bashrc"        source "$bashrc"      fi    fi @@ -149,7 +151,7 @@ done  %files  # %license add-license-file-here  # %doc add-docs-here -/bin/hello_cangjie_eur +/bin/%{output_name}  %exclude /.packages.toml | 
