diff options
author | aqua <aqua@iserlohn-fortress.net> | 2024-04-28 11:24:25 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2024-04-28 11:42:59 +0300 |
commit | 7eac672fad518a6df34d1514390ecb54875a624d (patch) | |
tree | 1fec58d0747fc07e4429ec157f43d0ab45029e66 | |
parent | Added compiler warnings for poi (diff) | |
download | smolbote-7eac672fad518a6df34d1514390ecb54875a624d.tar.xz |
Readded manpages
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | CppCheckSuppressions.txt | 3 | ||||
-rw-r--r-- | doc/CMakeLists.txt | 38 | ||||
-rw-r--r-- | doc/building.md | 40 | ||||
-rwxr-xr-x | doc/man/genroff.sh | 2 | ||||
-rw-r--r-- | doc/meson.build | 16 | ||||
-rw-r--r-- | linux/makepkg/PKGBUILD | 4 |
7 files changed, 57 insertions, 50 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 30cc928..d83676c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") include(CppCheck) include(CompilerOptions) include(FeatureSummary) +include(GNUInstallDirs) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -50,7 +51,8 @@ add_subdirectory(src/about) add_subdirectory(src/webengine) add_subdirectory(src) -include(GNUInstallDirs) +add_subdirectory(doc) + install(TARGETS poi DESTINATION ${CMAKE_INSTALL_BINDIR}) feature_summary(WHAT ALL) diff --git a/CppCheckSuppressions.txt b/CppCheckSuppressions.txt new file mode 100644 index 0000000..6ed9d86 --- /dev/null +++ b/CppCheckSuppressions.txt @@ -0,0 +1,3 @@ +// for all files +missingIncludeSystem +unknownMacro diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..0f33bcc --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,38 @@ +option(INSTALL_MANPAGES "Install manpages") + +add_custom_command( + OUTPUT smolbote.1 + COMMAND ${CMAKE_CURRENT_LIST_DIR}/man/genroff.sh ${CMAKE_CURRENT_LIST_DIR}/man/smolbote.1.scd smolbote.1 + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/man/smolbote.1.scd + USES_TERMINAL +) + +add_custom_command( + OUTPUT smolboterc.5 + COMMAND ${CMAKE_CURRENT_LIST_DIR}/man/genroff.sh ${CMAKE_CURRENT_LIST_DIR}/man/smolboterc.5.scd smolboterc.5 + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/man/smolboterc.5.scd + USES_TERMINAL +) + +add_custom_command( + OUTPUT smolbote-profile.5 + COMMAND ${CMAKE_CURRENT_LIST_DIR}/man/genroff.sh ${CMAKE_CURRENT_LIST_DIR}/man/smolbote-profile.5.scd smolbote-profile.5 + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/man/smolbote-profile.5.scd + USES_TERMINAL +) + +add_custom_target(manpages DEPENDS + smolbote.1 + smolboterc.5 + smolbote-profile.5 +) + +if(${INSTALL_MANPAGES}) +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/smolbote.1 + ${CMAKE_CURRENT_BINARY_DIR}/smolboterc.5 + ${CMAKE_CURRENT_BINARY_DIR}/smolbote-profile.5 + TYPE MAN +) +endif() diff --git a/doc/building.md b/doc/building.md index 9ea9344..a7feab1 100644 --- a/doc/building.md +++ b/doc/building.md @@ -1,11 +1,12 @@ ## Building from source ### Dependencies -- [Qt](https://www.qt.io/) -- [meson](https://mesonbuild.com/) 0.52.0 or later +- [Qt](https://www.qt.io/) 6 +- [cmake](https://cmake.org/) 3.16 or later - [kconfiglib](https://github.com/ulfalizer/Kconfiglib/) - A compiler with C++17 support -- spdlog: if not found can be downloaded by meson +- spdlog +- SingleApplication ### Optional dependencies - openssl or libressl: for signing plugins @@ -13,45 +14,22 @@ - gtest ### Steps -``` +```sh # clone the repository -git clone https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git smolbote.git -cd smolbote.git +git clone https://neueland.iserlohn-fortress.net/cgit/smolbote.git +cd smolbote # Get the submodules git submodule init git submodule update # configure -mkdir build -meson build +cmake -S . -B cmake-build # make -ninja -``` - -## Using meson - -### Listing build options -``` -build% meson configure -``` - -### Changing build options -``` -build% meson configure -D<option-name>=<enabled|disabled> -``` - -### Prevent meson from downloading wraps -During configure, meson can download missing dependencies on its own using -wraps. To disable this, pass '--wrap-mode=nodownload' during the configure -phase: -``` -repo% meson --wrap-mode=nodownload build-path +cmake --build cmake-build ``` -For more information on how to use meson, see the meson [quick quide](https://mesonbuild.com/Quick-guide.html). - ## Configuring builds smolbote uses Kconfig to store and customize features and default settings such as keyboard shortcuts and paths. You can edit these settings using `menuconfig` diff --git a/doc/man/genroff.sh b/doc/man/genroff.sh index 1d513f4..d1c74a1 100755 --- a/doc/man/genroff.sh +++ b/doc/man/genroff.sh @@ -1,4 +1,4 @@ #/usr/bin/env sh -scdoc < $1 +scdoc < $1 > $2 diff --git a/doc/meson.build b/doc/meson.build deleted file mode 100644 index 6490969..0000000 --- a/doc/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -if not get_option('manpage') - subdir_done() -endif - -sh = find_program('sh', required: true, native: true, disabler: true) - -foreach f : [ 'smolbote.1', 'smolboterc.5', 'smolbote-profile.5' ] -manpage = custom_target(f, - input: 'man'/f+'.scd', - output: '@BASENAME@', - capture: true, - command: [ sh, meson.current_source_dir()/'man/genroff.sh', '@INPUT@' ], - install: true, - install_dir: get_option('mandir') -) -endforeach diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD index 9981f46..749da87 100644 --- a/linux/makepkg/PKGBUILD +++ b/linux/makepkg/PKGBUILD @@ -37,7 +37,8 @@ prepare() { cmake -S $srcdir/smolbote -B $srcdir/build \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_MANPAGES=ON } pkgver() { @@ -48,6 +49,7 @@ pkgver() { build() { cmake --build $srcdir/build -- ${MAKEFLAGS} + cmake --build $srcdir/build --target manpages -- ${MAKEFLAGS} } check() { |