update calc rpm to relase 14

Sort .gitignore.  Add calc.spec to .gitignore.

Update format of header part of Makefiles.

Modify calc.spec.in to handle dynamic shared libraries with 3-digit
version numbers.
This commit is contained in:
Landon Curt Noll
2023-08-14 22:39:40 -07:00
parent 3a7e763b28
commit f097dd7dc1
11 changed files with 52 additions and 25 deletions

17
.gitignore vendored
View File

@@ -7,27 +7,26 @@
.dynamic .dynamic
.hsrc .hsrc
.static .static
Makefile.our
NOTES
align32.h align32.h
args.h args.h
cal/.all cal/.all
calc calc
calc-static
calc.1 calc.1
calc.usage
calcerr.c calcerr.c
calcerr.h calcerr.h
calc.spec
calc-static
calc.usage
charbit.h charbit.h
conf.h conf.h
cscript/.all
cscript/4dsphere cscript/4dsphere
cscript/README cscript/.all
cscript/fproduct cscript/fproduct
cscript/mersenne cscript/mersenne
cscript/piforever cscript/piforever
cscript/plus cscript/plus
cscript/powerterm cscript/powerterm
cscript/README
cscript/simple cscript/simple
cscript/square cscript/square
custom/.all custom/.all
@@ -69,8 +68,6 @@ have_unused.h
have_urandom.h have_urandom.h
have_ustat.h have_ustat.h
help/.all help/.all
help/COPYING
help/COPYING-LGPL
help/binding help/binding
help/bindings help/bindings
help/bug help/bug
@@ -80,6 +77,8 @@ help/change
help/changes help/changes
help/contrib help/contrib
help/copy help/copy
help/COPYING
help/COPYING-LGPL
help/cscript help/cscript
help/custom_cal help/custom_cal
help/errorcode help/errorcode
@@ -100,6 +99,8 @@ libcalc*
libcustcalc* libcustcalc*
longbits longbits
longbits.h longbits.h
Makefile.our
NOTES
sample_many sample_many
sample_many-static sample_many-static
sample_rand sample_rand

View File

@@ -26,7 +26,7 @@
# This calculator first developed by David I. Bell with help/mods from others. # This calculator first developed by David I. Bell with help/mods from others.
# #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/ # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# SUGGESTION: Instead of modifying this file, consider adding # SUGGESTION: Instead of modifying this file, consider adding

View File

@@ -23,7 +23,7 @@
# This calculator first developed by David I. Bell with help/mods from others. # This calculator first developed by David I. Bell with help/mods from others.
# #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/ # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# SUGGESTION: Instead of modifying this file, consider adding # SUGGESTION: Instead of modifying this file, consider adding

View File

@@ -23,7 +23,7 @@
# This calculator first developed by David I. Bell with help/mods from others. # This calculator first developed by David I. Bell with help/mods from others.
# #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/ # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
#### ####
# This file is included all calc Makefiles after the last Makefile variable # This file is included all calc Makefiles after the last Makefile variable

View File

@@ -23,7 +23,7 @@
# This calculator first developed by David I. Bell with help/mods from others. # This calculator first developed by David I. Bell with help/mods from others.
# #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/ # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# SUGGESTION: Instead of modifying this file, consider adding # SUGGESTION: Instead of modifying this file, consider adding

View File

@@ -26,7 +26,7 @@
# This calculator first developed by David I. Bell with help/mods from others. # This calculator first developed by David I. Bell with help/mods from others.
# #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/ # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# SUGGESTION: Instead of modifying this file, consider adding # SUGGESTION: Instead of modifying this file, consider adding

View File

@@ -1,7 +1,7 @@
# #
# calc.spec.in - template specfile for calc # calc.spec.in - template specfile for calc
# #
# Copyright (C) 2003-2014,2021 Petteri Kettunen and Landon Curt Noll # 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 # 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 # the terms of the version 2.1 of the GNU Lesser General Public License
@@ -20,8 +20,10 @@
# Under source code control: 2003/02/16 20:21:39 # Under source code control: 2003/02/16 20:21:39
# File existed as early as: 2003 # File existed as early as: 2003
# #
# calculator by David I. Bell with help/mods from others # This calculator first developed by David I. Bell with help/mods from others.
# Makefile by Petteri Kettunen with modifications from Landon Curt Noll #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# BUGS # BUGS
# - Uninstalling calc and calc-devel leaves empty dirs /usr/include/calc # - Uninstalling calc and calc-devel leaves empty dirs /usr/include/calc
@@ -32,11 +34,11 @@
Summary: Arbitrary precision calculator. Summary: Arbitrary precision calculator.
Name: calc Name: calc
Version: <<<PROJECT_VERSION>>> Version: <<<PROJECT_VERSION>>>
Release: 13 Release: 14
License: LGPL License: LGPL
Group: Applications/Engineering Group: Applications/Engineering
Source: http://www.isthe.com/chongo/src/calc/%{name}-%{version}.tar.bz2 Source: https://github.com/lcn2/calc/releases/download/v${version}/${name}-${version}.tar.bz2
URL: http://www.isthe.com/chongo/tech/comp/calc/index.html URL: https://github.com/lcn2/calc
Vendor: Landon Noll and Associates Vendor: Landon Noll and Associates
Packager: Landon Noll and Associates (http://www.isthe.com/chongo/index.html) Packager: Landon Noll and Associates (http://www.isthe.com/chongo/index.html)
Requires: ncurses >= 5.5-24, readline >= 5.1-3, less >= 358 Requires: ncurses >= 5.5-24, readline >= 5.1-3, less >= 358
@@ -51,7 +53,11 @@ calculator, an algorithm prototype and mathematical research
tool. Calc comes with a rich set of builtin mathematical and tool. Calc comes with a rich set of builtin mathematical and
programming functions. programming functions.
For the latest calc release, see the calc project home page: 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 http://www.isthe.com/chongo/tech/comp/calc/index.html
@@ -67,7 +73,11 @@ Requires: ncurses >= 5.5-24, readline >= 5.1-3, less >= 358
This package contains the header files and static libraries for developing This package contains the header files and static libraries for developing
calc (arbitrary precision calculator). calc (arbitrary precision calculator).
For the latest calc release, see the project home page: 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 http://www.isthe.com/chongo/tech/comp/calc/index.html
@@ -152,8 +162,10 @@ echo '-=- calc.spec beginning make clean -=-'
%attr(644, root, root) %{_datadir}/%{name}/*.cal %attr(644, root, root) %{_datadir}/%{name}/*.cal
%attr(644, root, root) %{_datadir}/%{name}/set8700.line %attr(644, root, root) %{_datadir}/%{name}/set8700.line
%attr(644, root, root) %{_libdir}/libcalc.so %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}/libcalc.so.%{version}
%attr(644, root, root) %{_libdir}/libcustcalc.so %attr(644, root, root) %{_libdir}/libcustcalc.so
%attr(644, root, root) %{_libdir}/libcustcalc.so.<<<PROJECT_VER>>>
%attr(644, root, root) %{_libdir}/libcustcalc.so.%{version} %attr(644, root, root) %{_libdir}/libcustcalc.so.%{version}
%files devel %files devel
@@ -165,6 +177,11 @@ echo '-=- calc.spec beginning make clean -=-'
%attr(644, root, root) %{_libdir}/libcustcalc.a %attr(644, root, root) %{_libdir}/libcustcalc.a
%changelog %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 * Sun Mar 24 2019 Landon Curt Noll http://www.isthe.com/chongo
- Release: 13 - Release: 13
- Disable compiling with the default ARCH_CFLAGS= -march=native - Disable compiling with the default ARCH_CFLAGS= -march=native

View File

@@ -26,7 +26,7 @@
# This calculator first developed by David I. Bell with help/mods from others. # This calculator first developed by David I. Bell with help/mods from others.
# #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/ # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# SUGGESTION: Instead of modifying this file, consider adding # SUGGESTION: Instead of modifying this file, consider adding

View File

@@ -26,7 +26,7 @@
# This calculator first developed by David I. Bell with help/mods from others. # This calculator first developed by David I. Bell with help/mods from others.
# #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/ # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# SUGGESTION: Instead of modifying this file, consider adding # SUGGESTION: Instead of modifying this file, consider adding

View File

@@ -26,7 +26,7 @@
# This calculator first developed by David I. Bell with help/mods from others. # This calculator first developed by David I. Bell with help/mods from others.
# #
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/ # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
# SUGGESTION: Instead of modifying this file, consider adding # SUGGESTION: Instead of modifying this file, consider adding

11
rpm.mk
View File

@@ -134,10 +134,12 @@ V=@:
all: ver_calc calc.spec all: ver_calc calc.spec
${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-='
PROJECT_VERSION="`./ver_calc`"; \ PROJECT_VERSION="`./ver_calc`"; \
PROJECT_VER="`./ver_calc -V`"; \
PROJECT_RELEASE="`${SED} -n \ PROJECT_RELEASE="`${SED} -n \
-e '/^Release:/s/^Release: *//p' calc.spec.in`"; \ -e '/^Release:/s/^Release: *//p' calc.spec.in`"; \
$(MAKE) -f rpm.mk rpm \ $(MAKE) -f rpm.mk rpm \
PROJECT_VERSION="$$PROJECT_VERSION" \ PROJECT_VERSION="$$PROJECT_VERSION" \
PROJECT_VER="$$PROJECT_VER" \
PROJECT_RELEASE="$$PROJECT_RELEASE" Q= S= E= PROJECT_RELEASE="$$PROJECT_RELEASE" Q= S= E=
${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-='
@@ -158,6 +160,7 @@ calc.spec: calc.spec.in ver_calc
${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-='
${RM} -f calc.spec ${RM} -f calc.spec
${SED} -e 's/<<<PROJECT_VERSION>>>/'"`./ver_calc`"/g \ ${SED} -e 's/<<<PROJECT_VERSION>>>/'"`./ver_calc`"/g \
-e 's/<<<PROJECT_VER>>>/'"`./ver_calc -V`"/g \
calc.spec.in > calc.spec calc.spec.in > calc.spec
${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-='
@@ -167,6 +170,7 @@ srcpkg: make_rhdir
${V} echo RPM_TOP="${RPM_TOP}" ${V} echo RPM_TOP="${RPM_TOP}"
${V} echo RPM_BUILD_ROOT="${RPM_BUILD_ROOT}" ${V} echo RPM_BUILD_ROOT="${RPM_BUILD_ROOT}"
${V} echo PROJECT_VERSION="${PROJECT_VERSION}" ${V} echo PROJECT_VERSION="${PROJECT_VERSION}"
${V} echo PROJECT_VER="${PROJECT_VER}"
${V} echo PROJECT_RELEASE="${PROJECT_RELEASE}" ${V} echo PROJECT_RELEASE="${PROJECT_RELEASE}"
${RM} -rf "$(TMPDIR)/$(PROJECT)" ${RM} -rf "$(TMPDIR)/$(PROJECT)"
${FIND} . -depth -print | \ ${FIND} . -depth -print | \
@@ -190,6 +194,7 @@ rpm: srcpkg calc.spec
${V} echo RPM_TOP="${RPM_TOP}" ${V} echo RPM_TOP="${RPM_TOP}"
${V} echo RPM_BUILD_ROOT="${RPM_BUILD_ROOT}" ${V} echo RPM_BUILD_ROOT="${RPM_BUILD_ROOT}"
${V} echo PROJECT_VERSION="${PROJECT_VERSION}" ${V} echo PROJECT_VERSION="${PROJECT_VERSION}"
${V} echo PROJECT_VER="${PROJECT_VER}"
${V} echo PROJECT_RELEASE="${PROJECT_RELEASE}" ${V} echo PROJECT_RELEASE="${PROJECT_RELEASE}"
$(MAKE) -f Makefile clean Q= S= E= $(MAKE) -f Makefile clean Q= S= E=
${CP} "$(SPECFILE)" "$(RPM_TOP)/SPECS/$(SPECFILE)" ${CP} "$(SPECFILE)" "$(RPM_TOP)/SPECS/$(SPECFILE)"
@@ -210,6 +215,7 @@ make_rhdir:
${V} echo RPM_TOP="${RPM_TOP}" ${V} echo RPM_TOP="${RPM_TOP}"
${V} echo RPM_BUILD_ROOT="${RPM_BUILD_ROOT}" ${V} echo RPM_BUILD_ROOT="${RPM_BUILD_ROOT}"
${V} echo PROJECT_VERSION="${PROJECT_VERSION}" ${V} echo PROJECT_VERSION="${PROJECT_VERSION}"
${V} echo PROJECT_VER="${PROJECT_VER}"
${V} echo PROJECT_RELEASE="${PROJECT_RELEASE}" ${V} echo PROJECT_RELEASE="${PROJECT_RELEASE}"
for subdir in "" BUILD RPMS SOURCES SPECS SRPMS tmp; do \ for subdir in "" BUILD RPMS SOURCES SPECS SRPMS tmp; do \
i="$(RPM_TOP)/$$subdir"; \ i="$(RPM_TOP)/$$subdir"; \
@@ -287,7 +293,10 @@ test: ver_calc
echo "test needs to install, must be root to test" 1>&2; \ echo "test needs to install, must be root to test" 1>&2; \
exit 6; \ exit 6; \
fi fi
$(MAKE) -f rpm.mk PROJECT_VERSION="`./ver_calc`" installrpm \ $(MAKE) -f rpm.mk \
PROJECT_VERSION="`./ver_calc`" \
PROJECT_VER="`./ver_calc -V`" \
installrpm \
chksys Q= S= E= chksys Q= S= E=
${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-='