dash-vl.spec 8.6 KB

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