source: spec/trunk/SPECS/ash.spec@ 1036

Last change on this file since 1036 was 625, checked in by Yuri Dario, 10 years ago

spec: ash, fix typo. fixes ticket#157.

  • Property svn:eol-style set to native
File size: 3.1 KB
Line 
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
7Summary: A smaller version of the Bourne shell (sh).
8Name: ash
9Version: 0.0.1
10Release: 1%{?dist}
11License: BSD
12Group: System Environment/Shells
13
14%define svn_url https://svn.netlabs.org/repos/libc/trunk/
15%define svn_rev 3845
16
17Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
18
19BuildRequires: gcc make subversion zip
20
21# @todo when it's there:
22#BuildRequires: yacc
23
24%description
25A shell is a basic system program that interprets keyboard and mouse
26commands. The ash shell is a clone of Berkeley's Bourne shell
27(sh). Ash supports all of the standard sh shell commands, but is
28considerably smaller than sh. The ash shell lacks some Bourne shell
29features (for example, command-line histories), but it uses a lot less
30memory.
31
32You should install ash if you need a lightweight shell with many of
33the same capabilities as the sh shell.
34
35%package sh
36Summary: Installs ASH as the system default POSIX shell.
37Requires: ash
38# @todo See http://trac.netlabs.org/rpm/ticket/137.
39Provides: /@unixroot/bin/sh
40
41%description sh
42Virtual 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
50svn export %{?svn_rev:-r %{svn_rev}} %{svn_url}ash ash --force
51svn export %{?svn_rev:-r %{svn_rev}} %{svn_url}Config.kmk --force
52rm -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
58export KCFLAGS="%{optflags}"
59kmk -C ash
60kmk -C ash install
61
62
63%install
64rm -rf %{buildroot}
65mkdir -p %{buildroot}%{_bindir}
66mkdir -p %{buildroot}%{_mandir}/man1
67
68cp %{kmk_dist}/bin/%{name}.exe %{buildroot}%{_bindir}/
69cp -p ash/sh.1 %{buildroot}%{_mandir}/man1/%{name}.1
70
71# Create a symlink for the default shell
72ln -s %{_bindir}/%{name}.exe %{buildroot}%{_bindir}/sh
73cp -p %{buildroot}%{_bindir}/%{name}.exe %{buildroot}%{_bindir}/sh.exe
74ln -s %{_mandir}/man1/%{name}.1 %{buildroot}%{_mandir}/man1/sh.1
75
76%clean
77rm -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
Note: See TracBrowser for help on using the repository browser.