Skip to content

Commit

Permalink
Add doc subdirectory with Termux manpage/user documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Grimler91 committed Aug 3, 2022
1 parent 0683191 commit 75ca235
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# along with termux-tools. If not, see
# <https://www.gnu.org/licenses/>.

SUBDIRS = scripts
SUBDIRS = scripts doc

# We have two variants of our motd message:
# 1. motd.sh: is sourced and echo'es a motd message with something that looks
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ AC_SUBST(termux_android_home)
AC_SUBST(termux_package_format)
AC_SUBST(termux_package_manager)

AC_CONFIG_FILES([Makefile scripts/Makefile])
AC_CONFIG_FILES([Makefile scripts/Makefile doc/Makefile])

AC_OUTPUT
29 changes: 29 additions & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2022 Termux

# This file is part of termux-tools.

# termux-tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# termux-tools is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with termux-tools. If not, see
# <https://www.gnu.org/licenses/>.

man_MANS = termux.1

termux.1.md: ${srcdir}/termux.1.md.in
@echo "Creating termux.1.md"
@sed -e "s%[@]TERMUX_PREFIX[@]%$(termux_prefix)%g" \
-e "s%[@]TERMUX_HOME[@]%${termux_android_home}%g" \
${srcdir}/termux.1.md.in > termux.1.md

termux.1: termux.1.md
@echo "Generating termux.1"
@pandoc --standalone --to man --output termux.1 termux.1.md
File renamed without changes.
6 changes: 0 additions & 6 deletions packages/termux-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ termux_step_make_install() {

ln -sfr $TERMUX_PREFIX/bin/termux-open $TERMUX_PREFIX/bin/xdg-open

mkdir -p $TERMUX_PREFIX/share/man/man1
sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" -e "s|@TERMUX_HOME@|${TERMUX_ANDROID_HOME}|g" \
$TERMUX_PKG_BUILDER_DIR/termux.1.md.in > $TERMUX_PKG_TMPDIR/termux.1.md
pandoc --standalone --to man --output $TERMUX_PREFIX/share/man/man1/termux.1 \
$TERMUX_PKG_TMPDIR/termux.1.md

mkdir -p $TERMUX_PREFIX/etc/termux
cp -r $TERMUX_PKG_BUILDER_DIR/mirrors $TERMUX_PREFIX/etc/termux/
cd $TERMUX_PREFIX
Expand Down

0 comments on commit 75ca235

Please sign in to comment.