[Python-apps-commits] r14560 - in packages/tldr-py/trunk/debian (8 files)
onovy at users.alioth.debian.org
onovy at users.alioth.debian.org
Fri Jan 5 16:28:57 UTC 2018
Date: Friday, January 5, 2018 @ 16:28:56
Author: onovy
Revision: 14560
Use update-alternatives for /usr/bin/tldr to prevent collision (Closes: #885793)
Added:
packages/tldr-py/trunk/debian/tldr-py.1
packages/tldr-py/trunk/debian/tldr-py.postinst
packages/tldr-py/trunk/debian/tldr-py.prerm
Modified:
packages/tldr-py/trunk/debian/changelog
packages/tldr-py/trunk/debian/rules
packages/tldr-py/trunk/debian/tests/help
packages/tldr-py/trunk/debian/tldr-py.manpages
Deleted:
packages/tldr-py/trunk/debian/tldr.1
Modified: packages/tldr-py/trunk/debian/changelog
===================================================================
--- packages/tldr-py/trunk/debian/changelog 2018-01-05 16:27:55 UTC (rev 14559)
+++ packages/tldr-py/trunk/debian/changelog 2018-01-05 16:28:56 UTC (rev 14560)
@@ -2,6 +2,7 @@
* Bump debhelper compat level to 11
* Bump Standards-Version to 4.1.3 (no changes needed)
+ * Use update-alternatives for /usr/bin/tldr to prevent collision (Closes: #885793)
-- OndÅej Nový <onovy at debian.org> Fri, 05 Jan 2018 17:21:24 +0100
Modified: packages/tldr-py/trunk/debian/rules
===================================================================
--- packages/tldr-py/trunk/debian/rules 2018-01-05 16:27:55 UTC (rev 14559)
+++ packages/tldr-py/trunk/debian/rules 2018-01-05 16:28:56 UTC (rev 14560)
@@ -6,3 +6,8 @@
%:
dh $@ --with python3 --buildsystem=pybuild
+
+override_dh_install:
+ dh_install
+
+ mv debian/tldr-py/usr/bin/tldr debian/tldr-py/usr/bin/tldr-py
Modified: packages/tldr-py/trunk/debian/tests/help
===================================================================
--- packages/tldr-py/trunk/debian/tests/help 2018-01-05 16:27:55 UTC (rev 14559)
+++ packages/tldr-py/trunk/debian/tests/help 2018-01-05 16:28:56 UTC (rev 14560)
@@ -3,4 +3,4 @@
set -e
cd "$ADTTMP"
-tldr --help | grep 'Show this message and exit.'
+tldr-py --help | grep 'Show this message and exit.'
Added: packages/tldr-py/trunk/debian/tldr-py.1
===================================================================
--- packages/tldr-py/trunk/debian/tldr-py.1 (rev 0)
+++ packages/tldr-py/trunk/debian/tldr-py.1 2018-01-05 16:28:56 UTC (rev 14560)
@@ -0,0 +1,53 @@
+.TH TLDR "1" "November 2017" "Python client for tldr"
+
+.SH NAME
+tldr \- Python client for tldr
+
+.SH SYNOPSIS
+.B tldr
+\fR[\fIOPTIONS\fR] \fICOMMAND\fR \fR[\fIARGS\fR]...
+
+.SH DESCRIPTION
+.PP
+Yet another Python client for tldr. tldr is a collection of simplified and
+community-driven man pages.
+
+.SH OPTIONS
+.TP
+\fB\-V\fR, \fB\-\-version\fR
+Show the version and exit.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show the help and exit.
+
+.SH COMMANDS
+.TP
+\fBfind\fR
+Find the command usage.
+.TP
+\fBinit\fR
+Init config file.
+.TP
+\fBreindex\fR
+Rebuild the index.
+.TP
+\fBupdate\fR
+Update to the latest pages.
+
+.SH EXAMPLES
+.nf
+.PP
+.B Download tldr pages and init config
+$ git clone git at github.com:tldr-pages/tldr.git ~/.tldr
+$ tldr init
+Input the tldr repo path(absolute path): /home/<user>/.tldr
+Input your platform(linux, osx or sunos): linux
+$ tldr reindex
+
+.PP
+.B Update tldr pages
+$ tldr update
+
+.PP
+.B Show tar tldr page
+$ tldr find tar
Modified: packages/tldr-py/trunk/debian/tldr-py.manpages
===================================================================
--- packages/tldr-py/trunk/debian/tldr-py.manpages 2018-01-05 16:27:55 UTC (rev 14559)
+++ packages/tldr-py/trunk/debian/tldr-py.manpages 2018-01-05 16:28:56 UTC (rev 14560)
@@ -1 +1 @@
-debian/tldr.1
+debian/tldr-py.1
Added: packages/tldr-py/trunk/debian/tldr-py.postinst
===================================================================
--- packages/tldr-py/trunk/debian/tldr-py.postinst (rev 0)
+++ packages/tldr-py/trunk/debian/tldr-py.postinst 2018-01-05 16:28:56 UTC (rev 14560)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] ; then
+ update-alternatives \
+ --install /usr/bin/tldr tldr /usr/bin/tldr-py 10 \
+ --slave /usr/share/man/man1/tldr.1.gz tldr.1.gz /usr/share/man/man1/tldr-py.1.gz
+fi
+
+#DEBHELPER#
Added: packages/tldr-py/trunk/debian/tldr-py.prerm
===================================================================
--- packages/tldr-py/trunk/debian/tldr-py.prerm (rev 0)
+++ packages/tldr-py/trunk/debian/tldr-py.prerm 2018-01-05 16:28:56 UTC (rev 14560)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
+ update-alternatives --remove tldr /usr/bin/tldr-py
+fi
+
+#DEBHELPER#
Deleted: packages/tldr-py/trunk/debian/tldr.1
===================================================================
--- packages/tldr-py/trunk/debian/tldr.1 2018-01-05 16:27:55 UTC (rev 14559)
+++ packages/tldr-py/trunk/debian/tldr.1 2018-01-05 16:28:56 UTC (rev 14560)
@@ -1,53 +0,0 @@
-.TH TLDR "1" "November 2017" "Python client for tldr"
-
-.SH NAME
-tldr \- Python client for tldr
-
-.SH SYNOPSIS
-.B tldr
-\fR[\fIOPTIONS\fR] \fICOMMAND\fR \fR[\fIARGS\fR]...
-
-.SH DESCRIPTION
-.PP
-Yet another Python client for tldr. tldr is a collection of simplified and
-community-driven man pages.
-
-.SH OPTIONS
-.TP
-\fB\-V\fR, \fB\-\-version\fR
-Show the version and exit.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Show the help and exit.
-
-.SH COMMANDS
-.TP
-\fBfind\fR
-Find the command usage.
-.TP
-\fBinit\fR
-Init config file.
-.TP
-\fBreindex\fR
-Rebuild the index.
-.TP
-\fBupdate\fR
-Update to the latest pages.
-
-.SH EXAMPLES
-.nf
-.PP
-.B Download tldr pages and init config
-$ git clone git at github.com:tldr-pages/tldr.git ~/.tldr
-$ tldr init
-Input the tldr repo path(absolute path): /home/<user>/.tldr
-Input your platform(linux, osx or sunos): linux
-$ tldr reindex
-
-.PP
-.B Update tldr pages
-$ tldr update
-
-.PP
-.B Show tar tldr page
-$ tldr find tar
More information about the Python-apps-commits
mailing list