source: spec/trunk/SPECS/which.spec@ 433

Last change on this file since 433 was 429, checked in by dmik, 11 years ago

spec: which: Fix small typo.

File size: 1.5 KB
Line 
1#
2# How to prepare a new source ZIP from SVN:
3# 1. svn export -r NNN SVN_URL NAME-rNNN
4# 2. zip -SrX9 NAME-rNNN.zip which-rXXX
5#
6
7Summary: Locate a program file in the user's paths
8Name: which
9Version: 1.0
10Release: 1%{?dist}
11License: none
12URL: http://sources.freebsd.org/releng/10.0/usr.bin/which/
13
14Group: Applications/System
15
16%define svn_url http://svn.netlabs.org/repos/ports/which/trunk
17%define svn_rev 733
18
19Source: %{name}-%{version}-r%{svn_rev}.zip
20
21BuildRequires: gcc make subversion
22
23%description
24The which utility takes a list of command names and searches the path for each executable file
25that would be run had these commands actually been invoked.
26
27%prep
28%if %(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
29%setup -q
30%else
31%setup -n "%{name}-%{version}" -Tc
32svn export -r %{svn_rev} %{svn_url} . --force
33rm -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip"
34(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" "%{name}-%{version}")
35%endif
36
37%build
38export CFLAGS="$RPM_OPT_FLAGS"
39export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
40make -f Makefile.os2
41
42%install
43rm -rf %{buildroot}
44mkdir -p %{buildroot}/%{_bindir}
45mkdir -p %{buildroot}/%{_mandir}/man1
46cp which.exe %{buildroot}/%{_bindir}/
47cp which.1 %{buildroot}/%{_mandir}/man1/
48
49%clean
50rm -rf %{buildroot}
51
52%files
53%defattr(-,root,root)
54%{_bindir}/which.exe
55%{_mandir}/man1/which.1*
56
57%changelog
58
59* Wed Jun 4 2014 Dmitriy Kuminov <coding@dmik.org> 1.0-1
60- Initial port of BSD which (release 10.0).
Note: See TracBrowser for help on using the repository browser.