1 | # Note: this .spec is borrowed from dash-0.5.8-2.fc23.src.rpm
|
---|
2 |
|
---|
3 | # Disable debug symbols stuff - makes no sense w/o EXCEPTQ support
|
---|
4 | # (also depends on http://trac.netlabs.org/rpm/ticket/134)
|
---|
5 | %define _strip_no_debuginfo 1
|
---|
6 |
|
---|
7 | Name: dash
|
---|
8 | Version: 0.5.8
|
---|
9 | Release: 1%{?dist}
|
---|
10 | Summary: Small and fast POSIX-compliant shell
|
---|
11 | Group: System Environment/Shells
|
---|
12 | # BSD: DASH in general
|
---|
13 | # GPLv2+: From src/mksignames.c
|
---|
14 | # Public Domain: From src/bltin/test.c
|
---|
15 | # Copyright only: From src/hetio.h
|
---|
16 | License: BSD and GPLv2+ and Public Domain and Copyright only
|
---|
17 | URL: http://gondor.apana.org.au/~herbert/%{name}/
|
---|
18 | #Source0: http://gondor.apana.org.au/~herbert/%{name}/files/%{name}-%{version}.tar.gz
|
---|
19 |
|
---|
20 | %define svn_url http://svn.netlabs.org/repos/ports/dash/trunk
|
---|
21 | %define svn_rev 1126
|
---|
22 |
|
---|
23 | Source: %{name}-%{version}-r%{svn_rev}.zip
|
---|
24 |
|
---|
25 | BuildRequires: gcc make subversion zip
|
---|
26 |
|
---|
27 | BuildRequires: automake
|
---|
28 |
|
---|
29 | %description
|
---|
30 | DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as
|
---|
31 | possible. It does this without sacrificing speed where possible. In fact, it is
|
---|
32 | significantly faster than bash (the GNU Bourne-Again SHell) for most tasks.
|
---|
33 |
|
---|
34 | %package sh
|
---|
35 | Summary: Installs DASH as the system default POSIX shell.
|
---|
36 | Requires: dash
|
---|
37 | # @todo See http://trac.netlabs.org/rpm/ticket/137.
|
---|
38 | Provides: /@unixroot/bin/sh
|
---|
39 |
|
---|
40 | %description sh
|
---|
41 | Virtual package that installs DASH as the system default POSIX shell.
|
---|
42 |
|
---|
43 | %prep
|
---|
44 | %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}
|
---|
45 | %setup -q
|
---|
46 | %else
|
---|
47 | %setup -n "%{name}-%{version}" -Tc
|
---|
48 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
---|
49 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
---|
50 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
---|
51 | %endif
|
---|
52 |
|
---|
53 | # Generate configure and friends
|
---|
54 | autogen.sh
|
---|
55 |
|
---|
56 | %build
|
---|
57 |
|
---|
58 | # Disable job control, OS/2 tty doesn't allow this
|
---|
59 | export CFLAGS='-DJOBS=0'
|
---|
60 |
|
---|
61 | # Usual link options
|
---|
62 | export LDFLAGS='-Zomf -Zmap -Zhigh-mem -Zargs-wild -Zargs-resp' # -Zbin-files
|
---|
63 | export LD=emxomfld
|
---|
64 |
|
---|
65 | # We install dash into /usr/bin, so no --bindir=/bin
|
---|
66 | %configure
|
---|
67 |
|
---|
68 | make %{?_smp_mflags}
|
---|
69 |
|
---|
70 | %install
|
---|
71 | rm -rf %{buildroot}
|
---|
72 | make install DESTDIR=%{buildroot}
|
---|
73 |
|
---|
74 | # Create a symlink for the default shell
|
---|
75 | ln -s %{_bindir}/%{name}.exe %{buildroot}%{_bindir}/sh
|
---|
76 | cp -p %{buildroot}%{_bindir}/%{name}.exe %{buildroot}%{_bindir}/sh.exe
|
---|
77 | ln -s %{_mandir}/man1/%{name}.1 %{buildroot}%{_mandir}/man1/sh.1
|
---|
78 |
|
---|
79 | #%post
|
---|
80 | #grep -q '^/bin/dash$' %{_sysconfdir}/shells || \
|
---|
81 | # echo '/bin/dash' >> %{_sysconfdir}/shells
|
---|
82 |
|
---|
83 | #%postun
|
---|
84 | #if [ $1 -eq 0 ]; then
|
---|
85 | # sed -i '/^\/bin\/dash$/d' %{_sysconfdir}/shells
|
---|
86 | #fi
|
---|
87 |
|
---|
88 | %files
|
---|
89 | %doc COPYING ChangeLog
|
---|
90 | %{_bindir}/%{name}.exe
|
---|
91 | %{_mandir}/man1/%{name}.1
|
---|
92 |
|
---|
93 | %files sh
|
---|
94 | %{_bindir}/sh
|
---|
95 | %{_bindir}/sh.exe
|
---|
96 | %{_mandir}/man1/sh.1
|
---|
97 |
|
---|
98 | %changelog
|
---|
99 | * Mon Apr 6 2015 Dmitriy Kuminov <coding@dmik.org> 0.5.8-1
|
---|
100 | - Initial package for version 0.5.8.
|
---|