Commit df733717 authored by jan.koester's avatar jan.koester
Browse files

test

parent f5438aea
Loading
Loading
Loading
Loading
+77 −0
Changes for files/postgresql/CMakeLists.txt: 77 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1308,6 +1308,83 @@ target_include_directories(pgbench PRIVATE ${PG_INCLUDE_DIRS}
target_compile_definitions(pgbench PRIVATE ${CLIENT_DEFS})
target_link_libraries(pgbench PRIVATE ${CLIENT_LIBS})

# ══════════════════════════════════════════════════════════════
# Loadable modules initdb needs: every database gets plpgsql, and the text
# search dictionaries are created from dict_snowball.
# ══════════════════════════════════════════════════════════════
set(PLPGSQL_DIR "${PG_SRC}/pl/plpgsql/src")
pg_generate(BISON_EXECUTABLE pl_gram.c pl_gram.y "${PLPGSQL_DIR}" -d)
foreach(_kw reserved unreserved)
    if(NOT EXISTS "${PLPGSQL_DIR}/pl_${_kw}_kwlist_d.h")
        string(SUBSTRING "${_kw}" 0 1 _first)
        string(TOUPPER "${_first}" _first)
        string(SUBSTRING "${_kw}" 1 -1 _rest)
        execute_process(
            COMMAND ${PERL_EXECUTABLE} -I ${PG_SRC}/tools ${PG_SRC}/tools/gen_keywordlist.pl
                    --varname ${_first}${_rest}PLKeywords pl_${_kw}_kwlist.h
            WORKING_DIRECTORY ${PLPGSQL_DIR}
            RESULT_VARIABLE _kw_result)
        if(NOT _kw_result EQUAL 0)
            message(FATAL_ERROR "pl_${_kw}_kwlist_d.h generation failed")
        endif()
    endif()
endforeach()
if(NOT EXISTS "${PLPGSQL_DIR}/plerrcodes.h")
    execute_process(
        COMMAND ${PERL_EXECUTABLE} generate-plerrcodes.pl ${PG_SRC}/backend/utils/errcodes.txt
        WORKING_DIRECTORY ${PLPGSQL_DIR}
        OUTPUT_FILE ${PLPGSQL_DIR}/plerrcodes.h
        RESULT_VARIABLE _pl_result)
    if(NOT _pl_result EQUAL 0)
        message(FATAL_ERROR "plerrcodes.h generation failed")
    endif()
endif()

add_library(plpgsql MODULE
    ${PLPGSQL_DIR}/pl_comp.c ${PLPGSQL_DIR}/pl_exec.c ${PLPGSQL_DIR}/pl_funcs.c
    ${PLPGSQL_DIR}/pl_gram.c ${PLPGSQL_DIR}/pl_handler.c ${PLPGSQL_DIR}/pl_scanner.c)
target_include_directories(plpgsql PRIVATE ${PG_INCLUDE_DIRS} ${PLPGSQL_DIR})
set_target_properties(plpgsql PROPERTIES PREFIX "")
add_dependencies(plpgsql postgres)

file(GLOB STEMMER_SRCS "${PG_SRC}/backend/snowball/libstemmer/*.c")
add_library(dict_snowball MODULE ${PG_SRC}/backend/snowball/dict_snowball.c ${STEMMER_SRCS})
target_include_directories(dict_snowball PRIVATE ${PG_INCLUDE_DIRS}
    ${PG_SRC}/include/snowball ${PG_SRC}/include/snowball/libstemmer)
set_target_properties(dict_snowball PROPERTIES PREFIX "")
add_dependencies(dict_snowball postgres)

execute_process(
    COMMAND ${PERL_EXECUTABLE} snowball_create.pl --input . --outdir ${CMAKE_CURRENT_BINARY_DIR}
    WORKING_DIRECTORY ${PG_SRC}/backend/snowball
    RESULT_VARIABLE _sb_result)
if(NOT _sb_result EQUAL 0)
    message(FATAL_ERROR "snowball_create.sql generation failed")
endif()

install(TARGETS plpgsql dict_snowball LIBRARY DESTINATION lib/postgresql)

# What initdb reads, and the configuration templates
install(FILES
    ${PG_SRC}/include/catalog/postgres.bki
    ${PG_SRC}/include/catalog/system_constraints.sql
    ${PG_SRC}/backend/catalog/system_functions.sql
    ${PG_SRC}/backend/catalog/system_views.sql
    ${PG_SRC}/backend/catalog/information_schema.sql
    ${PG_SRC}/backend/catalog/sql_features.txt
    ${PG_SRC}/backend/utils/misc/postgresql.conf.sample
    ${PG_SRC}/backend/libpq/pg_hba.conf.sample
    ${PG_SRC}/backend/libpq/pg_ident.conf.sample
    ${PG_SRC}/backend/utils/errcodes.txt
    ${CMAKE_CURRENT_BINARY_DIR}/snowball_create.sql
    DESTINATION share/postgresql)
install(FILES ${PLPGSQL_DIR}/plpgsql.control ${PLPGSQL_DIR}/plpgsql--1.0.sql
    DESTINATION share/postgresql/extension)
install(DIRECTORY ${PG_SRC}/backend/snowball/stopwords/ DESTINATION share/postgresql/tsearch_data
    FILES_MATCHING PATTERN "*.stop")
install(DIRECTORY ${PG_SRC}/timezone/tznames/ DESTINATION share/postgresql/timezonesets
    FILES_MATCHING PATTERN "*" PATTERN "*.txt" EXCLUDE)

# ══════════════════════════════════════════════════════════════
# Install
# ══════════════════════════════════════════════════════════════
+1 −1
Changes for files/rpm/specs/fresh.spec: 1 added line, 1 removed line.
Original line number Diff line number Diff line
Name:           fresh
Version:        1.1.2
Release:        26%{?dist}
Release:        35%{?dist}
Summary:        fresh — FenrirOS console (musl-native sh replacement)
License:        BSD-3-Clause
URL:            https://git.tuxist.de/git/jan.koester/fresh
+2 −1
Changes for files/rpm/specs/postgresql.spec: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
Name:           postgresql
Version:        17.10
Release:        1%{?dist}
Release:        2%{?dist}
Summary:        PostgreSQL database server
License:        PostgreSQL
URL:            https://www.postgresql.org
@@ -71,6 +71,7 @@ DESTDIR=%{buildroot} cmake --install build
%{_bindir}/pg_checksums
%{_bindir}/pg_resetwal
%{_datadir}/postgresql/
%{_libdir}/postgresql/

%files client
%{_bindir}/psql
+1 −1
Changes for files/rpm/specs/systempp.spec: 1 added line, 1 removed line.
Original line number Diff line number Diff line
Name:           systempp
Version:        1.2.1
Release:        17%{?dist}
Release:        18%{?dist}
Summary:        systempp — from-scratch libc + C++ stdlib/ABI (musl+libc++ replacement)
License:        BSD-3-Clause
URL:            https://git.tuxist.de/git/jan.koester/systempp.git