]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - bash/bash.nm
Merge remote-tracking branch 'arne_f/automake'
[people/ms/ipfire-3.x.git] / bash / bash.nm
index 0c57eab1615720183c7c66a69bcbba9f0a257761..4ea4fb9db6d564503ca673d34bc4d8c94814ff3b 100644 (file)
@@ -5,9 +5,9 @@
 
 name       = bash
 version    = 4.2
-release    = 3
+release    = 8
 
-groups     = Base Build System/Tools
+groups     = System/Tools
 url        = http://www.gnu.org/software/bash/
 license    = GPLv2+
 summary    = Bash is short for born again shell.
@@ -67,17 +67,33 @@ end
 
 packages
        package %{name}
-               requires = /etc/bashrc /etc/profile
+               groups += Base Build
 
-               script postin
+               requires
+                       coreutils
+                       /etc/bashrc
+                       /etc/profile
+               end
+
+               script posttransin
                        # Create /etc/shells, if it does not exist.
                        [ -f "/etc/shells" ] || touch /etc/shells
 
-                       if ! grep -q "/bin/bash" /etc/shells; then
+                       found_sh=0
+                       found_bash=0
+                       while read line; do
+                               if [ "/bin/bash" = "${line}" ]; then
+                                       found_bash=1
+                               elif [ "/bin/sh" = "${line}" ]; then
+                                       found_sh=1
+                               fi
+                       done < /etc/shells
+
+                       if [ "${found_bash}" = "0" ]; then
                                echo "/bin/bash" >> /etc/shells
                        fi
 
-                       if ! grep -q "/bin/sh" /etc/shells; then
+                       if [ "${found_sh}" = "0" ]; then
                                echo "/bin/sh" >> /etc/shells
                        fi
                end
@@ -87,9 +103,9 @@ packages
 
                        # Remove /bin/bash and /bin/sh from /etc/shells.
                        while read line; do
-                               if [[ $line =~ ^/bin/sh ]]; then
+                               if [ "/bin/bash" = "${line}" ]; then
                                        continue
-                               elif [[ $line =~ ^/bin/bash ]]; then
+                               elif [ "/bin/sh" = "${line}" ]; then
                                        continue
                                fi
 
@@ -99,4 +115,8 @@ packages
                        mv -f /etc/shells{.$$,}
                end
        end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
 end