source: spec/trunk/SPECS/bc.spec@ 1330

Last change on this file since 1330 was 703, checked in by Silvan Scherrer, 10 years ago

bc: first version

File size: 2.6 KB
Line 
1#define svn_url e:/trees/bc/trunk
2%define svn_url http://svn.netlabs.org/repos/ports/bc/trunk
3%define svn_rev 1402
4
5Summary: GNU's bc (a numeric processing language) and dc (a calculator)
6Name: bc
7Version: 1.06
8Release: 1%{?dist}
9License: GPL
10URL: http://www.gnu.org/software/bc/
11Group: Applications/Engineering
12Vendor: bww bitwise works GmbH
13Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
14
15Requires(post): %{_sbindir}/install-info.exe
16Requires(preun): %{_sbindir}/install-info.exe
17Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
18BuildRequires: readline-devel, flex
19
20%description
21The bc package includes bc and dc. Bc is an arbitrary precision
22numeric processing arithmetic language. Dc is an interactive
23arbitrary precision stack based calculator, which can be used as a
24text mode calculator.
25
26Install the bc package if you need its number handling capabilities or
27if you would like to use its text mode calculator.
28
29%debug_package
30
31%prep
32%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}
33%setup -q
34%else
35%setup -n "%{name}-%{version}" -Tc
36svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
37rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
38(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
39%endif
40
41%build
42autoreconf -fi
43
44export LDFLAGS=" -Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
45%configure --with-readline
46make %{?_smp_mflags}
47
48%install
49rm -rf $RPM_BUILD_ROOT
50
51make install DESTDIR=$RPM_BUILD_ROOT
52rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
53
54%clean
55rm -rf $RPM_BUILD_ROOT
56
57%post
58if [ -f %{_infodir}/bc.info ]; then
59 %{_sbindir}/install-info %{_infodir}/bc.info %{_infodir}/dir --entry="* bc: (bc). The GNU RPN calculator language." || :
60 %{_sbindir}/install-info %{_infodir}/dc.info %{_infodir}/dir --entry="* dc: (dc). The GNU RPN calculator."|| :
61fi
62
63%preun
64if [ $1 = 0 ]; then
65 if [ -f %{_infodir}/bc.info ]; then
66 %{_sbindir}/install-info --delete %{_infodir}/bc.info %{_infodir}/dir --entry="* bc: (bc). The GNU RPN calculator language." || :
67 %{_sbindir}/install-info --delete %{_infodir}/dc.info %{_infodir}/dir --entry="* dc: (dc). The GNU RPN calculator." || :
68 fi
69fi
70
71%files
72%defattr(-,root,root,-)
73%doc COPYING COPYING.LIB FAQ AUTHORS NEWS README
74%{_bindir}/dc.exe
75%{_bindir}/bc.exe
76%{_mandir}/*/*
77%{_infodir}/*
78
79%changelog
80* Thu Mar 17 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.06-1
81- first version
Note: See TracBrowser for help on using the repository browser.