source: spec/trunk/SPECS/dash.spec@ 812

Last change on this file since 812 was 567, checked in by dmik, 11 years ago

spec: dash: Release 0.5.8-1.

File size: 2.9 KB
Line 
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
7Name: dash
8Version: 0.5.8
9Release: 1%{?dist}
10Summary: Small and fast POSIX-compliant shell
11Group: 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
16License: BSD and GPLv2+ and Public Domain and Copyright only
17URL: 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
23Source: %{name}-%{version}-r%{svn_rev}.zip
24
25BuildRequires: gcc make subversion zip
26
27BuildRequires: automake
28
29%description
30DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as
31possible. It does this without sacrificing speed where possible. In fact, it is
32significantly faster than bash (the GNU Bourne-Again SHell) for most tasks.
33
34%package sh
35Summary: Installs DASH as the system default POSIX shell.
36Requires: dash
37# @todo See http://trac.netlabs.org/rpm/ticket/137.
38Provides: /@unixroot/bin/sh
39
40%description sh
41Virtual 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
48svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
49rm -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
54autogen.sh
55
56%build
57
58# Disable job control, OS/2 tty doesn't allow this
59export CFLAGS='-DJOBS=0'
60
61# Usual link options
62export LDFLAGS='-Zomf -Zmap -Zhigh-mem -Zargs-wild -Zargs-resp' # -Zbin-files
63export LD=emxomfld
64
65# We install dash into /usr/bin, so no --bindir=/bin
66%configure
67
68make %{?_smp_mflags}
69
70%install
71rm -rf %{buildroot}
72make install DESTDIR=%{buildroot}
73
74# Create a symlink for the default shell
75ln -s %{_bindir}/%{name}.exe %{buildroot}%{_bindir}/sh
76cp -p %{buildroot}%{_bindir}/%{name}.exe %{buildroot}%{_bindir}/sh.exe
77ln -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.
Note: See TracBrowser for help on using the repository browser.