mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Fixed rpm spec file. The following are the changes in this release: Fix typo in the `make debug` Makefile rule. Improved .gitignore to ignore .static, calc-static, sample_many-static and sample_rand-static. Improved error messages when trying to compile with with one calc type (when BLD_TYPE=calc-dynamic-only or BLD_TYPE=calc-static-only) and install with the other. When installing with BLD_TYPE=calc-static-only, the installed calc and calc-static are links to each other. Thanks to GitHub user @TurtleWilly for this suggestion. The dynamic shared libraries are not installed if they are not built. So when installing with BLD_TYPE=calc-static-only, the install rule will not attempt to install dynamic shared libraries. Thanks to GitHub user @TurtleWilly for bringing to our attention, problems related to building a statically linked calc under macOS. Updated comments in Makefile.local for how to Diagnosing memory, thread, and crash issues under RHEL and macOS. We no longer support the Makefile variable ${ALLOW_CUSTOM} to be empty. Normally ${ALLOW_CUSTOM} is: ALLOW_CUSTOM= -DCUSTOM Now, to disable custom disable custom even if -C is given, use: ALLOW_CUSTOM="-UCUSTOM" Dropped support of Makefile.simple and custom/Makefile.simple. The calc version 2.14.3.0 is the last release that supported the Makefile.simple and custom/Makefile.simple files. Now, a make that supports makefile conditional syntax is required. The simple target, a target that only was used for Makefile.simple was removed. Moved makefile variables that configure calc and configure how to compile calc from Makefile into a new Makefile.config file. The Makeifle includes the Makefile.config file. The cal/Makeifle includes the Makefile.config file. The cscript/Makeifle includes the Makefile.config file. The custom/Makeifle includes the Makefile.config file. The help/Makeifle includes the Makefile.config file. Now, the Makefile.config file will consistently configure calc and how calc is compiled and built by all calc Makefiles. The custom/Makefile no longer includes Makefile. The platform target section from the old Makefile has been moved to a new file, Makefile.target. Improved the format and comments in target information. The Makeifle includes the Makefile.target file. The cal/Makeifle includes the Makefile.target file. The cscript/Makeifle includes the Makefile.target file. The custom/Makeifle includes the Makefile.target file. The help/Makeifle includes the Makefile.target file. Now, the Makefile.target file will consistently set target information for all calc Makefiles. The cal/Makeifle includes the Makefile.local file. The cscript/Makeifle includes the Makefile.local file. The custom/Makeifle includes the Makefile.local file. The help/Makeifle includes the Makefile.local file. Thus, one may modify or append many Makefile variables in all calc Makefiles. Removed the ${CAL_PASSDOWN}, ${HELP_PASSDOWN}, ${HELP_PASSDOWN}, ${CSCRIPT_PASSDOWN} Makefile variables as the new Makefile include files keep Makefile variables in sync. Fixed the ability of calc to compile when CUSTOM is undefined (i.e., -UCUSTOM). The libcustcalc is always built, regardless of the $(ALLOW_CUSTOM} Makefile variable. However when CUSTOM is undefined, the bulk of custom functions are not defined. Dropped the use of Makefile variable ${SET_INSTALL_NAME}. Under macOS it was always needed, elsewhere it was not. Added Makefile variable ${VER} to hold the calc major release version. The calc major release version is a 3 level version (x.y.z). Under macOS, the current version of both libcalc and libcustcalc shared libraries are set to the current calc major release version. Under macOS, to reduce dependency chains, we remove functions and data that are unreachable by the entry point or exported symbols. In particular, the macOS linker is used with "-dead_strip" by default. While calc on macOS will execute if linker used with "-dead_strip_dylibs" and CUSTOM is defined, other applications that use libcalc but not libcustcalc (such as sample_many and sample_rand) will fail to execute due to missile symbols. Therefore "-dead_strip_dylibs" is not used by default when ALLOW_CUSTOM is "-DCUSTOM" under macOS. Thanks to GitHub user @TurtleWilly for bringing to our attention, problems related to use of "-dead_strip_dylibs". When installing shared libraries, libcalc.x.y.z will be a link to the libcalc shared library and libcustcalc.x.y.z will be a link to the libcustcal shared library.
266 lines
10 KiB
RPMSpec
266 lines
10 KiB
RPMSpec
#
|
|
# calc.spec.in - template specfile for calc
|
|
#
|
|
# Copyright (C) 2003-2014,2021,2023 Petteri Kettunen and Landon Curt Noll
|
|
#
|
|
# Calc is open software; you can redistribute it and/or modify it under
|
|
# the terms of the version 2.1 of the GNU Lesser General Public License
|
|
# as published by the Free Software Foundation.
|
|
#
|
|
# Calc is distributed in the hope that it will be useful, but WITHOUT
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
|
# Public License for more details.
|
|
#
|
|
# A copy of version 2.1 of the GNU Lesser General Public License is
|
|
# distributed with calc under the filename COPYING-LGPL. You should have
|
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#
|
|
# Under source code control: 2003/02/16 20:21:39
|
|
# File existed as early as: 2003
|
|
#
|
|
# This calculator first developed by David I. Bell with help/mods from others.
|
|
#
|
|
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
|
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
|
|
|
# BUGS
|
|
# - Uninstalling calc and calc-devel leaves empty dirs /usr/include/calc
|
|
# and /usr/share/calc and its subdirs. In case e.g., _includedir/calc
|
|
# is defined in `files devel' section, then rpmbuild complains that
|
|
# header files are defined twice - rpmbuild bug or bug in specfile conf???
|
|
|
|
Summary: Arbitrary precision calculator.
|
|
Name: calc
|
|
Version: <<<PROJECT_VERSION>>>
|
|
Release: 14
|
|
License: LGPL
|
|
Group: Applications/Engineering
|
|
Source: https://github.com/lcn2/calc/releases/download/v<<<PROJECT_VERSION>>>/%{name}-%{version}.tar.bz2
|
|
URL: https://github.com/lcn2/calc
|
|
Vendor: Landon Noll and Associates
|
|
Packager: Landon Noll and Associates (http://www.isthe.com/chongo/index.html)
|
|
Requires: ncurses >= 5.5-24, readline >= 5.1-3, less >= 358
|
|
BuildRequires: ncurses-devel >= 5.5-24, readline-devel >= 5.1-3
|
|
Provides: libcalc.so.%{version}()(64bit)
|
|
Provides: libcustcalc.so.%{version}()(64bit)
|
|
BuildRoot: %{_tmppath}/build-root
|
|
|
|
%description
|
|
Calc is arbitrary precision C-like arithmetic system that is a
|
|
calculator, an algorithm prototype and mathematical research
|
|
tool. Calc comes with a rich set of builtin mathematical and
|
|
programming functions.
|
|
|
|
For the latest calc release, see the calc GitHub repo:
|
|
|
|
https://github.com/lcn2/calc
|
|
|
|
or the calc home page:
|
|
|
|
http://www.isthe.com/chongo/tech/comp/calc/index.html
|
|
|
|
%package devel
|
|
Summary: Development files and documentation for calc.
|
|
Group: Applications/Engineering
|
|
Requires: calc(x86-64) = %{version}-%{release}
|
|
Requires: libcalc.so.%{version}()(64bit)
|
|
Requires: libcustcalc.so.%{version}()(64bit)
|
|
Requires: ncurses >= 5.5-24, readline >= 5.1-3, less >= 358
|
|
|
|
%description devel
|
|
This package contains the header files and static libraries for developing
|
|
calc (arbitrary precision calculator).
|
|
|
|
For the latest calc release, see the calc GitHub repo:
|
|
|
|
https://github.com/lcn2/calc
|
|
|
|
or the calc home page:
|
|
|
|
http://www.isthe.com/chongo/tech/comp/calc/index.html
|
|
|
|
%prep
|
|
%setup -T -b 0
|
|
|
|
%build
|
|
echo '-=- calc.spec beginning make clobber -=-'
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ clobber
|
|
echo '-=- calc.spec ending make clobber -=-'
|
|
echo '-=- calc.spec beginning make calc-static-only -=-'
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ calc-static-only BLD_TYPE=calc-static-only
|
|
echo '-=- calc.spec ending make calc-static-only -=-'
|
|
echo '-=- calc.spec beginning make rpm-hide-static -=-'
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ rpm-hide-static
|
|
echo '-=- calc.spec ending make rpm-hide-static -=-'
|
|
echo '-=- calc.spec beginning make clobber (again) -=-'
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ clobber
|
|
echo '-=- calc.spec ending make clobber (again) -=-'
|
|
echo '-=- calc.spec beginning make calc-dynamic-only -=-'
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ calc-dynamic-only \
|
|
BLD_TYPE=calc-dynamic-only LD_SHARE=
|
|
echo '-=- calc.spec ending make calc-dynamic-only -=-'
|
|
echo '-=- calc.spec beginning make chk -=-'
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ chk
|
|
echo '-=- calc.spec ending make chk -=-'
|
|
echo '-=- calc.spec beginning make rpm-unhide-static -=-'
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ rpm-unhide-static
|
|
echo '-=- calc.spec ending make rpm-unhide-static -=-'
|
|
echo '-=- calc.spec beginning make rpm-clean-static -=-'
|
|
make -j1 BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ rpm-clean-static
|
|
echo '-=- calc.spec ending make rpm-clean-static -=-'
|
|
echo '-=- calc.spec beginning make rpm-chk-static -=-'
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ rpm-chk-static
|
|
echo '-=- calc.spec ending make rpm-chk-static -=-'
|
|
|
|
%install
|
|
echo '-=- calc.spec beginning make install -=-'
|
|
mkdir -p %{_buildroot}
|
|
make -j1 T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} ARCH_CFLAGS= \
|
|
CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc \
|
|
MANDIR=%{_mandir}/man1 EXT= V=@ install
|
|
echo '-=- calc.spec ending make install -=-'
|
|
|
|
%clean
|
|
echo '-=- calc.spec beginning make clean -=-'
|
|
rm -rf %{_tmppath}
|
|
rm -rf %{_builddir}
|
|
rm -rf %{_specdir}
|
|
rm -rf %{_buildrootdir}
|
|
echo '-=- calc.spec beginning make clean -=-'
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%doc BUGS CHANGES COPYING COPYING-LGPL
|
|
%attr(755, root, root) %{_bindir}/calc
|
|
%attr(755, root, root) %{_bindir}/cscript/*
|
|
%attr(644, root, root) %{_mandir}/man1/calc.1.gz
|
|
%attr(644, root, root) %{_datadir}/%{name}/README
|
|
%attr(644, root, root) %{_datadir}/%{name}/bindings
|
|
%attr(644, root, root) %{_datadir}/%{name}/custhelp/*
|
|
%attr(644, root, root) %{_datadir}/%{name}/custom/*.cal
|
|
%attr(644, root, root) %{_datadir}/%{name}/help/*
|
|
%attr(644, root, root) %{_datadir}/%{name}/*.cal
|
|
%attr(644, root, root) %{_datadir}/%{name}/set8700.line
|
|
%attr(644, root, root) %{_libdir}/libcalc.so
|
|
%attr(644, root, root) %{_libdir}/libcalc.so.<<<PROJECT_VER>>>
|
|
%attr(644, root, root) %{_libdir}/libcalc.so.%{version}
|
|
%attr(644, root, root) %{_libdir}/libcustcalc.so
|
|
%attr(644, root, root) %{_libdir}/libcustcalc.so.<<<PROJECT_VER>>>
|
|
%attr(644, root, root) %{_libdir}/libcustcalc.so.%{version}
|
|
|
|
%files devel
|
|
%defattr(-, root, root)
|
|
%doc BUGS COPYING COPYING-LGPL LIBRARY
|
|
%attr(755, root, root) %{_bindir}/calc-static
|
|
%attr(644, root, root) %{_includedir}/calc/*
|
|
%attr(644, root, root) %{_libdir}/libcalc.a
|
|
%attr(644, root, root) %{_libdir}/libcustcalc.a
|
|
|
|
%changelog
|
|
* Mon Aug 14 2023 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 14
|
|
- Use Source and URL based on calc GitHub repo URLs.
|
|
- Install dynamic shared libraries with 3-digit version numbers.
|
|
|
|
* Sun Mar 24 2019 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 13
|
|
- Disable compiling with the default ARCH_CFLAGS= -march=native
|
|
by clearing the ARCH_CFLAGS value in order to maximize
|
|
the RPM binary portability.
|
|
|
|
* Mon Sep 01 2014 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 12
|
|
- Removed use of %{?_smp_mflags}. On Ubuntu 14.04, the -j2
|
|
was executing make lines within a rule out of order. Always
|
|
use -j1 while building these RPMs to avoid this make bug.
|
|
This only impacts the speed of building the rpms.
|
|
- Stopped removing %{_buildroot} at the beginning of install
|
|
as this, according to a number of sources, was asking for trouble.
|
|
- Clean removes tmp, BUILD, SPEC, and BUILDROOT dirs under topdir.
|
|
- Fixed the building of the calc-debuginfo rpm.
|
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
|
by assuming the date is correct and changing the weekday via BogusDateBot.
|
|
Sun May 20 2006 --> Sun May 14 2006
|
|
Sun Sep 01 2007 --> Sun Aug 26 2007
|
|
Sat May 05 2013 --> Sat May 04 2013
|
|
|
|
* Sun Sep 01 2013 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 11
|
|
- only list %{_datadir}/%{name}/set8700.line not *.line
|
|
|
|
* Sun May 05 2013 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 10
|
|
- Major bug rpm build process bug fix
|
|
- Source: is a URL as per rpm requirements
|
|
- Requires: ncurses >= 5.5-24, readline >= 5.1-3, less >= 358
|
|
- BuildRequires: ncurses-devel >= 5.5-24, readline-devel >= 5.1-3
|
|
- BuildRoot: %{_tmppath}/build-root
|
|
- Fixed use of %{_buildroot}
|
|
- Fixed permissions so that rpm build services can modify libraries
|
|
- Added missing files to files section
|
|
|
|
* Mon Mar 25 2013 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 9 (was 1.1)
|
|
- Removed deprecated PreReq for calc-devel, using Requires
|
|
|
|
* Sat Sep 01 2007 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 8
|
|
- Release of calc-2.12.2
|
|
- Calc builds with shared libraries
|
|
|
|
* Sun Jun 25 2006 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 7
|
|
- Changed Copyright to License as per new rpm v4.4 syntax
|
|
|
|
* Sat May 20 2006 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 6
|
|
- Release of calc-2.12.0
|
|
- Added *.line set files to the list of packaged files
|
|
|
|
* Sun Dec 11 2005 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 5
|
|
- Release of calc-2.11.11
|
|
- Fixed description in spec file
|
|
|
|
* Wed Feb 26 2003 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 4
|
|
- Release of calc-2.11.7-2
|
|
- Fixed attributes on include and lib calc-devel files
|
|
- Added BUGS to calc-devel as well as calc
|
|
|
|
* Tue Feb 25 2003 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 3
|
|
- Release of calc-2.11.7-1
|
|
- Require ncurses, readline and less to install.
|
|
- Require ncurses-devel and readline-devel to build.
|
|
|
|
* Tue Feb 18 2003 Landon Curt Noll http://www.isthe.com/chongo
|
|
- Release: 2
|
|
- Misc changes to fit local directory setup
|
|
|
|
* Sun Feb 16 2003 Petteri Kettunen <petterik@users.sourceforge.net>
|
|
- Release: 1
|
|
- initial RPM build
|
|
|
|
#****
|