dash-vl.spec 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. Summary: The Debian Almquist Shell (formerly NetBSD's ash)
  2. Summary(ja): Bourne シェル (sh) の機能縮小版 (Debian 版 ash)
  3. Name: dash
  4. Version: 0.5.7
  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. * Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5.7-1
  138. - update to 0.5.7
  139. * Sat Apr 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.6-2
  140. - update to 0.5.6
  141. - BR: dietlibc >= 0.32
  142. * Wed Mar 25 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.5.5.1-1
  143. - now ash (not maintained anymore?) replaced with dash
  144. - provide ash/bsh symlinks for compatibility
  145. - split statically-linked version into subpackage
  146. * Sun Oct 12 2008 Shu KONNO <owa@bg.wakwak.com> 0.3.8-6vl5
  147. - applied new versioning policy, spec in utf-8
  148. * Wed Sep 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.3.8-5vl3
  149. - rebuild to add gpg sign
  150. * Fri Apr 25 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.3.8-5v2
  151. - rebuild
  152. * Fri Dec 06 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.3.8-5vl1
  153. - based on 0.3.8-5 from Rawhide and built for Vine Linux
  154. - added Japanese summary and description
  155. * Wed Jul 17 2002 Trond Eivind Glomsr <teg@redhat.com> 0.3.8-5
  156. - Update to -38 diff
  157. - man page fixes (#63528)
  158. * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
  159. - automated rebuild
  160. * Thu May 23 2002 Tim Powers <timp@redhat.com>
  161. - automated rebuild
  162. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  163. - automated rebuild
  164. * Tue Dec 11 2001 Trond Eivind Glomsr <teg@redhat.com> 0.3.8-1
  165. - 0.3.8
  166. - Patch to make it build
  167. - workaround for oddities in the alpha compiler
  168. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  169. - Bump release + rebuild.
  170. * Mon Jan 08 2001 Preston Brown <pbrown@redhat.com>
  171. - ported much newer version from Debian
  172. - alpha is miscompiling mkinit helper utility; work around w/o optimization
  173. * Thu Dec 7 2000 Crutcher Dunnavant <crutcher@redhat.com>
  174. - intial rebuild for 7.1
  175. * Wed Aug 30 2000 Matt Wilson <msw@redhat.com>
  176. - rebuild to cope with glibc locale binary incompatibility, again
  177. * Wed Jul 19 2000 Jakub Jelinek <jakub@redhat.com>
  178. - rebuild to cope with glibc locale binary incompatibility
  179. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  180. - automatic rebuild
  181. * Wed Jun 21 2000 Jakub Jelinek <jakub@redhat.com>
  182. - mksyntax had undefined behaviour, make it conforming.
  183. * Mon Jun 12 2000 Preston Brown <pbrown@redhat.com>
  184. - FHS fixes
  185. - had to disable optimization for sparc, was producing a mksyntax binary that
  186. infinitely looped! FIX ME.
  187. * Wed Mar 29 2000 Bill Nottingham <notting@redhat.com>
  188. - fix bug in 'ash -e' handling
  189. * Thu Feb 03 2000 Preston Brown <pbrown@redhat.com>
  190. - gzipped man pages
  191. * Mon Oct 04 1999 Cristian Gafton <gafton@redhat.com>
  192. - rebuild against the lastest glibc in the sparc tree
  193. * Sat Sep 11 1999 Bill Nottingham <notting@redhat.com>
  194. - fix bogosity with fd's > 0
  195. - fix builtin echo to understand -n & -e at the same time
  196. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  197. - auto rebuild in the new build environment (release 17)
  198. * Wed Feb 24 1999 Preston Brown <pbrown@redhat.com>
  199. - Injected new description and group.
  200. * Tue Jan 12 1999 Cristian Gafton <gafton@redhat.com>
  201. - build on glibc 2.1
  202. * Fri Nov 06 1998 Preston Brown <pbrown@redhat.com>
  203. - updated to correct path on SunSITE.
  204. * Fri Aug 28 1998 Jeff Johnson <jbj@redhat.com>
  205. - recompile statically linked binary for 5.2/sparc
  206. * Tue May 05 1998 Prospector System <bugs@redhat.com>
  207. - translations modified for de, fr, tr
  208. * Mon Oct 20 1997 Erik Troan <ewt@redhat.com>
  209. - made /bin/ash built shared
  210. - added ash.static
  211. - uses a buildroot and %attr
  212. * Sun Aug 24 1997 Erik Troan <ewt@redhat.com>
  213. - built against glibc
  214. - statically linked
  215. * Wed Apr 16 1997 Erik Troan <ewt@redhat.com>
  216. - fixed preinstall script to >> /etc/shells for bsh.