dash-vl.spec 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. Summary: The Debian Almquist Shell (formerly NetBSD's ash)
  2. Summary(ja): Bourne シェル (sh) の機能縮小版 (Debian 版 ash)
  3. Name: dash
  4. Version: 0.5.5.1
  5. Release: 1%{?_dist_release}
  6. License: BSD
  7. Group: System Environment/Shells
  8. Source: ftp://ftp.debian.org/debian/pool/main/d/shells/%{name}_%{version}.orig.tar.gz
  9. BuildRequires: bison
  10. BuildRequires: dietlibc
  11. Requires(pre): fileutils grep
  12. Obsoletes: ash <= 0.4
  13. Provides: ash = %{version}-%{release}
  14. Buildroot: %{_tmppath}/%{name}-%{version}-root
  15. Conflicts: mkinitrd <= 1.7
  16. %description
  17. "dash" is a POSIX compliant shell that is much smaller than "bash".
  18. Dash supports many features that a real sh shell would support, however
  19. it is much smaller in size. This becomes an advantage in situations
  20. where there is a lack of memery (initial ram-disks, etc). dash does
  21. lack a few features, like command line history.
  22. dash is the continuation of the original NetBSD ash fork. dash is much
  23. more up-to-date, and properly maintained.
  24. %description -l ja
  25. "dash" は POSIX 互換シェルで、"bash" よりサイズが大変小さいものです。
  26. dash は、sh シェルコマンドをすべてサポートしており、かつ sh より比較的
  27. サイズが小さく収まっています。そのため、起動直後の RAM ディスクで使う
  28. など、使用可能メモリ量が制限されるような状況で有効に使うことができます。
  29. ただし dash にはコマンドライン履歴などのいくつかの機能が備わっていません。
  30. dash はオリジナルの NetBSD ash から分岐したもので、
  31. ash とは異なり現在でも適切にメンテナンスされ続けています。
  32. %package static
  33. Summary: The Debian Almquist Shell (statically compiled)
  34. Summary(ja): Bourne シェル (sh) の機能縮小版 (静的リンク版)
  35. Group: System Environment/Shells
  36. Obsoletes: ash <= 0.4
  37. Provides: ash-static = %{version}-%{release}
  38. %description static
  39. "dash" is a POSIX compliant shell that is much smaller than "bash".
  40. Dash supports many features that a real sh shell would support, however
  41. it is much smaller in size. This becomes an advantage in situations
  42. where there is a lack of memery (initial ram-disks, etc). dash does
  43. lack a few features, like command line history.
  44. dash is the continuation of the original NetBSD ash fork. dash is much
  45. more up-to-date, and properly maintained.
  46. This version is statically compiled.
  47. %description static -l ja
  48. "dash" は POSIX 互換シェルで、"bash" よりサイズが大変小さいものです。
  49. dash は、sh シェルコマンドをすべてサポートしており、かつ sh より比較的
  50. サイズが小さく収まっています。そのため、起動直後の RAM ディスクで使う
  51. など、使用可能メモリ量が制限されるような状況で有効に使うことができます。
  52. ただし dash にはコマンドライン履歴などのいくつかの機能が備わっていません。
  53. dash はオリジナルの NetBSD ash から分岐したもので、
  54. ash とは異なり現在でも適切にメンテナンスされ続けています。
  55. このパッケージは静的リンクされたバージョンです。
  56. %prep
  57. %setup -q
  58. %build
  59. %configure
  60. # building dynamically linked dash
  61. make
  62. mv src/dash src/dash.dynamic
  63. # building statically linked dietlibc dash
  64. make clean
  65. %configure CC="diet gcc"
  66. make CC="diet gcc"
  67. mv src/dash src/dash.static
  68. %install
  69. rm -rf %{buildroot}
  70. mkdir -p %{buildroot}/bin
  71. mkdir -p %{buildroot}%{_mandir}/man1
  72. install -m 755 src/dash.dynamic %{buildroot}/bin/dash
  73. install -m 644 src/dash.1 %{buildroot}%{_mandir}/man1/dash.1
  74. ln -sf dash.1 %{buildroot}%{_mandir}/man1/bsh.1
  75. ln -sf dash %{buildroot}/bin/bsh
  76. ln -sf dash.1 %{buildroot}%{_mandir}/man1/ash.1
  77. ln -sf dash %{buildroot}/bin/ash
  78. install -m 755 src/dash.static %{buildroot}/bin/dash.static
  79. ln -sf dash.static %{buildroot}/bin/bsh.static
  80. ln -sf dash.static %{buildroot}/bin/ash.static
  81. %post
  82. if [ ! -f /etc/shells ]; then
  83. echo "/bin/dash" > /etc/shells
  84. echo "/bin/ash" >> /etc/shells
  85. echo "/bin/bsh" >> /etc/shells
  86. else
  87. if ! grep '^/bin/dash$' /etc/shells > /dev/null; then
  88. echo "/bin/dash" >> /etc/shells
  89. fi
  90. if ! grep '^/bin/ash$' /etc/shells > /dev/null; then
  91. echo "/bin/ash" >> /etc/shells
  92. fi
  93. if ! grep '^/bin/bsh$' /etc/shells > /dev/null; then
  94. echo "/bin/bsh" >> /etc/shells
  95. fi
  96. fi
  97. %postun
  98. if [ "$1" = "0" ]; then
  99. grep -v '^/bin/ash' < /etc/shells | grep -v '^/bin/dash' | grep -v '^/bin/bsh' > /etc/shells.new
  100. mv /etc/shells.new /etc/shells
  101. fi
  102. %triggerpostun -- ash
  103. if ! grep '^/bin/ash$' /etc/shells > /dev/null; then
  104. echo "/bin/ash" >> /etc/shells
  105. fi
  106. if ! grep '^/bin/bsh$' /etc/shells > /dev/null; then
  107. echo "/bin/bsh" >> /etc/shells
  108. fi
  109. %verifyscript
  110. for n in dash ash bsh; do
  111. echo -n "Looking for $n in /etc/shells... "
  112. if ! grep "^/bin/${n}\$" /etc/shells > /dev/null; then
  113. echo "missing"
  114. echo "${n} missing from /etc/shells" >&2
  115. else
  116. echo "found"
  117. fi
  118. done
  119. %clean
  120. rm -rf %{buildroot}
  121. %files
  122. %defattr(-,root,root)
  123. /bin/dash
  124. /bin/ash
  125. /bin/bsh
  126. %{_mandir}/man1/*
  127. %files static
  128. %defattr(-,root,root)
  129. /bin/dash.static
  130. /bin/ash.static
  131. /bin/bsh.static
  132. %changelog
  133. * Wed Mar 25 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.5.5.1-1
  134. - now ash (not maintained anymore?) replaced with dash
  135. - provide ash/bsh symlinks for compatibility
  136. - split statically-linked version into subpackage
  137. * Sun Oct 12 2008 Shu KONNO <owa@bg.wakwak.com> 0.3.8-6vl5
  138. - applied new versioning policy, spec in utf-8
  139. * Wed Sep 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.3.8-5vl3
  140. - rebuild to add gpg sign
  141. * Mon Apr 25 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.3.8-5v2
  142. - rebuild
  143. * Fri Dec 06 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.3.8-5vl1
  144. - based on 0.3.8-5 from Rawhide and built for Vine Linux
  145. - added Japanese summary and description
  146. * Wed Jul 17 2002 Trond Eivind Glomsr <teg@redhat.com> 0.3.8-5
  147. - Update to -38 diff
  148. - man page fixes (#63528)
  149. * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
  150. - automated rebuild
  151. * Thu May 23 2002 Tim Powers <timp@redhat.com>
  152. - automated rebuild
  153. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  154. - automated rebuild
  155. * Tue Dec 11 2001 Trond Eivind Glomsr <teg@redhat.com> 0.3.8-1
  156. - 0.3.8
  157. - Patch to make it build
  158. - workaround for oddities in the alpha compiler
  159. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  160. - Bump release + rebuild.
  161. * Mon Jan 08 2001 Preston Brown <pbrown@redhat.com>
  162. - ported much newer version from Debian
  163. - alpha is miscompiling mkinit helper utility; work around w/o optimization
  164. * Thu Dec 7 2000 Crutcher Dunnavant <crutcher@redhat.com>
  165. - intial rebuild for 7.1
  166. * Wed Aug 30 2000 Matt Wilson <msw@redhat.com>
  167. - rebuild to cope with glibc locale binary incompatibility, again
  168. * Wed Jul 19 2000 Jakub Jelinek <jakub@redhat.com>
  169. - rebuild to cope with glibc locale binary incompatibility
  170. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  171. - automatic rebuild
  172. * Wed Jun 21 2000 Jakub Jelinek <jakub@redhat.com>
  173. - mksyntax had undefined behaviour, make it conforming.
  174. * Mon Jun 12 2000 Preston Brown <pbrown@redhat.com>
  175. - FHS fixes
  176. - had to disable optimization for sparc, was producing a mksyntax binary that
  177. infinitely looped! FIX ME.
  178. * Wed Mar 29 2000 Bill Nottingham <notting@redhat.com>
  179. - fix bug in 'ash -e' handling
  180. * Thu Feb 03 2000 Preston Brown <pbrown@redhat.com>
  181. - gzipped man pages
  182. * Mon Oct 04 1999 Cristian Gafton <gafton@redhat.com>
  183. - rebuild against the lastest glibc in the sparc tree
  184. * Sat Sep 11 1999 Bill Nottingham <notting@redhat.com>
  185. - fix bogosity with fd's > 0
  186. - fix builtin echo to understand -n & -e at the same time
  187. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  188. - auto rebuild in the new build environment (release 17)
  189. * Wed Feb 24 1999 Preston Brown <pbrown@redhat.com>
  190. - Injected new description and group.
  191. * Tue Jan 12 1999 Cristian Gafton <gafton@redhat.com>
  192. - build on glibc 2.1
  193. * Fri Nov 06 1998 Preston Brown <pbrown@redhat.com>
  194. - updated to correct path on SunSITE.
  195. * Fri Aug 28 1998 Jeff Johnson <jbj@redhat.com>
  196. - recompile statically linked binary for 5.2/sparc
  197. * Tue May 05 1998 Prospector System <bugs@redhat.com>
  198. - translations modified for de, fr, tr
  199. * Mon Oct 20 1997 Erik Troan <ewt@redhat.com>
  200. - made /bin/ash built shared
  201. - added ash.static
  202. - uses a buildroot and %attr
  203. * Sun Aug 24 1997 Erik Troan <ewt@redhat.com>
  204. - built against glibc
  205. - statically linked
  206. * Wed Apr 16 1997 Erik Troan <ewt@redhat.com>
  207. - fixed preinstall script to >> /etc/shells for bsh.