# exprtk.summa: TODO lo necesario para generar los paquetes de exprtk
# (deb, rpm, tgz y tar.gz). Se cambia aca; debian/ se genera de esto con
# summa.py debian (hacer-deb lo hace solo). debian/changelog no: es la
# historia, y la version de arriba tiene que ser BASEVERSION.
# Escrito por 'summa.py crear' desde debian/ el 07/10/2026.

# ---- el paquete
VERSION="2025.01.01-2"
BASEVERSION="2025.01.01"
SUMMARY="C++ Mathematical Expression Toolkit Library (cabecera)"
DESCRIPTION=$(cat << 'FIN_SUMMA'
exprtk evalua expresiones matematicas escritas como texto: variables,
funciones, condicionales y las operaciones habituales, compilando la
expresion una vez y evaluandola muchas. Es de Arash Partow, con licencia
MIT.

Es una sola cabecera de C++, sin biblioteca que enlazar. Este paquete la
instala en /usr/include/exprtk.hpp junto con su archivo pkg-config, de modo
que los proyectos que la usan no necesiten una copia propia:
PKG_CHECK_MODULES([EXPRTK],[exprtk]).

La usan tabular2, para la funcion Table() de una expresion, y calcula, para
el modulo dinamico que lee variables y ecuaciones de un archivo.
FIN_SUMMA
)
MAINTAINER="Diego Saravia <dsa@unsa.edu.ar>"
HOMEPAGE="https://www.partow.net/programming/exprtk/index.html"
SECTION="libdevel"
PRIORITY="optional"
STANDARDS="4.6.2"
LICENSE="MIT"
DEPENDS="\${misc:Depends}"
SOURCE_EXTRA="Rules-Requires-Root: no"

# ---- como se compila
BUILDDEPENDS="debhelper-compat (= 13)"
DH=""
CONFIGURE=""
RULES=$(cat << 'FIN_SUMMA'
# exprtk es header-only: no hay nada que compilar, solo instalar la cabecera
# y el .pc. El Makefile de autotools que habia aqui arrastraba summapack y
# bajaba archivos con wget; se borro el 08/10/2026 y el que quedo --que se
# llamaba Makefile.simple-- hace solo eso, con install y uninstall.

# El .pc lleva el prefijo adentro, asi que se genera con /usr; los tres
# archivos los pone dh con debian/install, que sale de ARCHIVO_install de
# este mismo .summa --la misma lista que usa el make install de las fuentes,
# por instalar-del-summa de summapack (08/10/2026)--.
override_dh_auto_build:
	$(MAKE) exprtk.pc prefix=/usr

override_dh_auto_install override_dh_auto_configure override_dh_auto_test override_dh_auto_clean:
	:
FIN_SUMMA
)

# ---- los paquetes que salen
PACKAGES="libexprtk-dev"

# libexprtk-dev
libexprtk_dev_ARCH="all"
libexprtk_dev_EXTRA=$(cat << 'FIN_SUMMA'
Section: libdevel
Multi-Arch: foreign
FIN_SUMMA
)

# ---- los demas archivos de debian/, enteros
SOURCEFORMAT="3.0 (quilt)"
ARCHIVOS="changelog.template copyright install"
EJECUTABLES=""
ARCHIVO_changelog_template=$(cat << 'FIN_SUMMA'
[% PACK %] ([% VERSION %].R[% SVVERSION %]-1) unstable; urgency=medium

  * Add German translation. Closes: #689001.

  * Initial release (Closes: #689001)

 -- Diego Saravia <dsa@ututo.org>  Mon, 26 Feb 2018 09:45:42 -0300
FIN_SUMMA
)
ARCHIVO_copyright=$(cat << 'FIN_SUMMA'
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: exprtk
Source: https://www.partow.net/programming/exprtk/index.html

Files: src/packages/exprtk/exprtk.hpp
Copyright: 1999-2025 Arash Partow
License: MIT
 Ver mit.txt.

Files: debian/* Makefile exprtk.pc.in
Copyright: 2016-2026 Diego Saravia <dsa@unsa.edu.ar>
License: MIT

License: MIT
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),
 to deal in the Software without restriction, including without limitation
 the rights to use, copy, modify, merge, publish, distribute, sublicense,
 and/or sell copies of the Software, and to permit persons to whom the
 Software is furnished to do so, subject to the following conditions:
 .
 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.
 .
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 DEALINGS IN THE SOFTWARE.
FIN_SUMMA
)

# ---- compilar desde las fuentes, sin herramientas de Debian (bajar-paquetes
# --para fuentes --instalar; etapa 1, 07/10/2026). PKGCONFIG: los modulos de
# pkg-config que provee, para saber si ya esta instalado en cualquier
# distribucion. FUENTES_CONSTRUIR y FUENTES_INSTALAR: como se compila e
# instala con $PREFIX; vacios, lo de autotools (autoreconf, configure
# $CONFIGURE, make; make install).
PKGCONFIG="exprtk"
FUENTES_CONSTRUIR=':'
FUENTES_INSTALAR='make install PREFIX="$PREFIX"'

# ---- otros datos, de summapack (los usan sus herramientas)
KEYWORDS="rpm deb exprtk"
AUTHOR="Arash Partow"
VENDOR="Simusol"
PRIMARYSITE="http://simusol.org/download"
SRC_URI="http://simusol.org/download/pkgs/test"
SRC_PKG_TYPE="simusol"
SIMUSOLTYPE="other"
CLASS="solar"

# ---- los archivos que lleva el paquete, y que instala tambien el make
# install de las fuentes (instalar-del-summa de summapack): una sola lista
# para los dos caminos.
ARCHIVO_install=$(cat << 'FIN_SUMMA'
src/packages/exprtk/exprtk.hpp usr/include
exprtk.pc usr/share/pkgconfig
mit.txt usr/share/doc/libexprtk-dev
FIN_SUMMA
)
