| 1 | # Disable debug symbols stuff - makes no sense w/o EXCEPTQ support
|
|---|
| 2 | # (also depends on http://trac.netlabs.org/rpm/ticket/134)
|
|---|
| 3 | %define _strip_no_debuginfo 1
|
|---|
| 4 |
|
|---|
| 5 | %define kmk_dist out/os2.x86/release/dist
|
|---|
| 6 |
|
|---|
| 7 | Summary: A smaller version of the Bourne shell (sh).
|
|---|
| 8 | Name: ash
|
|---|
| 9 | Version: 0.0.1
|
|---|
| 10 | Release: 1%{?dist}
|
|---|
| 11 | License: BSD
|
|---|
| 12 | Group: System Environment/Shells
|
|---|
| 13 |
|
|---|
| 14 | %define svn_url https://svn.netlabs.org/repos/libc/trunk/
|
|---|
| 15 | %define svn_rev 3845
|
|---|
| 16 |
|
|---|
| 17 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 18 |
|
|---|
| 19 | BuildRequires: gcc make subversion zip
|
|---|
| 20 |
|
|---|
| 21 | # @todo when it's there:
|
|---|
| 22 | #BuildRequires: yacc
|
|---|
| 23 |
|
|---|
| 24 | %description
|
|---|
| 25 | A shell is a basic system program that interprets keyboard and mouse
|
|---|
| 26 | commands. The ash shell is a clone of Berkeley's Bourne shell
|
|---|
| 27 | (sh). Ash supports all of the standard sh shell commands, but is
|
|---|
| 28 | considerably smaller than sh. The ash shell lacks some Bourne shell
|
|---|
| 29 | features (for example, command-line histories), but it uses a lot less
|
|---|
| 30 | memory.
|
|---|
| 31 |
|
|---|
| 32 | You should install ash if you need a lightweight shell with many of
|
|---|
| 33 | the same capabilities as the sh shell.
|
|---|
| 34 |
|
|---|
| 35 | %package sh
|
|---|
| 36 | Summary: Installs ASH as the system default POSIX shell.
|
|---|
| 37 | Requires: ash
|
|---|
| 38 | # @todo See http://trac.netlabs.org/rpm/ticket/137.
|
|---|
| 39 | Provides: /@unixroot/bin/sh
|
|---|
| 40 |
|
|---|
| 41 | %description sh
|
|---|
| 42 | Virtual package that installs ash as the system default POSIX shell.
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 | %prep
|
|---|
| 46 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 47 | %setup -q
|
|---|
| 48 | %else
|
|---|
| 49 | %setup -n "%{name}-%{version}" -T -c
|
|---|
| 50 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url}ash ash --force
|
|---|
| 51 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url}Config.kmk --force
|
|---|
| 52 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 53 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 54 | %endif
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 | %build
|
|---|
| 58 | export KCFLAGS="%{optflags}"
|
|---|
| 59 | kmk -C ash
|
|---|
| 60 | kmk -C ash install
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 | %install
|
|---|
| 64 | rm -rf %{buildroot}
|
|---|
| 65 | mkdir -p %{buildroot}%{_bindir}
|
|---|
| 66 | mkdir -p %{buildroot}%{_mandir}/man1
|
|---|
| 67 |
|
|---|
| 68 | cp %{kmk_dist}/bin/%{name}.exe %{buildroot}%{_bindir}/
|
|---|
| 69 | cp -p ash/sh.1 %{buildroot}%{_mandir}/man1/%{name}.1
|
|---|
| 70 |
|
|---|
| 71 | # Create a symlink for the default shell
|
|---|
| 72 | ln -s %{_bindir}/%{name}.exe %{buildroot}%{_bindir}/sh
|
|---|
| 73 | cp -p %{buildroot}%{_bindir}/%{name}.exe %{buildroot}%{_bindir}/sh.exe
|
|---|
| 74 | ln -s %{_mandir}/man1/%{name}.1 %{buildroot}%{_mandir}/man1/sh.1
|
|---|
| 75 |
|
|---|
| 76 | %clean
|
|---|
| 77 | rm -rf %{buildroot}
|
|---|
| 78 |
|
|---|
| 79 | %files
|
|---|
| 80 | %defattr(-,root,root)
|
|---|
| 81 | %{_bindir}/%{name}.exe
|
|---|
| 82 | %{_mandir}/man1/%{name}.1
|
|---|
| 83 |
|
|---|
| 84 | %files sh
|
|---|
| 85 | %{_bindir}/sh
|
|---|
| 86 | %{_bindir}/sh.exe
|
|---|
| 87 | %{_mandir}/man1/sh.1
|
|---|
| 88 |
|
|---|
| 89 | %changelog
|
|---|
| 90 | * Mon Apr 6 2015 Dmitriy Kuminov <coding@dmik.org> 0.0.1-1
|
|---|
| 91 | - Change version to 0.0.1 to mark significant changes in package structure.
|
|---|
| 92 | - Make `ash` provide `ash.exe` and put `sh` symlinks to `ash-sh`.
|
|---|
| 93 | - Remove debug package (not needed w/o EXCEPTQ support).
|
|---|
| 94 |
|
|---|
| 95 | * Mon Feb 02 2015 yd <yd@os2power.com> 0.0.0-11
|
|---|
| 96 | - r3845, rebuilt from sources with gcc 4.9.2.
|
|---|
| 97 |
|
|---|
| 98 | * Fri Feb 03 2012 yd
|
|---|
| 99 | - added Provides for virtual /@unixroot/bin/sh file.
|
|---|
| 100 |
|
|---|
| 101 | * Thu Feb 02 2012 yd
|
|---|
| 102 | - Remove symlinks from /bin.
|
|---|
| 103 |
|
|---|
| 104 | * Tue Dec 13 2011 yd
|
|---|
| 105 | - provides also /usr/bin/sh for compatibility with new scripts.
|
|---|
| 106 |
|
|---|
| 107 | * Wed Nov 16 2011 yd
|
|---|
| 108 | - keep all executables to /usr/bin and place symlinks in /bin
|
|---|