Browse Source

Added manpage.

develop
tastytea 3 years ago
parent
commit
fac5bd700a
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
  1. 13
      CMakeLists.txt
  2. 4
      README.md
  3. 10
      build_manpage.sh
  4. 25
      whyblocked.1.adoc

13
CMakeLists.txt

@ -47,6 +47,12 @@ add_executable(whyblocked-gui
target_link_libraries(whyblocked-gui
${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp Qt5::Widgets
${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(FILES de.tastytea.Whyblocked.desktop DESTINATION
@ -55,8 +61,13 @@ install(FILES de.tastytea.Whyblocked.appdata.xml DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
install(FILES de.tastytea.Whyblocked.svg DESTINATION
${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)
endif()

4
README.md

@ -38,6 +38,7 @@ Gentoo ebuilds are available via my
* [libconfig++](https://github.com/hyperrealm/libconfig) (tested: 1.5)
* Optional
* 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
@ -62,7 +63,8 @@ make install
cmake options:
* `-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:
* `-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

10
build_manpage.sh

@ -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

@ -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
Loading…
Cancel
Save