* debian/install: add new bti-shrink-urls.
authorgregor herrmann <gregoa@debian.org>
Tue, 24 Mar 2009 19:46:56 +0000 (19:46 -0000)
committergregor herrmann <gregoa@debian.org>
Tue, 24 Mar 2009 19:46:56 +0000 (19:46 -0000)
* debian/copyright: add information about bti-shrink-urls.
* Create a manpage for bti-shrink-urls.
* debian/rules: skip dh_auto_install (upstream Makefile now has an install
  target which is not easier to use than the manual installation we've been
  using).
* Add a new patch getopt.patch to make the new commandline options available
  in bti.c.

debian/bti-shrink-urls.xml [new file with mode: 0644]
debian/changelog
debian/clean
debian/copyright
debian/install
debian/manpages
debian/patches/getopt.patch [new file with mode: 0644]
debian/patches/series
debian/rules

diff --git a/debian/bti-shrink-urls.xml b/debian/bti-shrink-urls.xml
new file mode 100644 (file)
index 0000000..a57c62f
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version='1.0'?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<article>
+  <section>
+    <title>bti-shrink-urls</title>
+    <refentry>
+      <refentryinfo>
+        <title>bti-shrink-urls</title>
+        <date>March 2009</date>
+        <productname>bti-shrink-urls</productname>
+      </refentryinfo>
+
+      <refmeta>
+        <refentrytitle>bti-shrink-urls</refentrytitle>
+        <manvolnum>1</manvolnum>
+        <refmiscinfo class="version"></refmiscinfo>
+      </refmeta>
+
+      <refnamediv>
+        <refname>bti-shrink-urls</refname>
+        <refpurpose>convert URLs to a shorter form using a web service</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <cmdsynopsis>
+          <command>bti</command>
+          <arg><option>--escaped</option></arg>
+          <arg><option>--help</option></arg>
+          <arg><option>URL</option></arg>
+        </cmdsynopsis>
+      </refsynopsisdiv>
+
+      <refsect1><title>DESCRIPTION</title>
+        <para>
+         bti-shrink-urls converts URLs to a shorter form using a web service.
+        </para>
+        <para>
+          Currently only http://2tu.us/ is supported.
+        </para>
+      </refsect1>
+
+      <refsect1><title>OPTIONS</title>
+        <variablelist>
+          <varlistentry>
+            <term><option>--escaped</option></term>
+            <listitem>
+              <para>
+               Don't escape special characters in the URL any more, they are
+               already percent encoded.
+             </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><option>--help</option></term>
+            <listitem>
+              <para>
+              Print help text.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><option>URL</option></term>
+            <listitem>
+              <para>
+               Specify the URL to be converted. If no URL is given
+                bti-shrink-urls waits for input on stdin.
+              </para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </refsect1>
+
+       <refsect1><title>COPYRIGHT AND LICENSE</title>
+         <para>
+          Copyright (C) 2009 Bart Trojanowski <email>bart@jukie.net</email>.
+         </para>
+         <para>
+          This program 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 version 2 of the License.
+         </para>
+       </refsect1>
+
+    </refentry>
+  </section>
+</article>
index 4d91b90..79ca75a 100644 (file)
@@ -3,6 +3,14 @@ bti (017-1) UNRELEASED; urgency=low
   * New upstream release.
   * Add build-dependency on libpcre3-dev.
   * Refresh patch manpage-debian.patch.
+  * debian/install: add new bti-shrink-urls.
+  * debian/copyright: add information about bti-shrink-urls.
+  * Create a manpage for bti-shrink-urls.
+  * debian/rules: skip dh_auto_install (upstream Makefile now has an install
+    target which is not easier to use than the manual installation we've been
+    using).
+  * Add a new patch getopt.patch to make the new commandline options available
+    in bti.c.
 
  -- gregor herrmann <gregoa@debian.org>  Tue, 24 Mar 2009 19:01:58 +0100
 
index 5c26ade..3ecb2de 100644 (file)
@@ -1 +1,2 @@
 bti.1
+debian/bti-shrink-urls.1
index c972679..6a9bd66 100644 (file)
@@ -8,6 +8,10 @@ Files: *
 Copyright: 2008 Greg Kroah-Hartman <greg@kroah.com>
 License: GPL-2
 
+Files: bti-shrink-urls
+Copyright: 2009 Bart Trojanowski <bart@jukie.net>
+License: GPL-2
+
 Files: debian/*
 Copyright:
  2008-2009, gregor herrmann <gregoa@debian.org>, tony mancill <tmancill@debian.org>
index ef5211f..0f47ffa 100644 (file)
@@ -1,2 +1,3 @@
 bti usr/bin
+bti-shrink-urls usr/bin
 bti-bashcompletion etc/bash_completion.d
index 5c26ade..3ecb2de 100644 (file)
@@ -1 +1,2 @@
 bti.1
+debian/bti-shrink-urls.1
diff --git a/debian/patches/getopt.patch b/debian/patches/getopt.patch
new file mode 100644 (file)
index 0000000..652c70b
--- /dev/null
@@ -0,0 +1,23 @@
+Author: gregor herrmann <gregoa@debian.org>
+Description: add missing arguments to getopt_long_only call and add
+             --dry-run to --help
+
+--- a/bti.c
++++ b/bti.c
+@@ -106,6 +106,7 @@
+       fprintf(stdout, "  --page PAGENUMBER\n");
+       fprintf(stdout, "  --bash\n");
+       fprintf(stdout, "  --debug\n");
++      fprintf(stdout, "  --dry-run\n");
+       fprintf(stdout, "  --version\n");
+       fprintf(stdout, "  --help\n");
+ }
+@@ -965,7 +966,7 @@
+       parse_configfile(session);
+       while (1) {
+-              option = getopt_long_only(argc, argv, "dqe:p:P:H:a:A:u:hg:",
++              option = getopt_long_only(argc, argv, "dqe:p:P:H:a:A:u:hg:sn",
+                                         options, NULL);
+               if (option == -1)
+                       break;
index c6aa687..ea4a446 100644 (file)
@@ -1 +1,2 @@
 manpage-debian.patch
+getopt.patch
index a6c48c2..28dcba7 100755 (executable)
@@ -12,7 +12,9 @@ clean: unpatch
 
 install: install-stamp
 install-stamp: build-stamp
-       dh install
+       dh install --before dh_auto_install
+       xmlto -o $(CURDIR)/debian man debian/bti-shrink-urls.xml
+       dh install --after dh_auto_install
        mv debian/bti/etc/bash_completion.d/bti-bashcompletion debian/bti/etc/bash_completion.d/bti
        touch $@