commit a36dd642d8fe04c687d4f481cb1018f4a4aaf7cc
parent 6f62ce0a0602aa1ea0757638e096f10265a5fd56
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Thu, 23 Apr 2026 08:36:52 +0200
build: Migrate to meson
Diffstat:
17 files changed, 1577 insertions(+), 427 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,13 +1,11 @@
**~
-**/Makefile.in
-**/Makefile
INSTALL
+Makefile
aclocal.m4
autom4te.cache/
compile
config.guess
config.sub
-configure
depcomp
install-sh
ltmain.sh
diff --git a/Makefile.in b/Makefile.in
@@ -0,0 +1,49 @@
+# Build the program in the local tree
+.PHONY: all
+all:
+ $(NINJA) -C $(mesonbuilddir)
+
+# Install the program
+.PHONY: install
+install: all
+ $(MESON) install -C $(mesonbuilddir)
+
+# Remove files created during 'all'
+.PHONY: clean
+clean:
+ $(NINJA) -C $(mesonbuilddir) -t clean
+
+# Remove files created during 'install'
+.PHONY: uninstall
+uninstall:
+ $(NINJA) uninstall -C $(mesonbuilddir)
+
+# Make tarball
+.PHONY: dist
+dist:
+ $(MESON) dist -C $(mesonbuilddir) --no-tests --formats gztar
+
+# Make doxygen
+.PHONY: doxygen
+doxygen:
+ $(NINJA) -C $(mesonbuilddir) doxygen
+
+# Run tests
+.PHONY: check
+check:
+ $(MESON) test -C $(mesonbuilddir)
+
+.PHONY: installcheck
+installcheck:
+ $(MESON) test -C $(mesonbuilddir) --suite=installcheck
+
+.PHONY: integrationtests
+integrationtests:
+ $(MESON) test -C $(mesonbuilddir) --suite=integrationtests
+
+format:
+ $(MESON) fmt -i -r .
+ #find ./src -name "*.[h,c]" | uncrustify -l c -c contrib/conf/uncrustify.cfg -F - --replace --no-backup
+
+Makefile: Makefile.in
+ ./config.status
diff --git a/bootstrap b/bootstrap
@@ -1,3 +1,4 @@
#!/bin/sh
-autoreconf -if
-git submodule update --init --force --remote
+if [ -d ".git" ]; then
+ git submodule update --init --force --remote
+fi
diff --git a/configure b/configure
@@ -0,0 +1,255 @@
+#!/bin/sh
+
+pkg_name="paivana"
+pkg_default_features=""
+pkg_optional_features="coverage logging only-doc install-rpath"
+pkg_optional_dependencies=""
+
+# DO NOT EDIT BELOW THIS LINE
+standard_dirs="prefix exec_prefix bindir sbindir libexecdir sysconfdir sharedstatedir localstatedir runstatedir libdir includedir oldincludedir datarootdir datadir infodir localedir mandir docdir htmldir dvidir pdfdir psdir srcdir mesonbuilddir"
+standard_utils="AR AS BISON CC CXX CPP FLEX INSTALL LD LDCONFIG LEX MAKE MAKEINFO RANLIB TEXI2DVI YACC CHGRP CHMOD CHOWN MKNOD RM NINJA MESON"
+standard_flags="ARFLAGS BISONFLAGS CFLAGS CXXFLAGS CPPFLAGS FLEXFLAGS INSTALLFLAGS LDFLAGS LDCONFIGFLAGS LFLAGS MAKEFLAGS MAKEINFOFLAGS RANLIBFLAGS TEXI2DVIFLAGS YACCFLAGS CHGRPFLAGS CHMODFLAGS CHOWNFLAGS MKNODFLAGS"
+standard_vars="INSTALL_DATA INSTALL_PROGRAM INSTALL_SCRIPT"
+generated_comment="# This file was generated by configure. DO NOT edit it directly."
+
+# Save arguments
+cat > config.status <<EOF
+#!/bin/sh
+$generated_comment
+$0 $*
+EOF
+chmod 755 config.status
+
+# Parse arguments
+oldifs="$IFS"
+while [ "$#" -gt "0" ]; do
+ arg="$1"
+ shift
+ argsave="$@"
+
+ IFS="="
+ set -- $arg
+ IFS="$oldifs"
+ arg="$1"
+ shift
+ argparam="$@"
+
+ case "$arg" in
+ --help|-h)
+ cat <<-EOF
+ Usage: $0 [options...]
+ General options:
+
+ <variable>=<value> Overrides default utils and flags, e.g. CC=gcc
+ EOF
+ echo ""
+ echo "Directory variables:"
+ for sdir in $standard_dirs; do
+ echo "--$sdir=<directory>"
+ done
+ echo ""
+ echo "Options specific to $pkg_name:"
+ for feat in $pkg_optional_features; do
+ echo "--enable-$feat[=arg]"
+ done
+ for feat in $pkg_default_features; do
+ echo "--disable-$feat"
+ done
+ for dep in $pkg_optional_dependencies; do
+ echo "--with-$dep"
+ done
+
+ echo
+ echo Other options will be ignored. Please see the README for additional information.
+ exit 0
+ ;;
+ --enable-*)
+ for feat in $pkg_optional_features $pkg_default_features; do
+ ft=$(echo $feat | tr - _)
+ if [ "--enable-$feat" = "$arg" ] && [ -z "$argparam" ]; then
+ eval "enable_$ft=true"
+ elif [ "--enable-$feat" = "$arg" ]; then
+ if [ "$argparam" = "yes" ]; then
+ eval "enable_$ft=\"true\""
+ else
+ eval "enable_$ft=\"$argparam\""
+ fi
+ fi
+ done
+ ;;
+ --disable-*)
+ argsave="--enable-${arg#--disable-}=false $argsave"
+ ;;
+ --with-*)
+ for dep in $pkg_optional_dependencies; do
+ if [ "--with-$dep" = "$arg" ] && [ -z "$argparam" ]; then
+ eval "with_$dep=yes"
+ elif [ "--with-$dep" = "$arg" ]; then
+ eval "with_$dep=\"$argparam\""
+ fi
+ done
+ ;;
+ --without-*)
+ argsave="--with-${arg#--without-}=no $argsave"
+ ;;
+ --*)
+ for dir in $standard_dirs; do
+ [ "--$dir" = "$arg" ] && eval "var_$dir=\"$argparam\""
+ done
+ ;;
+ *)
+ for flag in $standard_utils $standard_flags standard_vars; do
+ [ "$flag" = "$arg" ] && eval "$flag=\"$argparam\""
+ done
+ ;;
+ esac
+
+ set -- $argsave
+done
+
+# Set default values
+for util in $standard_utils; do
+ case "$util" in
+ CPP) eval "$util=\"\${${util}:-\\\$(CC) -E}\"" ;;
+ CXX) eval "$util=\"\${${util}:-g++}\"" ;;
+ RM) eval "$util=\"\${${util}:-rm -f}\"" ;;
+ MESON) eval "$util=\"\${${util}:-meson}\"" ;;
+ NINJA) eval "$util=\"\${${util}:-ninja}\"" ;;
+ *) eval "$util=\"\${${util}:-${util}}\"" ;;
+ esac
+done
+for feat in $pkg_optional_features; do
+ ft=$(echo $feat | tr - _)
+ eval "enable_$ft=\${enable_$ft:-false}"
+done
+for feat in $pkg_default_features; do
+ eval "enable_$feat=\${enable_$feat:-true}"
+done
+for feat in $pkg_optional_dependencies; do
+ eval "with_$feat=\${with_$feat:-no}"
+done
+
+# Find source files
+if [ -z "$var_srcdir" ]; then
+ [ -f ../Makefile.in ] && var_srcdir=..
+ [ -f ./Makefile.in ] && var_srcdir=.
+fi
+if [ -z "$var_srcdir" ]; then
+ echo "Source files not found. Please specify a directory using --srcdir=..." >&2
+ exit 1
+fi
+
+# Write Makefile
+cat > Makefile <<EOF
+$generated_comment
+SHELL = /bin/sh
+VPATH = ${var_srcdir}
+
+mesonbuilddir = ${var_mesonbuilddir:-build}
+srcdir = ${var_srcdir}
+prefix = ${var_prefix:-/usr/local}
+exec_prefix = ${var_exec_prefix:-\$(prefix)}
+bindir = ${var_bindir:-\$(exec_prefix)/bin}
+sbindir = ${var_sbindir:-\$(exec_prefix)/sbin}
+libexecdir = ${var_libexecdir:-\$(exec_prefix)/libexec}
+datarootdir = ${var_datarootdir:-\$(prefix)/share}
+datadir = ${var_datadir:-\$(datarootdir)}
+sysconfdir = ${var_sysconfdir:-\$(prefix)/etc}
+sharedstatedir = ${var_sharedstatedir:-\$(prefix)/com}
+localstatedir = ${var_localstatedir:-\$(prefix)/var}
+runstatedir = ${var_runstatedir:-\$(localstatedir)/run}
+includedir = ${var_includedir:-\$(prefix)/include}
+oldincludedir = ${var_oldincludedir:-/usr/include}
+docdir = ${var_docdir:-\$(datarootdir)/doc/"$pkg_name"}
+infodir = ${var_infodir:-\$(datarootdir)/info}
+htmldir = ${var_htmldir:-\$(docdir)}
+dvidir = ${var_dvidir:-\$(docdir)}
+pdfdir = ${var_pdfdir:-\$(docdir)}
+psdir = ${var_psdir:-\$(docdir)}
+libdir = ${var_libdir:-\$(exec_prefix)/lib}
+lispdir = ${var_lispdir:-\$(datarootdir)/emacs/site-lisp}
+localedir = ${var_localedir:-\$(datarootdir)/locale}
+mandir = ${var_mandir:-\$(datarootdir)/man}
+manext = .1
+EOF
+
+if [ -d ${var_mesonbuilddir:-build} ]; then
+ echo "${var_mesonbuilddir:-build} already exists, deleting with"
+ $RM -r ${var_mesonbuilddir:-build} || exit 1
+fi
+
+for var in $standard_utils $standard_flags $standard_vars; do
+ eval "echo \"${var} = \$${var}\" >> Makefile"
+done
+echo >> Makefile
+
+mesonfeatopts=""
+for feat in $pkg_optional_features $pkg_default_features; do
+ ft=$(echo $feat | tr - _)
+ eval "echo \"enable_$ft=\${enable_$ft}\" >> Makefile"
+ if [ "coverage" = $feat ]; then
+ mfeat="b_$feat"
+ else
+ mfeat=$feat
+ fi
+ eval "mesonfeatopts=\"$mesonfeatopts -D$mfeat=\${enable_$ft}\""
+done
+for dep in $pkg_optional_dependencies; do
+ eval "echo \"with_$dep=\${with_$dep}\" >> Makefile"
+done
+echo >> Makefile
+
+cat "${var_srcdir}/Makefile.in" >> Makefile
+
+# Create default targets, if not already present
+default_target() {
+ grep "^$1:" Makefile >/dev/null && return
+ echo ".PHONY: $1" >> Makefile
+ echo "$1: $2" >> Makefile
+ cat >> Makefile
+ echo >> Makefile
+}
+
+#default_target Makefile <<EOF
+# ./config.status
+#EOF
+for format in html dvi pdf ps; do
+ default_target "$format" </dev/null
+ default_target "install-$format" "$format" </dev/null
+done
+default_target check </dev/null
+default_target mostlyclean clean </dev/null
+default_target distclean clean <<EOF
+ \$(RM) Makefile config.status
+EOF
+default_target maintainer-clean distclean </dev/null
+default_target install-strip <<EOF
+ \$(MAKE) INSTALL_PROGRAM='\$(INSTALL_PROGRAM) -s' \\
+ INSTALL_SCRIPT='\$(INSTALL_SCRIPT)' install
+EOF
+
+mesondiropts=""
+for dr in $standard_dirs; do
+ if [ $dr = "srcdir" ]; then
+ continue
+ fi
+ if [ $dr = "mesonbuilddir" ]; then
+ continue
+ fi
+ eval "vn=\${var_$dr}"
+ if [ ! -z $vn ]; then
+ eval "mesondiropts=\"$mesondiropts -D$dr=\${var_$dr}\""
+ fi
+done
+
+${MESON} setup \
+ -Ddefault_library=shared \
+ $mesondiropts \
+ $mesonfeatopts \
+ ${var_mesonbuilddir:-build} \
+ ${var_srcdir} || exit 1
+
+# Done
+echo "Package $pkg_name configured successfully."
+echo "Run 'make' to build and 'make install' to install the package"
+
diff --git a/configure.ac b/configure.ac
@@ -1,369 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-#
-# This file is part of TALER
-# Copyright (C) 2025 Taler Systems SA
-#
-# TALER is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3, or (at your option) any later version.
-#
-# TALER 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 General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/license>
-#
-#
-AC_PREREQ([2.71])
-AC_INIT([paivana],[0.0.0],[taler-bug@gnunet.org])
-AC_CONFIG_SRCDIR([src/backend/paivana-httpd.c])
-AC_CONFIG_HEADERS([paivana_config.h])
-# support for non-recursive builds
-AM_INIT_AUTOMAKE([subdir-objects 1.9 tar-pax])
-
-# pretty build rules
-AM_SILENT_RULES([yes])
-
-AC_CONFIG_MACRO_DIR([m4])
-
-LT_INIT
-
-# Checks for programs.
-
-AC_PROG_CC
-
-CFLAGS="-Wall $CFLAGS"
-
-# Checks for header files.
-AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h])
-
-
-# Require minimum libgcrypt version
-need_libgcrypt_version=1.6.1
-AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], ["$need_libgcrypt_version"],
- [minimum version of libgcrypt required])
-AM_PATH_LIBGCRYPT([$need_libgcrypt_version])
-
-
-# Check for GNUnet's libgnunetutil.
-libgnunetutil=0
-AC_MSG_CHECKING([for libgnunetutil])
-AC_ARG_WITH(gnunet,
- [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
- [AC_MSG_RESULT([given as $with_gnunet])],
- [AC_MSG_RESULT(not given)
- with_gnunet=yes])
-AS_CASE([$with_gnunet],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-gnunet is required])],
- [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
- CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
-AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h],
- [AC_CHECK_LIB([gnunetutil], [GNUNET_SCHEDULER_run], libgnunetutil=1)])
-AS_IF([test $libgnunetutil != 1],
- [AC_MSG_ERROR([[
-***
-*** You need libgnunetutil to build this program.
-*** This library is part of GNUnet, available at
-*** https://gnunet.org
-*** ]])])
-
-# Check for GNUnet's libgnunetjson.
-libgnunetjson=0
-AC_MSG_CHECKING([for libgnunetjson])
-AC_ARG_WITH(gnunet,
- [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
- [AC_MSG_RESULT([given as $with_gnunet])],
- [AC_MSG_RESULT(not given)
- with_gnunet=yes])
-AS_CASE([$with_gnunet],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-gnunet is required])],
- [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
- CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
-AC_CHECK_HEADERS([gnunet/gnunet_json_lib.h],
- [AC_CHECK_LIB([gnunetjson], [GNUNET_JSON_parse], libgnunetjson=1)])
-AS_IF([test $libgnunetjson != 1],
- [AC_MSG_ERROR([[
-***
-*** You need libgnunetjson to build this program.
-*** Make sure you have libjansson installed while
-*** building GNUnet.
-*** ]])])
-
-
-# Save before checking libcurl
-CFLAGS_SAVE=$CFLAGS
-LDFLAGS_SAVE=$LDFLAGS
-LIBS_SAVE=$LIBS
-
-# check for libcurl
-LIBCURL_CHECK_CONFIG(,7.34.0,[curl=1],[curl=0])
-
-# cURL must support CURLINFO_TLS_SESSION, version >= 7.34
-AS_IF([test "x$curl" = x1],[
- AC_CHECK_HEADER([curl/curl.h],
- [AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=1],[curl=0],[[#include <curl/curl.h>]])],
- [curl=0])
-])
-
-# libcurl should be mutually exclusive
-AS_IF([test "$curl" = 1],
- AM_CONDITIONAL(HAVE_LIBCURL, true)
- AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])
- [LIBCURL_LIBS="-lcurl"],
- [AC_MSG_ERROR([FATAL: No libcurl])])
-
-AC_SUBST([LIBCURL_LIBS])
-
-
-# Check for GNUnet's libgnunetcurl.
-libgnunetcurl=0
-AC_MSG_CHECKING([for libgnunetcurl])
-AC_ARG_WITH(gnunet,
- [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
- [AC_MSG_RESULT([given as $with_gnunet])],
- [AC_MSG_RESULT(not given)
- with_gnunet=yes])
-AS_CASE([$with_gnunet],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-gnunet is required])],
- [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
- CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
-AC_CHECK_HEADERS([gnunet/gnunet_curl_lib.h],
- [AC_CHECK_LIB([gnunetcurl], [GNUNET_CURL_get_select_info], libgnunetcurl=1)])
-AS_IF([test $libgnunetcurl != 1],
- [AC_MSG_ERROR([[
-***
-*** You need libgnunetcurl to build this program.
-*** Make sure you have libcurl installed while
-*** building GNUnet.
-*** ]])])
-
-
-# check for libmicrohttpd
-microhttpd=0
-AC_MSG_CHECKING([for microhttpd])
-AC_ARG_WITH([microhttpd],
- [AS_HELP_STRING([--with-microhttpd=PFX], [base of microhttpd installation])],
- [AC_MSG_RESULT([given as $with_microhttpd])],
- [AC_MSG_RESULT([not given])
- with_microhttpd=yes])
-AS_CASE([$with_microhttpd],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-microhttpd is required])],
- [LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
- CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"])
-AC_CHECK_LIB(microhttpd,MHD_start_daemon,
- [AC_CHECK_HEADER([microhttpd.h],[microhttpd=1])])
-AC_CHECK_DECL([MHD_DAEMON_INFO_CURRENT_CONNECTIONS],,[microhttpd=0],[[#include <microhttpd.h>]])
-AS_IF([test $microhttpd = 0],
- [AC_MSG_ERROR([[
-***
-*** You need libmicrohttpd >= 0.9.39 to build this program.
-*** ]])])
-
-
-# check for libjansson (Jansson JSON library)
-jansson=0
-AC_MSG_CHECKING([for jansson])
-AC_ARG_WITH([jansson],
- [AS_HELP_STRING([--with-jansson=PFX], [base of jansson installation])],
- [AC_MSG_RESULT([given as $with_jansson])],
- [AC_MSG_RESULT([not given])
- with_jansson=yes])
-AS_CASE([$with_jansson],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-jansson is required])],
- [LDFLAGS="-L$with_jansson/lib $LDFLAGS"
- CPPFLAGS="-I$with_jansson/include $CPPFLAGS"])
-AC_CHECK_LIB(jansson,json_pack,
- [AC_CHECK_HEADER([jansson.h],[jansson=1])])
-AS_IF([test $jansson = 0],
- [AC_MSG_ERROR([[
-***
-*** You need libjansson to build this program.
-*** ]])])
-
-
-# Check for Taler's libtalermerchant
-libtalermerchant=0
-AC_MSG_CHECKING([for libtalermerchant])
-AC_ARG_WITH(merchant,
- [AS_HELP_STRING([--with-merchant=PFX], [base of Taler MERCHANT installation])],
- [AC_MSG_RESULT([given as $with_merchant])],
- [AC_MSG_RESULT(not given)
- with_merchant=yes])
-AS_CASE([$with_merchant],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-merchant is required])],
- [LDFLAGS="-L$with_merchant/lib/$MULTIARCH -L$with_merchant/lib/ $LDFLAGS"
- CPPFLAGS="-I$with_merchant/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"])
-
-AC_CHECK_HEADERS([taler/taler_merchant_service.h],
- [AC_CHECK_LIB([talermerchant], [TALER_MERCHANT_poll_payment], libtalermerchant=1)],
- [], [])
-
-
-# Check for Taler's libtalerexchange
-libtalerexchange=0
-AC_MSG_CHECKING([for libtalerexchange])
-AC_ARG_WITH(exchange,
- [AS_HELP_STRING([--with-exchange=PFX], [base of Taler EXCHANGE installation])],
- [AC_MSG_RESULT([given as $with_exchange])],
- [AC_MSG_RESULT(not given)
- with_exchange=yes])
-AS_CASE([$with_exchange],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-exchange is required])],
- [LDFLAGS="-L$with_exchange/lib/$MULTIARCH -L$with_exchange/lib/ $LDFLAGS"
- CPPFLAGS="-I$with_exchange/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"])
-
-AC_CHECK_HEADERS([taler/taler_exchange_service.h],
- [AC_CHECK_LIB([talerexchange], [TALER_EXCHANGE_parse_451], libtalerexchange=1)],
- [], [])
-
-
-TALER_LIB_LDFLAGS="-export-dynamic -no-undefined"
-TALER_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
-
-AC_SUBST(TALER_LIB_LDFLAGS)
-AC_SUBST(TALER_PLUGIN_LDFLAGS)
-
-CFLAGS_SAVE=$CFLAGS
-LDFLAGS_SAVE=$LDFLAGS
-LIBS_SAVE="$LIBS"
-
-
-# test for zlib
-SAVE_LDFLAGS=$LDFLAGS
-SAVE_CPPFLAGS=$CPPFLAGS
-AC_ARG_WITH(zlib,
- [ --with-zlib[[=DIR]] use libz in DIR],
- [AS_IF([test "$withval" = "no"],
- [AC_MSG_ERROR([Twister requires zlib])],
- [test "$withval" != "yes"],
- [
- Z_DIR=$withval
- CPPFLAGS="${CPPFLAGS} -I$withval/include"
- LDFLAGS="${LDFLAGS} -L$withval/lib"
- ])
- ])
-AC_CHECK_HEADER(zlib.h,
- [],
- [AC_MSG_ERROR([GNUnet requires zlib])])
-AC_CHECK_LIB(z, compress2,
- [
- AC_DEFINE([HAVE_ZLIB], [], [Have compression library])
- if test "x${Z_DIR}" != "x"; then
- Z_CFLAGS="-I${Z_DIR}/include"
- Z_LIBS="-L${Z_DIR}/lib -lz"
- else
- Z_LIBS="-lz"
- fi],
- [AC_MSG_ERROR([Twister requires zlib])])
-AC_SUBST(Z_CFLAGS)
-AC_SUBST(Z_LIBS)
-
-
-# should developer logic be compiled (not-for-production code)?
-AC_MSG_CHECKING(whether to compile developer logic)
-AC_ARG_ENABLE([developer-mode],
- [AS_HELP_STRING([--enable-developer-mode], [enable compiling developer code])],
- [enable_developer=${enableval}],
- [enable_developer=yes])
-AC_MSG_RESULT($enable_developer)
-AM_CONDITIONAL([HAVE_DEVELOPER], [test "x$enable_developer" = "xyes"])
-enable_dev=1
-AS_IF([test "x$enableval" = "xno"], [enable_dev=0])
-# developer-logic requires a more recent MHD than usual.
-AC_CHECK_DECL([MHD_OPTION_NOTIFY_CONNECTION],,[enable_dev=0],[[#include <microhttpd.h>]])
-AC_DEFINE_UNQUOTED([HAVE_DEVELOPER],[$enable_dev],[1 if developer logic is enabled, 0 otherwise])
-
-
-
-# Adam shostack suggests the following for Windows:
-# -D_FORTIFY_SOURCE=2 -fstack-protector-all
-AC_ARG_ENABLE(gcc-hardening,
- AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
-[if test x$enableval = xyes; then
- CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all"
- CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
- CFLAGS="$CFLAGS --param ssp-buffer-size=1"
- LDFLAGS="$LDFLAGS -pie"
-fi])
-
-
-# Linker hardening options
-# Currently these options are ELF specific - you can't use this with MacOSX
-AC_ARG_ENABLE(linker-hardening,
- AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
-[if test x$enableval = xyes; then
- LDFLAGS="$LDFLAGS -z relro -z now"
-fi])
-
-
-# gcov compilation
-AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
-AC_ARG_ENABLE([coverage],
- AS_HELP_STRING([--enable-coverage],
- [compile the library with code coverage support]),
- [use_gcov=${enableval}],
- [use_gcov=no])
-AC_MSG_RESULT($use_gcov)
-AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
-
-# version info
-AC_PATH_PROG(gitcommand, git)
-AC_MSG_CHECKING(for source being under a VCS)
-git_version=
-AS_IF([test ! "X$gitcommand" = "X"],
-[
- git_version=$(cd $srcdir ; git rev-list --full-history --all --abbrev-commit | head -n 1 2>/dev/null)
-])
-AS_IF([test "X$git_version" = "X"],
- [
- vcs_name="no"
- vcs_version="\"release\""
- ],
- [
- vcs_name="yes, git-svn"
- vcs_version="\"git-$git_version\""
- ])
-AC_MSG_RESULT($vcs_name)
-
-AC_MSG_CHECKING(VCS version)
-AC_MSG_RESULT($vcs_version)
-AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball version])
-
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_TYPE_UINT16_T
-AC_TYPE_UINT32_T
-AC_TYPE_UINT64_T
-AC_TYPE_INTMAX_T
-AC_TYPE_UINTMAX_T
-
-# Checks for library functions.
-AC_CHECK_FUNCS([strdup])
-
-
-AC_ARG_ENABLE([[doc]],
- [AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], ,
- [enable_doc=yes])
-test "x$enable_doc" = "xno" || enable_doc=yes
-AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"])
-
-
-AC_CONFIG_FILES([Makefile
- contrib/Makefile
- doc/Makefile
- src/Makefile
- src/include/Makefile
- src/backend/Makefile
- ])
-AC_OUTPUT
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
@@ -1,7 +0,0 @@
-SUBDIRS = .
-
-paywallpkgdatadir = $(datadir)/paivana/templates/
-paywallpkgdata_DATA = \
- paywall.en.must
-
-EXTRA_DIST = $(paywallpkgdata_DATA)
diff --git a/contrib/meson.build b/contrib/meson.build
@@ -0,0 +1,4 @@
+install_data(
+ 'paywall.en.must',
+ install_dir: get_option('datadir') / 'paivana' / 'templates',
+)
diff --git a/doc/Makefile.am b/doc/Makefile.am
@@ -1,8 +0,0 @@
-# This Makefile.am is in the public domain
-AM_CPPFLAGS = -I$(top_srcdir)/src/include
-
-SUBDIRS = .
-
-man_MANS = \
- prebuilt/man/paivana-httpd.1 \
- prebuilt/man/paivana.conf.5
diff --git a/doc/meson.build b/doc/meson.build
@@ -0,0 +1,6 @@
+# This file is in the public domain
+
+install_man([
+ 'prebuilt'/'man'/'paivana-httpd.1',
+ 'prebuilt'/'man'/'paivana.conf.5',
+ ],)
diff --git a/flake.lock b/flake.lock
@@ -0,0 +1,822 @@
+{
+ "nodes": {
+ "donau": {
+ "inputs": {
+ "exchange": "exchange",
+ "gnunet": "gnunet_2",
+ "nixpkgs": "nixpkgs_4",
+ "systems": "systems_4"
+ },
+ "locked": {
+ "lastModified": 1776068074,
+ "narHash": "sha256-/UG1yoOAak34+mZ/fTB8+/FMMEaj4enPn+IxOV8R/4A=",
+ "ref": "refs/heads/master",
+ "rev": "4f609168fe263891f134eff01f86288066acdd81",
+ "revCount": 1050,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/donau"
+ },
+ "original": {
+ "rev": "4f609168fe263891f134eff01f86288066acdd81",
+ "type": "git",
+ "url": "https://git.gnunet.org/donau"
+ }
+ },
+ "donau_2": {
+ "inputs": {
+ "exchange": "exchange_3",
+ "gnunet": "gnunet_6",
+ "nixpkgs": "nixpkgs_11",
+ "systems": "systems_11"
+ },
+ "locked": {
+ "lastModified": 1776068074,
+ "narHash": "sha256-/UG1yoOAak34+mZ/fTB8+/FMMEaj4enPn+IxOV8R/4A=",
+ "ref": "refs/heads/master",
+ "rev": "4f609168fe263891f134eff01f86288066acdd81",
+ "revCount": 1050,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/donau"
+ },
+ "original": {
+ "rev": "4f609168fe263891f134eff01f86288066acdd81",
+ "type": "git",
+ "url": "https://git.gnunet.org/donau"
+ }
+ },
+ "exchange": {
+ "inputs": {
+ "gnunet": "gnunet",
+ "nixpkgs": "nixpkgs_2",
+ "systems": "systems_2"
+ },
+ "locked": {
+ "lastModified": 1776020637,
+ "narHash": "sha256-U/KHaAaE/JrlS3RYbRRiRRe0ur2JACkKysevCrzCXYY=",
+ "ref": "refs/heads/master",
+ "rev": "1b474b461597d11382e4e036520259a96f254e9b",
+ "revCount": 9931,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/exchange"
+ },
+ "original": {
+ "rev": "1b474b461597d11382e4e036520259a96f254e9b",
+ "type": "git",
+ "url": "https://git.gnunet.org/exchange"
+ }
+ },
+ "exchange_2": {
+ "inputs": {
+ "gnunet": "gnunet_3",
+ "nixpkgs": "nixpkgs_6",
+ "systems": "systems_6"
+ },
+ "locked": {
+ "lastModified": 1776021477,
+ "narHash": "sha256-V6qYPCNgaalQi6tRkDZ+Per3PPifm1Ze2pShV6LGomg=",
+ "ref": "refs/heads/master",
+ "rev": "92da4e81006404494f6443781c8f55249e723847",
+ "revCount": 9932,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/exchange"
+ },
+ "original": {
+ "rev": "92da4e81006404494f6443781c8f55249e723847",
+ "type": "git",
+ "url": "https://git.gnunet.org/exchange"
+ }
+ },
+ "exchange_3": {
+ "inputs": {
+ "gnunet": "gnunet_5",
+ "nixpkgs": "nixpkgs_9",
+ "systems": "systems_9"
+ },
+ "locked": {
+ "lastModified": 1776020637,
+ "narHash": "sha256-U/KHaAaE/JrlS3RYbRRiRRe0ur2JACkKysevCrzCXYY=",
+ "ref": "refs/heads/master",
+ "rev": "1b474b461597d11382e4e036520259a96f254e9b",
+ "revCount": 9931,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/exchange"
+ },
+ "original": {
+ "rev": "1b474b461597d11382e4e036520259a96f254e9b",
+ "type": "git",
+ "url": "https://git.gnunet.org/exchange"
+ }
+ },
+ "exchange_4": {
+ "inputs": {
+ "gnunet": "gnunet_7",
+ "nixpkgs": "nixpkgs_13",
+ "systems": "systems_13"
+ },
+ "locked": {
+ "lastModified": 1776021477,
+ "narHash": "sha256-V6qYPCNgaalQi6tRkDZ+Per3PPifm1Ze2pShV6LGomg=",
+ "ref": "refs/heads/master",
+ "rev": "92da4e81006404494f6443781c8f55249e723847",
+ "revCount": 9932,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/exchange"
+ },
+ "original": {
+ "rev": "92da4e81006404494f6443781c8f55249e723847",
+ "type": "git",
+ "url": "https://git.gnunet.org/exchange"
+ }
+ },
+ "gnunet": {
+ "inputs": {
+ "nixpkgs": "nixpkgs",
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "gnunet_2": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_3",
+ "systems": "systems_3"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "gnunet_3": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_5",
+ "systems": "systems_5"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "gnunet_4": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_7",
+ "systems": "systems_7"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "gnunet_5": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_8",
+ "systems": "systems_8"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "gnunet_6": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_10",
+ "systems": "systems_10"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "gnunet_7": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_12",
+ "systems": "systems_12"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "gnunet_8": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_14",
+ "systems": "systems_14"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "merchant": {
+ "inputs": {
+ "donau": "donau_2",
+ "exchange": "exchange_4",
+ "gnunet": "gnunet_8",
+ "nixpkgs": "nixpkgs_15",
+ "systems": "systems_15"
+ },
+ "locked": {
+ "lastModified": 1776070816,
+ "narHash": "sha256-R+a90LanaprK2S4XzUXyW5tAUXOf+pVD7ljCfvulgAM=",
+ "ref": "refs/heads/master",
+ "rev": "b174138726171601b666fff346762502be5150a1",
+ "revCount": 5567,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/merchant"
+ },
+ "original": {
+ "rev": "b174138726171601b666fff346762502be5150a1",
+ "type": "git",
+ "url": "https://git.gnunet.org/merchant"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_10": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_11": {
+ "locked": {
+ "lastModified": 1775825553,
+ "narHash": "sha256-LH0FGBWngFpvqXYfN1eks+L5n3aXy1ALTTRRhxP0HGA=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "ca62ee54d15571e3122309abb6740578906bcdf7",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_12": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_13": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_14": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_15": {
+ "locked": {
+ "lastModified": 1775730577,
+ "narHash": "sha256-5i3MKmxBFQP9/wp3QyFWyS7DqURq/M4T8gr1JSbyygI=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "0d5a853f7004a5fc57b61a97ccb02832f8e7ed9d",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_16": {
+ "locked": {
+ "lastModified": 1776360938,
+ "narHash": "sha256-Tq/T/Us82tBQIRuyuZyWR1EMVJ0EStmk/u8qQgsKlVM=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "67664cad2361605c8fce9712d9ce6a8e026d2380",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_4": {
+ "locked": {
+ "lastModified": 1775825553,
+ "narHash": "sha256-LH0FGBWngFpvqXYfN1eks+L5n3aXy1ALTTRRhxP0HGA=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "ca62ee54d15571e3122309abb6740578906bcdf7",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_5": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_6": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_7": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_8": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_9": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "root": {
+ "inputs": {
+ "donau": "donau",
+ "exchange": "exchange_2",
+ "gnunet": "gnunet_4",
+ "merchant": "merchant",
+ "nixpkgs": "nixpkgs_16",
+ "systems": "systems_16"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_10": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_11": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_12": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_13": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_14": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_15": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_16": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_2": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_3": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_4": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_5": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_6": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_7": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_8": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_9": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
@@ -0,0 +1,121 @@
+# This is a nix flake. To use it, you need nix (with flake support) installed.
+# If you do not have nix and do not intend to use it, you can ignore this file.
+# Why should you use it? Using this flake will allow you to enter a developer shell
+# which has all necessary packages for this repository already installed.
+# The shell will allow you to code against the specific revisions of the dependencies
+# pinned in this file.
+# This is useful when git HEAD of your dependencies already contains breaking changes
+# you should not (yet) code against.
+# OTOH, if you should code against a newer, not yet released revision, you can specify
+# this revision in this file.
+# You can use this file in three ways:
+# 1. Build: $ nix build
+# this will build the package (it runs make for you in an environment with the dependencies installed)
+# 2. Develop: $ nix develop
+# This will drop you inside a shell in which you can develop and compile (and test) your code.
+# It even starts and sets up the test database for you.
+# 3. Use this repository in a new project
+# Should you create a new project that depends on this project you are in luck. You can create a flake.nix
+# in your repository and include this packages as a dependency just like the dependencies of this package are
+# included here.
+
+{
+ inputs = {
+ nixpkgs.url = "nixpkgs/release-25.11";
+ systems.url = "github:nix-systems/default";
+ gnunet.url = "git+https://git.gnunet.org/gnunet?rev=7c6b613e37e301b0e81fb94af5878d00c98e5b75";
+ exchange.url = "git+https://git.gnunet.org/exchange?rev=92da4e81006404494f6443781c8f55249e723847";
+ merchant.url = "git+https://git.gnunet.org/merchant?rev=b174138726171601b666fff346762502be5150a1";
+ donau.url = "git+https://git.gnunet.org/donau?rev=4f609168fe263891f134eff01f86288066acdd81";
+ self.submodules = true;
+ };
+
+ outputs = { self, nixpkgs, gnunet, exchange, donau, merchant, systems, ... } @ inputs:
+ let
+ supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
+ forEachSystem = nixpkgs.lib.genAttrs supportedSystems;
+ nixpkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
+ in
+ {
+ # This defines (installable) package derivations
+ # For use in flakes that use this flake as input in order
+ # to specify/use this package from git as a dependency
+ packages = forEachSystem (system:
+ let
+ pkgs = nixpkgsFor.${system};
+ gnunetpkgs = gnunet.packages.${system};
+ exchangepkgs = exchange.packages.${system};
+ donaupkgs = donau.packages.${system};
+ merchantpkgs = merchant.packages.${system};
+ in {
+ paivana = pkgs.stdenv.mkDerivation {
+ name = "paivana";
+ src = ./.;
+ nativeBuildInputs = [
+ pkgs.gnumake
+ pkgs.meson
+ pkgs.ninja
+ pkgs.pkg-config
+ ];
+ buildInputs = [
+ pkgs.libtool
+ pkgs.jansson
+ pkgs.git
+ pkgs.libmicrohttpd
+ pkgs.libgcrypt
+ pkgs.libunistring
+ pkgs.curlWithGnuTls
+ gnunetpkgs.gnunet
+ exchangepkgs.exchange
+ donaupkgs.donau
+ merchantpkgs.merchant
+ ];
+ preConfigure = ''
+ patchShebangs --build contrib/check-prebuilt
+ ./bootstrap
+ '';
+ };
+ }
+ );
+ defaultPackage = forEachSystem (system: self.packages.${system}.paivana);
+ # This defines a development shell in which you can compile
+ # (and use) exchange
+ devShells = forEachSystem
+ (system:
+ let
+ pkgs = nixpkgsFor.${system};
+ gnunetpkgs = gnunet.packages.${system};
+ exchangepkgs = exchange.packages.${system};
+ donaupkgs = donau.packages.${system};
+ merchantpkgs = merchant.packages.${system};
+ in
+ {
+ default = pkgs.mkShell {
+ packages = [
+ pkgs.gcc
+ pkgs.meson
+ pkgs.ninja
+ pkgs.gnumake
+ pkgs.pkg-config
+ pkgs.libtool
+ pkgs.jansson
+ pkgs.git
+ pkgs.curlWithGnuTls
+ gnunetpkgs.gnunet
+ pkgs.codespell
+ pkgs.clang-tools
+ pkgs.uncrustify
+ exchangepkgs.exchange
+ donaupkgs.donau
+ merchantpkgs.merchant
+ ];
+
+ shellHook = ''
+ echo "paivana environment loaded."
+ export CC=gcc
+ export CFLAGS="-O"
+ '';
+ };
+ });
+ };
+}
diff --git a/meson.build b/meson.build
@@ -0,0 +1,274 @@
+project(
+ 'paivana',
+ 'c',
+ license: 'AGPLv3',
+ meson_version: '>=1.1.0',
+ version: '0.0.0',
+)
+
+cc = meson.get_compiler('c')
+incdir = include_directories('src/include')
+
+# Used to populate gnunet_private_config.h
+private_config = configuration_data()
+
+
+plugindir = get_option('libdir') / 'paivana'
+pkgdatadir = get_option('datadir') / 'paivana'
+pkgcfgdir = pkgdatadir / 'config.d'
+docdir = get_option('datadir') / 'doc' / 'paivana'
+
+if get_option('install-rpath')
+ rpath_option = get_option('prefix') / get_option('libdir')
+else
+ rpath_option = ''
+endif
+
+install_emptydir(docdir)
+install_data('README', 'COPYING', install_dir: docdir)
+
+gnunet_user = false
+dpkg_architecture_bin = find_program(
+ 'dpkg-architecture',
+ '/usr/bin/dpkg-architecture',
+ required: false,
+)
+if dpkg_architecture_bin.found()
+ private_config.set(
+ 'MULTIARCH',
+ dpkg_architecture_bin.full_path() + ' -qDEB_HOST_MULTIARCH',
+ )
+endif
+
+TALER_PLUGIN_LDFLAGS = [
+ '-export-dynamic',
+ '-avoid-version',
+ '-module',
+ '--no-undefined',
+]
+
+cdata = configuration_data()
+if not get_option('only-doc')
+ add_project_arguments(
+ '-Wall',
+ '-Wno-address-of-packed-member',
+ language: 'c',
+ )
+ taler_lib_ldflags = '-export-dynamic -no-undefined'
+
+ check_headers = ['stdint.h', 'stdlib.h', 'string.h', 'unistd.h']
+
+ foreach h : check_headers
+ if cc.check_header(h)
+ define = 'HAVE_' + h.underscorify().to_upper()
+ message(define)
+ private_config.set(define, 1)
+ endif
+ endforeach
+
+ zlib_dep = dependency('zlib', required: false)
+ if not zlib_dep.found()
+ zlib_dep = cc.find_library('zlib', required: true)
+ endif
+ m_dep = cc.find_library('m', required: false)
+ if m_dep.found()
+ private_config.set('HAVE_LIBM', 1)
+ endif
+
+
+ mhd_dep = dependency('libmicrohttpd', required: false)
+ if not mhd_dep.found()
+ mhd_dep = cc.find_library('microhttpd', required: true)
+ endif
+
+ json_dep = dependency('jansson', required: false)
+ if not json_dep.found()
+ json_dep = cc.find_library('jansson', required: true)
+ endif
+
+ gcrypt_dep = dependency('libgcrypt', required: false)
+ if not gcrypt_dep.found()
+ gcrypt_dep = cc.find_library('gcrypt', required: true)
+ endif
+
+ private_config.set_quoted('NEED_LIBGCRYPT_VERSION', '1.6.1')
+
+ gnunetutil_dep = dependency('gnunetutil', required: false)
+ if not gnunetutil_dep.found()
+ gnunetutil_dep = cc.find_library('gnunetutil', required: true)
+ endif
+
+ cc.has_header_symbol(
+ 'gnunet/gnunet_util_lib.h',
+ 'GNUNET_TIME_round_up',
+ dependencies: [gnunetutil_dep],
+ required: true,
+ )
+
+ gnunetjson_dep = dependency('gnunetjson', required: false)
+ if not gnunetjson_dep.found()
+ gnunetjson_dep = cc.find_library('gnunetjson', required: true)
+ endif
+
+ curl_dep = dependency('libcurl', version: '>=7.34.0', required: false)
+ if not curl_dep.found()
+ curl_dep = cc.find_library('curl', required: true)
+ curl_version_check = '''#include <curl/curl.h>
+ int main(int argc, char **argv) {
+ #if LIBCURL_VERSION_NUM < 0x073400
+ #error "cURL version >= 7.34.0 required"
+ #endif
+ return 0;
+ }
+ '''
+ if not cc.compiles(
+ curl_version_check,
+ name: 'cURL version check',
+ dependencies: curl_dep,
+ )
+ error('cURL version >=7.34.0 required')
+ endif
+ endif
+
+ gnunetcurl_dep = dependency('gnunetcurl', required: false)
+ if not gnunetcurl_dep.found()
+ gnunetcurl_dep = cc.find_library('gnunetcurl', required: true)
+ endif
+ cc.has_header_symbol(
+ 'gnunet/gnunet_curl_lib.h',
+ 'GNUNET_CURL_get_select_info',
+ dependencies: [gnunetcurl_dep],
+ required: true,
+ )
+
+ talerutil_dep = dependency('talerutil', required: false)
+ if not talerutil_dep.found()
+ talerutil_dep = cc.find_library('talerutil', required: true)
+ endif
+ cc.has_header_symbol(
+ 'taler/taler_util.h',
+ 'TALER_merchant_instance_auth_hash_with_salt',
+ required: true,
+ dependencies: [talerutil_dep],
+ )
+ private_config.set10('HAVE_TALERUTIL', talerutil_dep.found())
+ talertemplating_dep = dependency('talertemplating', required: false)
+ if not talertemplating_dep.found()
+ talertemplating_dep = cc.find_library('talertemplating', required: true)
+ endif
+ talermhd_dep = dependency('talermhd', required: false)
+ if not talermhd_dep.found()
+ talermhd_dep = cc.find_library('talermhd', required: true)
+ endif
+ cc.has_header_symbol(
+ 'taler/taler_mhd_lib.h',
+ 'TALER_MHD_parse_request_arg_rel_time',
+ required: true,
+ dependencies: [talermhd_dep],
+ )
+ private_config.set10('HAVE_TALERMHD', talermhd_dep.found())
+
+
+ talerexchange_dep = dependency('talerexchange', required: false)
+ if not talerexchange_dep.found()
+ talerexchange_dep = cc.find_library('talerexchange', required: true)
+ endif
+ private_config.set10('HAVE_TALEREXCHANGE', talerexchange_dep.found())
+
+ talermerchant_dep = dependency('talermerchant', required: false)
+ if not talermerchant_dep.found()
+ talermerchant_dep = cc.find_library('talermerchant', required: true)
+ endif
+ cc.has_header_symbol(
+ 'taler/taler_merchant_service.h',
+ 'TALER_MERCHANT_parse_pay_uri',
+ required: true,
+ dependencies: [talermerchant_dep],
+ )
+ private_config.set10('HAVE_TALERMERCHANT', talermerchant_dep.found())
+ talermerchanttesting_dep = dependency(
+ 'talermerchanttesting',
+ required: false,
+ )
+
+ logging_opt = get_option('logging')
+ logging_verbosity = 0
+
+ if logging_opt == 'yes'
+ logging_verbosity = 1
+ endif
+ if logging_opt == 'no'
+ add_project_arguments('-DGNUNET_CULL_LOGGING=1', language: 'c')
+ endif
+ if logging_opt == 'verbose'
+ logging_verbosity = 2
+ endif
+ if logging_opt == 'veryverbose'
+ logging_verbosity = 3
+ endif
+
+ #add_project_arguments('-DGNUNET_EXTRA_LOGGING=@0@'.format(logging_verbosity), language: 'c')
+
+
+ # todo gcov has meson builtin
+
+ # Used to populate configuration file and script templates
+
+
+ libltversions = [
+ ['libpaivana', '0:0:0'],
+ ]
+
+ solibversions = {}
+
+ foreach libversion : libltversions
+ ltversion = libversion[1].split(':')
+ current = ltversion[0].to_int()
+ revision = ltversion[1].to_int()
+ age = ltversion[2].to_int()
+ soversion_str = '@0@'.format(current - age)
+ ltversion_str = '@0@.@1@.@2@'.format(current - age, age, revision)
+ solibversions = solibversions + {
+ libversion[0]: {
+ 'soversion': soversion_str,
+ 'version': ltversion_str,
+ },
+ }
+ endforeach
+
+ private_config.set_quoted('PACKAGE', meson.project_name())
+ private_config.set_quoted('PACKAGE_VERSION', meson.project_version())
+ # Compatibility. Used in source.
+ private_config.set_quoted('VERSION', meson.project_version())
+ private_config.set_quoted('VCS_VERSION', 'mesonbuild')
+ private_config.set_quoted('PACKAGE_BUGREPORT', 'taler@gnu.org')
+ configure_file(output: 'paivana_config.h', configuration: private_config)
+ configuration_inc = include_directories('.')
+
+ cdata.merge_from(private_config)
+ add_project_arguments('-DHAVE_CONFIG_H', language: 'c')
+
+ pkg = import('pkgconfig')
+ subdir('contrib')
+ subdir('src')
+ if not get_option('disable-doc')
+ subdir('doc')
+ endif
+
+ taler_prefix = get_option('prefix') / get_option('libdir')
+
+ add_test_setup(
+ 'default',
+ env: ['PAIVANA_PREFIX=' + taler_prefix],
+ exclude_suites: ['perf', 'installcheck', 'integrationtests'],
+ is_default: true,
+ )
+else
+ subdir('contrib')
+ if not get_option('disable-doc')
+ subdir('doc')
+ endif
+endif
+
+#meson.add_dist_script('meson-dist-script')
+
diff --git a/meson.options b/meson.options
@@ -0,0 +1,5 @@
+# Build options
+option('only-doc', type : 'boolean', value : false, description: 'whether to compile documentation ONLY')
+option('disable-doc', type : 'boolean', value : false, description: 'whether to disable documentation')
+option('install-rpath', type : 'boolean', value : false, description: 'Add rpath to installed binaries if set')
+option('logging', type : 'string', value: 'yes', description: 'Log setting. Can be set to "yes" (logging, default), "no" (no logging), "verbose" (extra logging"), "veryverbose" (even more logging)')
diff --git a/src/Makefile.am b/src/Makefile.am
@@ -1,4 +0,0 @@
-# This Makefile.am is in the public domain
-AM_CPPFLAGS = -I$(top_srcdir)/src/include
-
-SUBDIRS = backend
diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am
@@ -1,34 +0,0 @@
-# This Makefile.am is in the public domain
-AM_CPPFLAGS = -I$(top_srcdir)/src/include
-
-if USE_COVERAGE
- AM_CFLAGS = --coverage -O0
- XLIB = -lgcov
-endif
-
-bin_PROGRAMS = \
- paivana-httpd
-
-paivana_httpd_SOURCES = \
- paivana-httpd.c \
- paivana-httpd_cookie.c paivana-httpd_cookie.h \
- paivana-httpd_daemon.c paivana-httpd_daemon.h \
- paivana-httpd_helper.c paivana-httpd_helper.h \
- paivana-httpd_reverse.c paivana-httpd_reverse.h \
- paivana-httpd_pay.c paivana-httpd_pay.h \
- paivana-httpd_templates.c paivana-httpd_templates.h \
- paivana_pd.c paivana_pd.h
-paivana_httpd_LDADD = \
- $(LIBGCRYPT_LIBS) \
- -ltalermerchant \
- -ltalertemplating \
- -ltalermhd \
- -ltalerutil \
- -lgnunetjson \
- -lgnunetcurl \
- -lgnunetutil \
- -lmicrohttpd \
- -lgcrypt \
- -lcurl \
- -ljansson \
- -lz
diff --git a/src/backend/meson.build b/src/backend/meson.build
@@ -0,0 +1,35 @@
+# This file is in the public domain
+
+paivana_httpd_SOURCES = [
+ 'paivana-httpd.c',
+ 'paivana-httpd_cookie.c',
+ 'paivana-httpd_daemon.c',
+ 'paivana-httpd_helper.c',
+ 'paivana-httpd_reverse.c',
+ 'paivana-httpd_pay.c',
+ 'paivana-httpd_templates.c',
+ 'paivana_pd.c',
+]
+
+executable(
+ 'paivana-httpd',
+ paivana_httpd_SOURCES,
+ dependencies: [
+ talermerchant_dep,
+ talertemplating_dep,
+ talerutil_dep,
+ gcrypt_dep,
+ talermhd_dep,
+ gnunetutil_dep,
+ gnunetjson_dep,
+ gnunetcurl_dep,
+ mhd_dep,
+ json_dep,
+ curl_dep,
+ zlib_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+)
+
+
diff --git a/src/meson.build b/src/meson.build
@@ -0,0 +1,2 @@
+# This file is in the public domain
+subdir('backend')