Added manpage.

develop
tastytea 2019-01-20 23:31:58 +01:00
parent 3ed5d3ce0d
commit fac5bd700a
No known key found for this signature in database
GPG Key ID: CFC39497F1B26E07
4 changed files with 50 additions and 2 deletions

View File

@ -47,6 +47,12 @@ add_executable(whyblocked-gui
target_link_libraries(whyblocked-gui target_link_libraries(whyblocked-gui
${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp Qt5::Widgets ${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp Qt5::Widgets
${LIBCONFIG_LIBRARIES} stdc++fs) ${LIBCONFIG_LIBRARIES} stdc++fs)
set(WITH_MAN "YES")
if(WITH_MAN)
add_custom_command(TARGET whyblocked-gui POST_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/build_manpage.sh
ARGS ${CMAKE_VERSION})
endif()
install(TARGETS whyblocked-gui DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS whyblocked-gui DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES de.tastytea.Whyblocked.desktop DESTINATION install(FILES de.tastytea.Whyblocked.desktop DESTINATION
@ -55,8 +61,13 @@ install(FILES de.tastytea.Whyblocked.appdata.xml DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/metainfo) ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
install(FILES de.tastytea.Whyblocked.svg DESTINATION install(FILES de.tastytea.Whyblocked.svg DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps) ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
if(WITH_MAN)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/whyblocked.1 DESTINATION
${CMAKE_INSTALL_MANDIR}/man1)
endif()
if(NOT WITHOUT_TRANSLATIONS) set(WITH_TRANSLATIONS, "YES")
if(WITH_TRANSLATIONS)
add_subdirectory(translations) add_subdirectory(translations)
endif() endif()

View File

@ -38,6 +38,7 @@ Gentoo ebuilds are available via my
* [libconfig++](https://github.com/hyperrealm/libconfig) (tested: 1.5) * [libconfig++](https://github.com/hyperrealm/libconfig) (tested: 1.5)
* Optional * Optional
* Translations: [lupdate & lrelease](http://doc.qt.io/qt-5/linguist-manager.html) (tested: 5.11/5.5) * Translations: [lupdate & lrelease](http://doc.qt.io/qt-5/linguist-manager.html) (tested: 5.11/5.5)
* Manpage: [asciidoc](http://asciidoc.org/) (tested: 8.6)
#### Get sourcecode #### Get sourcecode
@ -62,7 +63,8 @@ make install
cmake options: cmake options:
* `-DCMAKE_BUILD_TYPE=Debug` for a debug build * `-DCMAKE_BUILD_TYPE=Debug` for a debug build
* `-DWITHOUT_TRANSLATIONS=YES` to not compile translations * `-DWITH_TRANSLATIONS=NO` to not compile translations
* `-DWITH_MAN=NO` to not compile the manpage
* One of: * One of:
* `-DWITH_DEB=YES` if you want to be able to generate a deb-package * `-DWITH_DEB=YES` if you want to be able to generate a deb-package
* `-DWITH_RPM=YES` if you want to be able to generate an rpm-package * `-DWITH_RPM=YES` if you want to be able to generate an rpm-package

10
build_manpage.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
if [[ -n "${1}" ]]; then
dir="$(dirname ${0})"
cp -vf ${dir}/whyblocked.1.adoc .
sed -Ei "s/(Revision: +)[0-9]+\.[0-9]\.[0-9]/\1${1}/" whyblocked.1.adoc
a2x --doctype manpage --format manpage --no-xmllint whyblocked.1.adoc
else
echo "usage: ${0} VERSION" >&2
fi

25
whyblocked.1.adoc Normal file
View File

@ -0,0 +1,25 @@
= whyblocked(1)
:Author: tastytea
:Email: tasttytea@tastytea.de
:Date: 2019-01-20
:Revision: 0.0.0
:man source: Whyblocked
:man version: {revision}
:man manual: General Commands Manual
== NAME
whyblocked - reminds you why you blocked someone.
== SYNOPSIS
*whyblocked*
== DESCRIPTION
Whyblocked allows you to store the reason why you blocked someone, along with
"receipts", URLs to the posts that led you to block them.
== REPORTING BUGS
Bugtracker: https://schlomp.space/tastytea/whyblocked/issues