diff options
author | Anonymous | 2021-04-04 11:12:49 +0900 |
---|---|---|
committer | jloqfjgk | 2021-04-04 11:15:15 +0900 |
commit | f624c61eafab1c30b97af7f9ce3b89088df8a574 (patch) | |
tree | d5a026948b42afd01172f83ed3a22e714ca75a89 | |
parent | a645c8fd73c065fee45b89287b5f615e5cf219c3 (diff) | |
download | aur-f624c61eafab1c30b97af7f9ce3b89088df8a574.tar.gz |
Use asciidoc for manpages
icemon.install is probably not needed - pacman hooks will update the icon
cache.
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | fix-worder-warning.patch | 37 | ||||
-rw-r--r-- | icemon.install | 13 | ||||
-rw-r--r-- | use-asciidoc-for-manpages.patch | 329 |
5 files changed, 393 insertions, 35 deletions
@@ -1,21 +1,24 @@ pkgbase = icemon - pkgdesc = Icecream GUI monitor. + pkgdesc = Icecream GUI monitor pkgver = 3.3 pkgrel = 1 url = https://github.com/icecc/icemon - install = icemon.install arch = x86_64 license = GPL makedepends = cmake - makedepends = docbook2x makedepends = extra-cmake-modules - depends = icecream>=1.3 - depends = qt5-base>=5.2 + makedepends = asciidoc + depends = icecream + depends = qt5-base depends = hicolor-icon-theme provides = icemon conflicts = icemon-git source = https://github.com/icecc/icemon/archive/v3.3.tar.gz + source = fix-worder-warning.patch + source = use-asciidoc-for-manpages.patch sha256sums = 3caf14731313c99967f6e4e11ff261b061e4e3d0c7ef7565e89b12e0307814ca + sha256sums = 67909a75420f0c011767be221d55873d71e85803c55c6abd870013fd8287d10c + sha256sums = 8d131b5677b607da2b61dc4687e10b160b1963bffa45f61653942c98afffab36 pkgname = icemon @@ -3,31 +3,33 @@ pkgname='icemon' pkgver=3.3 pkgrel=1 -pkgdesc='Icecream GUI monitor.' +pkgdesc='Icecream GUI monitor' url='https://github.com/icecc/icemon' license=('GPL') -depends=('icecream>=1.3' 'qt5-base>=5.2' 'hicolor-icon-theme') -# docbook2x required for man page generation -makedepends=('cmake' 'docbook2x' 'extra-cmake-modules') +depends=('icecream' 'qt5-base' 'hicolor-icon-theme') +makedepends=('cmake' 'extra-cmake-modules' 'asciidoc') provides=('icemon') conflicts=('icemon-git') arch=('x86_64') -install=icemon.install -source=("https://github.com/icecc/${pkgname}/archive/v${pkgver}.tar.gz") -sha256sums=('3caf14731313c99967f6e4e11ff261b061e4e3d0c7ef7565e89b12e0307814ca') +source=("https://github.com/icecc/${pkgname}/archive/v${pkgver}.tar.gz" + "fix-worder-warning.patch" + "use-asciidoc-for-manpages.patch") +sha256sums=('3caf14731313c99967f6e4e11ff261b061e4e3d0c7ef7565e89b12e0307814ca' + '67909a75420f0c011767be221d55873d71e85803c55c6abd870013fd8287d10c' + '8d131b5677b607da2b61dc4687e10b160b1963bffa45f61653942c98afffab36') -build() { - mkdir -p build - cd build +prepare() { + cd ${pkgname}-${pkgver} + patch -p1 -i ../fix-worder-warning.patch + patch -p1 -i ../use-asciidoc-for-manpages.patch +} - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -D_docbook_to_man_executable=/usr/bin/docbook2man \ - "../${pkgname}-${pkgver}" - make +build() { + cmake -B build -S ${pkgname}-${pkgver} \ + -DCMAKE_INSTALL_PREFIX='/usr' + make -C build } package() { - cd build - - make DESTDIR="${pkgdir}" install + make -C build DESTDIR="${pkgdir}" install } diff --git a/fix-worder-warning.patch b/fix-worder-warning.patch new file mode 100644 index 000000000000..7f7861a37f33 --- /dev/null +++ b/fix-worder-warning.patch @@ -0,0 +1,37 @@ +From f936e9d93ea71c83fbba41b3612f3408ae22b21a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@centrum.cz> +Date: Thu, 12 Sep 2019 16:44:18 +0200 +Subject: [PATCH] fix a -Wreorder warning + +--- + CMakeLists.txt | 2 +- + src/monitor.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ff033d8..10c2b82 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -67,7 +67,7 @@ endif() + if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + check_cxx_compiler_flag(-Wunused-but-set-variable HAVE_GCC_UNUSED_BUT_SET) + check_cxx_compiler_flag(-Wlogical-op HAVE_GCC_LOGICAL_OP) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wextra -Woverloaded-virtual -Winit-self -Wmissing-include-dirs -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wcast-qual -Wcast-align -Wmissing-noreturn -Werror=return-type -pedantic") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wall -Wextra -Woverloaded-virtual -Winit-self -Wmissing-include-dirs -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wcast-qual -Wcast-align -Wmissing-noreturn -Werror=return-type -pedantic") + if(HAVE_GCC_UNUSED_BUT_SET) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-but-set-variable") + endif() +diff --git a/src/monitor.cc b/src/monitor.cc +index 8c0b371..8b78c0d 100644 +--- a/src/monitor.cc ++++ b/src/monitor.cc +@@ -25,8 +25,8 @@ + Monitor::Monitor(HostInfoManager *manager, QObject *parent) + : QObject(parent) + , m_hostInfoManager(manager) +- , m_schedulerState(Offline) + , m_currentSchedport(0) ++ , m_schedulerState(Offline) + { + } + diff --git a/icemon.install b/icemon.install deleted file mode 100644 index f30d282c7b54..000000000000 --- a/icemon.install +++ /dev/null @@ -1,13 +0,0 @@ -post_install() { - xdg-icon-resource forceupdate --theme hicolor &> /dev/null - update-desktop-database -q -} - -post_upgrade() { - post_install -} - -post_remove() { - xdg-icon-resource forceupdate --theme hicolor &> /dev/null - update-desktop-database -q -} diff --git a/use-asciidoc-for-manpages.patch b/use-asciidoc-for-manpages.patch new file mode 100644 index 000000000000..e988d252bb51 --- /dev/null +++ b/use-asciidoc-for-manpages.patch @@ -0,0 +1,329 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 10c2b82..6be47d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,28 +37,6 @@ set_package_properties(Icecream PROPERTIES + URL "http://en.opensuse.org/Icecream" + TYPE REQUIRED + ) +-find_package(Docbook2X) +-set_package_properties(Docbook2X PROPERTIES +- DESCRIPTION "docbook2X converts DocBook documents into the traditional Unix man page format" +- PURPOSE "Required for man-page generation" +- URL "http://docbook2x.sourceforge.net/" +-) +- +-# add a target to generate API documentation with Doxygen +-find_package(Doxygen) +-set_package_properties(Doxygen PROPERTIES +- TYPE OPTIONAL +- DESCRIPTION "Doxygen documentation generator" +- PURPOSE "Needed for generating API documentation (make doc)" +-) +-if(DOXYGEN_FOUND) +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) +- add_custom_target(doc +- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +- COMMENT "Generating API documentation with Doxygen" VERBATIM +- ) +-endif() + + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +diff --git a/cmake/modules/FindDocbook2X.cmake b/cmake/modules/FindDocbook2X.cmake +deleted file mode 100644 +index 81d9f7a..0000000 +--- a/cmake/modules/FindDocbook2X.cmake ++++ /dev/null +@@ -1,97 +0,0 @@ +-# Attempt to find docbook-to-man binary from docbook2x package +-# +-# This module defines: +-# - DOCBOOK_TO_MAN_EXECUTABLE, path to docbook2x-man binary +-# +-# Note that the binary docbook-to-man in debian systems is a different application +-# than in other distributions. +-# +-# Debian systems +-# * docbook-to-man comes from the package docbook-to-man +-# * docbook2man comes from the package docbook-utils +-# * docbook2x-man comes from the package docbook2x +-# Suse +-# * docbook-to-man comes from the package docbook2x +-# * docbook2man comes from the package docbook-utils-minimal +-# ArchLinux +-# * docbook-to-man comes from the package docbook-to-man +-# * docbook2man comes from the package docbook2x +-# +-# We actually want the binary from docbook2x, which supports XML +- +-#============================================================================= +-# Copyright 2013 Kevin Funk <kfunk@kde.org> +-# Copyright 2015 Alex Merry <alexmerry@kde.org> +-# +-# Distributed under the OSI-approved BSD License (the "License"); +-# see accompanying file Copyright.txt for details. +-# +-# This software is distributed WITHOUT ANY WARRANTY; without even the +-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +-# See the License for more information. +-#============================================================================= +- +-macro(_check_docbook2x_executable) +- if (DOCBOOK_TO_MAN_EXECUTABLE) +- execute_process( +- COMMAND ${DOCBOOK_TO_MAN_EXECUTABLE} --version +- OUTPUT_VARIABLE _output +- ERROR_QUIET +- ) +- if("${_output}" MATCHES "docbook2X ([0-9]+\\.[0-9]+\\.[0-9]+)") +- set(DOCBOOK_TO_MAN_EXECUTABLE ${_docbook_to_man_executable}) +- set(Docbook2X_VERSION ${CMAKE_MATCH_1}) +- else() +- unset(DOCBOOK_TO_MAN_EXECUTABLE) +- unset(DOCBOOK_TO_MAN_EXECUTABLE CACHE) +- endif() +- endif() +-endmacro() +- +-if (DOCBOOK_TO_MAN_EXECUTABLE) +- _check_docbook2x_executable() +-else() +- foreach(test_exec docbook2x-man docbook-to-man db2x_docbook2man docbook2man) +- find_program(DOCBOOK_TO_MAN_EXECUTABLE +- NAMES ${test_exec} +- ) +- _check_docbook2x_executable() +- if (DOCBOOK_TO_MAN_EXECUTABLE) +- break() +- endif() +- endforeach() +-endif() +- +-include(FindPackageHandleStandardArgs) +- +-find_package_handle_standard_args(Docbook2X +-# TODO: Use FOUND_VAR when requiring CMake 2.8.11 +-# FOUND_VAR Docbook2X_FOUND +- REQUIRED_VARS DOCBOOK_TO_MAN_EXECUTABLE +- VERSION_VAR Docbook2X_VERSION +-) +-set(Docbook2X_FOUND DOCBOOK2X_FOUND) +- +-if (Docbook2X_FOUND) +- macro(install_docbook_man_page name section) +- set(inputfn "man-${name}.${section}.xml") +- set(input "${CMAKE_CURRENT_SOURCE_DIR}/${inputfn}") +- set(outputfn "${name}.${section}") +- set(output "${CMAKE_CURRENT_BINARY_DIR}/${outputfn}") +- set(target "manpage-${outputfn}") +- +- add_custom_command( +- OUTPUT ${output} +- COMMAND ${DOCBOOK_TO_MAN_EXECUTABLE} ${input} +- DEPENDS ${input} +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +- ) +- add_custom_target(${target} ALL +- DEPENDS "${output}" +- ) +- install( +- FILES ${output} +- DESTINATION ${CMAKE_INSTALL_MANDIR}/man${section} +- ) +- endmacro() +-endif() +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index 4e83c15..8138dfe 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -1,6 +1,27 @@ + # It's not possible to install the docbook right now (Qt-only project) + #add_subdirectory(icemon) + +-if(DOCBOOK_TO_MAN_EXECUTABLE) +- install_docbook_man_page(icemon 1) ++find_program(ASCIIDOC asciidoc) ++find_program(A2X a2x) ++ ++if(NOT ASCIIDOC OR NOT A2X) ++ message(WARNING "Could not find asciidoc or a2x, manual page will not be generated.") ++else() ++ add_custom_target(manpage ALL) ++ add_custom_command( ++ TARGET manpage ++ COMMAND ${ASCIIDOC} -a revnumber=${PROJECT_VERSION} -d manpage -b docbook ++ -o ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml ${CMAKE_CURRENT_SOURCE_DIR}/icemon.adoc ++ MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/icemon.adoc ++ BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml) ++ add_custom_command( ++ TARGET manpage ++ COMMAND ${A2X} --doctype manpage --format manpage ++ ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ++ MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml ++ BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/icemon.1) ++ install( ++ FILES ${CMAKE_CURRENT_BINARY_DIR}/icemon.1 ++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) + endif() +diff --git a/doc/icemon.adoc b/doc/icemon.adoc +new file mode 100644 +index 0000000..7a23389 +--- /dev/null ++++ b/doc/icemon.adoc +@@ -0,0 +1,54 @@ ++ICEMON(1) ++========= ++:doctype: manpage ++:man source: icemon ++:man version: {revnumber} ++:man manual: Icemon User's Manual ++ ++ ++Name ++---- ++icemon - Icecream network monitor ++ ++ ++Synopsis ++-------- ++*icemon* _OPTION_ ++ ++ ++Description ++----------- ++Icemon is a graphical application to view an Icecream compile network and monitor its traffic. ++ ++ ++ ++Options ++------- ++ ++*-h, --help*:: ++ Print help message and exit. ++ ++*-n, --netname* _net-name_:: ++ The name of the Icecream network `icemon` should connect to. ++ ++*-s, --scheduler* _host-name_:: ++ The hostname of the Icecream scheduler `icemon` should connect to. ++ ++ ++ ++See Also ++-------- ++ifdef::env-github[] ++link:https://github.com/icecc/icecream/tree/master/doc/icecream.adoc[icecream(7)] ++link:https://github.com/icecc/icecream/tree/master/doc/icecc-scheduler.adoc[icecc-scheduler(1)] ++link:https://github.com/icecc/icecream/tree/master/doc/iceccd.adoc[iceccd(1)] ++endif::[] ++ ++ifndef::env-github[] ++icecream(7), icecc-scheduler(1), iceccd(1) ++endif::[] ++ ++ ++Website ++------- ++Project home: https://github.com/icecc/icemon +diff --git a/doc/man-icemon.1.xml b/doc/man-icemon.1.xml +deleted file mode 100644 +index 66cb6d8..0000000 +--- a/doc/man-icemon.1.xml ++++ /dev/null +@@ -1,93 +0,0 @@ +-<?xml version="1.0" ?> +-<!-- vim:set ts=4 noet syntax=xml: --> +-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" +-[ +- <!ENTITY icemon "<application>icemon</application>"> +-]> +- +-<refentry id="icemon"> +- +-<refentryinfo> +- <title>Icecream User's Manual</title> +- <author> +- <personname> +- <firstname>Pino</firstname> +- <surname>Toscano</surname> +- </personname> +- </author> +- <date>June 12th, 2013</date> +- <productname>Icecream</productname> +-</refentryinfo> +- +-<refmeta> +- <refentrytitle>icemon</refentrytitle> +- <manvolnum>1</manvolnum> +-</refmeta> +- +-<refnamediv> +- <refname>icemon</refname> +- <refpurpose>Icecream network monitor</refpurpose> +-</refnamediv> +- +-<refsynopsisdiv> +-<cmdsynopsis> +-<command>icemon</command> +-<arg><replaceable>OPTION</replaceable></arg> +-</cmdsynopsis> +-</refsynopsisdiv> +- +-<refsect1> +-<title>Description</title> +-<para>&icemon; is a graphical application to view an Icecream compile +-network and monitor its traffic.</para> +-</refsect1> +- +-<refsect1> +-<title>Options</title> +- +-<variablelist> +- +-<varlistentry> +-<term><option>-h</option>, <option>--help</option></term> +-<listitem><para>Print help message and exit.</para></listitem> +-</varlistentry> +- +-<varlistentry> +-<term><option>-n</option>, <option>--netname</option> +-<parameter>net-name</parameter></term> +-<listitem><para>The name of the Icecream network &icemon; should connect to. +-</para></listitem> +-</varlistentry> +- +- +-<varlistentry> +-<term><option>-s</option>, <option>--scheduler</option> +-<parameter>host-name</parameter></term> +-<listitem><para>The hostname of the Icecream scheduler &icemon; should connect to. +-</para></listitem> +-</varlistentry> +- +-</variablelist> +- +-</refsect1> +- +- +-<refsect1> +-<title>See Also</title> +-<para>icecream(7), icecc-scheduler(1), iceccd(1)</para> +-</refsect1> +- +-<refsect1> +-<title>Maintainers</title> +-<simplelist> +-<member>Daniel Molkentin <molkentin@kde.org></member> +-<member>Kevin Funk <kfunk@kde.org></member> +-</simplelist> +-</refsect1> +- +-<refsect1> +-<title>Website</title> +-<para>Project home: https://github.com/icecc/icemon</para> +-</refsect1> +- +-</refentry> |