瀏覽代碼

fix tracking and building and cleanup V_xxx variable naming

Ralf S. Engelschall 21 年之前
父節點
當前提交
d3c4625488
共有 1 個文件被更改,包括 17 次插入16 次删除
  1. 17 16
      bash/bash.spec

+ 17 - 16
bash/bash.spec

@@ -24,9 +24,10 @@
 ##
 
 #   package version
-%define       V_real 2.05b
-%define       V_comp 205b
-%define       V_plvl 7
+%define       V_base_real 2.05b
+%define       V_base_comp 205b
+%define       V_plvl_raw  7
+%define       V_plvl_pad  007
 
 #   package information
 Name:         bash
@@ -38,20 +39,20 @@ Distribution: OpenPKG
 Class:        CORE
 Group:        Shell
 License:      GPL
-Version:      %{V_real}.%{V_plvl}
+Version:      %{V_base_real}.%{V_plvl_raw}
 Release:      20040327
 
 #   list of sources
-Source0:      ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}.tar.gz
+Source0:      ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}.tar.gz
 Source1:      profile
 Patch0:       bash.patch
-Patch1:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-001
-Patch2:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-002
-Patch3:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-003
-Patch4:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-004
-Patch5:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-005
-Patch6:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-006
-Patch7:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_real}-patches/bash%{V_comp}-007
+Patch1:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-001
+Patch2:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-002
+Patch3:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-003
+Patch4:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-004
+Patch5:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-005
+Patch6:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-006
+Patch7:       ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-007
 
 #   build information
 Prefix:       %{l_prefix}
@@ -70,12 +71,12 @@ AutoReqProv:  no
 
 %track
     prog bash = {
-        version   = %{version}
+        version   = %{V_base_real}
         url       = ftp://ftp.cwru.edu/pub/bash/
         regex     = bash-(__VER__)\.tar\.gz
     }
     prog bash:patches = {
-        version   = %{V_comp}-007
+        version   = %{V_base_comp}-%{V_plvl_pad}
         url       = ftp://ftp.cwru.edu/pub/bash/
         regex     = (bash-\d+\.\d+[a-z]+-patches)
         url       = ftp://ftp.cwru.edu/pub/bash/__NEWVER__/
@@ -83,13 +84,13 @@ AutoReqProv:  no
     }
 
 %prep
-    %setup -q
+    %setup -q -n bash-%{V_base_real}
     %patch -p0 -P 0 1 2 3 4 5 6 7
     %{l_shtool} subst \
         -e 's;@l_openpkg_release@;%{l_openpkg_release};' \
         version.c
     %{l_shtool} subst \
-        -e 's;\(PATCHLEVEL\) 0;\1 %{V_plvl};' \
+        -e 's;\(PATCHLEVEL\) 0;\1 %{V_plvl_raw};' \
         patchlevel.h
 
 %build