stterm 0.8.1-1 is now pending in DELAYED/7. Attached to this email is
the diff for debian/ between 0.6-1 and 0.8.1-1. This should fulfill the
DevRef requirement to follow up to the ITS bug with a nmudiff in this
last stage of the salvaging process.

Paride
diff --git a/debian/README.Debian-source b/debian/README.Debian-source
deleted file mode 100644
index 7837354..0000000
--- a/debian/README.Debian-source
+++ /dev/null
@@ -1,9 +0,0 @@
-Upstream source for Debian
----------------------------
-
-The original package's binary "st" was renamed to "stterm" to follow
-the naming of similar terminal programs (xterm, aterm, dtterm ...).
-The upstream sources archive st.tar.gz were renamed and repacked with
-debian/repack.sh
-
- -- Jari Aalto <jari.aa...@cante.net>, Fri, 11 Dec 2009 11:59:09 +0200
diff --git a/debian/changelog b/debian/changelog
index 874cc10..ca0c26a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+stterm (0.8.1-1) unstable; urgency=medium
+
+  * New upstream version (closes: #838372)
+  * New maintainer: Paride Legovini (closes: #909663)
+  * Standard-Version 4.2.1 (no changes needed)
+  * Compat level 11 (with B-D on debhelper-compat)
+  * Do not install the terminfo file
+  * Depend on libncurses-term (provides st's terminfo)
+  * Drop the unused build-dependency on libxext-dev
+  * Dropped all the patches. Now:
+    - TERM is st-256color (closes: #785219, #838439);
+    - The binary is installed as 'st', with a 'stterm' symlink.
+
+ -- Paride Legovini <p...@ninthfloor.org>  Tue, 13 Nov 2018 22:35:13 +0000
+
 stterm (0.6-1) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/clean b/debian/clean
index 8fb681b..0e56cf2 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,4 +1 @@
-debian/*.1
-st
-stterm
 config.h
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index ec63514..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/debian/control b/debian/control
index 4a6fa79..62896e2 100644
--- a/debian/control
+++ b/debian/control
@@ -1,24 +1,34 @@
 Source: stterm
 Section: x11
 Priority: optional
-Maintainer: Jari Aalto <jari.aa...@cante.net>
-Build-Depends: debhelper (>= 9), libx11-dev, libfreetype6-dev,
- libxext-dev, pkg-config, libxft-dev
-Standards-Version: 3.9.8
-Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/stterm.git
-Vcs-Git: https://anonscm.debian.org/collab-maint/stterm.git
-Homepage: http://st.suckless.org
+Maintainer: Paride Legovini <p...@ninthfloor.org>
+Build-Depends: debhelper-compat (= 11),
+               libx11-dev,
+               libxft-dev,
+               pkg-config
+Standards-Version: 4.2.1
+Vcs-Browser: https://salsa.debian.org/debian/st
+Vcs-Git: https://salsa.debian.org/debian/st.git
+Homepage: https://st.suckless.org
 
 Package: stterm
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ncurses-term (>= 6.1+20180714-1)
 Provides: x-terminal-emulator
-Description: suckless tools simple terminal for windowed system
- Stterm is a bare bones terminal emulator developed with a focus on
- simplicity and clarity as the primary goals. It is very lightweight
- consuming only approximately (2+25 reserved+virtual) MiB memory. The
- suckless software projects philosophy is about keeping things simple,
- minimal and usable.
+Multi-Arch: foreign
+X-Comment:
+ The versioned dependency for ncurses-term is on the first update after the
+ terminfo entry for st has been last updated in the terminfo database. This
+ can be checked in <https://invisible-island.net/ncurses/NEWS.html>.
+Description: simple terminal emulator for X
+ st is a terminal emulator from the suckless project with a focus on
+ simplicity, clarity and frugality. The project's philosophy is about
+ keeping things simple, minimal and usable.
  .
- Note: the original binary name "st" in this package is "stterm" for
- "suckless tools terminal".
+ st supports most VT10X escape sequences, serial lines, XIM, utmp via
+ utmp(1), clipboard handling, mouse and keyboard shortcuts, UTF-8, wide
+ characters, resize, 256 colors, true colors, antialiased fonts (using
+ fontconfig), fallback fonts, and line drawing. It does *not* provide
+ a scrollback buffer: users are encouraged to use a terminal multiplexter.
+ .
+ This Debian package is called 'stterm' for historical reasons.
diff --git a/debian/copyright b/debian/copyright
index a22227d..b426328 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,29 +1,70 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0
-Upstream-Name: stterm
-Upstream-Contact: Christoph Lohmann (irc __20h__) <2...@r-36.net>
-Source: http://st.suckless.org
-Comment: Dowload is only available from VCS tree.
-X-Vcs-Git: http://git.suckless.org/st
-X-Upstream-Bugs:  d...@suckless.org
-X-Upstream-Irc: #suckl...@irc.oftc.net
-X-Gmane: http://dir.gmane.org/gmane.comp.misc.suckless
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: st
+Upstream-Contact: https://suckless.org/community/
+Source: https://st.suckless.org
 
 Files: *
 Copyright:
- 2012-2013 Christoph Lohmann <2...@r-36.net>
- 2012 Roberto E. Vargas Caballero <k...@shike2.com>
- 2009-2012 Aurélien Aptell <aurelien.ap...@gmail.com>
- 2009 Anselm R Garbe <garb...@gmail.com>, <ans...@garbe.us>
-License: MIT
+  2014-2018 Hiltjo Posthuma <hiltjo at codemadness dot org>
+  2018 Devin J. Pohly <djpohly at gmail dot com>
+  2014-2017 Quentin Rameau <quinq at fifth dot space>
+  2009-2012 Aurélien APTEL <aurelien dot aptel at gmail dot com>
+  2008-2017 Anselm R Garbe <garbeam at gmail dot com>
+  2012-2017 Roberto E. Vargas Caballero <k0ga at shike2 dot com>
+  2012-2016 Christoph Lohmann <20h at r-36 dot net>
+  2013 Eon S. Jeon <esjeon at hyunmu dot am>
+  2013 Alexander Sedov <alex0player at gmail dot com>
+  2013 Mark Edgar <medgar123 at gmail dot com>
+  2013-2014 Eric Pruitt <eric.pruitt at gmail dot com>
+  2013 Michael Forney <mforney at mforney dot org>
+  2013-2014 Markus Teich <markus dot teich at stusta dot mhn dot de>
+  2014-2015 Laslo Hunhold <dev at frign dot de>
+License: Expat
+
+Files: arg.h
+Copyright: 2017-2018 Christoph Lohmann <20h at r-36 dot net>
+License: Expat
+Comment:
+ Got written permission from the Author.
+ The relevant email excerpts follow.
+ .
+ On 2017-07-25 13:56, Christoph Lohmann wrote:
+ > On Tue, 25 Jul 2017 13:56:30 Paride Legovini <p...@ninthfloor.org> wrote:
+ > > while working on software packaging I encountered your arg.h file, with
+ > > just the following notice:
+ > >
+ > > /*
+ > >  * Copy me if you can.
+ > >  * by 20h
+ > >  */
+ > >
+ > > and no proper copyright attribution. I tracked down the file to `sbase',
+ > > but I'm still unsure about where your actual intentions about the
+ > > license for this file. May I assume it's MIX/X Consortium licensed as
+ > > the rest of sbase?
+ >
+ > The license is meant to be public domain. History has destroyed this
+ > dream of real public domain and lawyers live their greed.
+ >
+ > You can assume that it is MIT/X licensed. This will satisfy all
+ > discussions.
+ .
+ On 2017-07-26 13:20, Christoph Lohmann wrote:
+ > On Wed, 26 Jul 2017 13:20:40 Paride Legovini <p...@ninthfloor.org> wrote:
+ >
+ > > May I publicly quote your email?
+ >
+ > You are allowed to do that.
 
 Files: debian/*
 Copyright:
- 2009-2014 Jari Aalto <jari.aa...@cante.net>
+ 2009-2016 Jari Aalto <jari.aa...@cante.net>
+ 2016 Dmitry Bogatov <kact...@gnu.org>
+ 2016 Gianfranco Costamagna <locutusofb...@debian.org>
+ 2018 Paride Legovini <p...@ninthfloor.org>
 License: GPL-2+
 
-License: MIT
- [From file LICENSE]
- .
+License: Expat
  Permission is hereby granted, free of charge, to any person obtaining a
  copy of this software and associated documentation files (the "Software"),
  to deal in the Software without restriction, including without limitation
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 724e084..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,2 +0,0 @@
-README
-TODO
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..0cfd45b
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,6 @@
+[DEFAULT]
+debian-branch = debian/sid
+upstream-branch =
+upstream-tag = %(version)s
+pristine-tar = True
+pristine-tar-commit = True
diff --git a/debian/info b/debian/info
deleted file mode 100644
index cd5581c..0000000
--- a/debian/info
+++ /dev/null
@@ -1 +0,0 @@
-st.info
diff --git a/debian/patches/12-output-version.patch 
b/debian/patches/12-output-version.patch
deleted file mode 100644
index 9fbac6d..0000000
--- a/debian/patches/12-output-version.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Jari Aalto <jari.aa...@cante.net>
-Date: Tue, 20 Sep 2011 12:43:55 +0300
-Subject: Add Copyright word and use name stterm
-
----
- st.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/st.c
-+++ b/st.c
-@@ -4009,11 +4009,11 @@ run(void) {
- 
- void
- usage(void) {
--      die("%s " VERSION " (c) 2010-2015 st engineers\n"
--      "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
--      "          [-i] [-t title] [-w windowid] [-e command ...] [command 
...]\n"
--      "       st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
--      "          [-i] [-t title] [-w windowid] [-l line] [stty_args ...]\n",
-+      die("%s " VERSION " (C) 2010-2015 st engineers\n"
-+      "usage: stterm [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
-+      "              [-i] [-t title] [-w windowid] [-e command ...] [command 
...]\n"
-+      "       stterm [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
-+      "              [-i] [-t title] [-w windowid] [-l line] [stty_args 
...]\n",
-       argv0);
- }
- 
diff --git a/debian/patches/13-term-name.patch 
b/debian/patches/13-term-name.patch
deleted file mode 100644
index 027ed15..0000000
--- a/debian/patches/13-term-name.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From: Jari Aalto <jari.aa...@cante.net>
-Subject: Change st to more descriptive name stterm
-
----
- st.c |   12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
---- a/st.c
-+++ b/st.c
-@@ -3071,7 +3071,7 @@ xloadfonts(char *fontstr, double fontsiz
-       }
- 
-       if(!pattern)
--              die("st: can't open font %s\n", fontstr);
-+              die("stterm: can't open font %s\n", fontstr);
- 
-       if(fontsize > 1) {
-               FcPatternDel(pattern, FC_PIXEL_SIZE);
-@@ -3100,7 +3100,7 @@ xloadfonts(char *fontstr, double fontsiz
-       FcDefaultSubstitute(pattern);
- 
-       if(xloadfont(&dc.font, pattern))
--              die("st: can't open font %s\n", fontstr);
-+              die("stterm: can't open font %s\n", fontstr);
- 
-       if(usedfontsize < 0) {
-               FcPatternGetDouble(dc.font.match->pattern,
-@@ -3117,17 +3117,17 @@ xloadfonts(char *fontstr, double fontsiz
-       FcPatternDel(pattern, FC_SLANT);
-       FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
-       if(xloadfont(&dc.ifont, pattern))
--              die("st: can't open font %s\n", fontstr);
-+              die("stterm: can't open font %s\n", fontstr);
- 
-       FcPatternDel(pattern, FC_WEIGHT);
-       FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD);
-       if(xloadfont(&dc.ibfont, pattern))
--              die("st: can't open font %s\n", fontstr);
-+              die("stterm: can't open font %s\n", fontstr);
- 
-       FcPatternDel(pattern, FC_SLANT);
-       FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
-       if(xloadfont(&dc.bfont, pattern))
--              die("st: can't open font %s\n", fontstr);
-+              die("stterm: can't open font %s\n", fontstr);
- 
-       FcPatternDestroy(pattern);
- }
-@@ -3642,7 +3642,7 @@ xsettitle(char *p) {
- 
- void
- xresettitle(void) {
--      xsettitle(opt_title ? opt_title : "st");
-+      xsettitle(opt_title ? opt_title : "stterm");
- }
- 
- void
diff --git a/debian/patches/20-st.info.patch b/debian/patches/20-st.info.patch
deleted file mode 100644
index 5e770dd..0000000
--- a/debian/patches/20-st.info.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 6595a58898f96ac09efe9001f24a1c87097fc0c8 Mon Sep 17 00:00:00 2001
-From: Jari Aalto <jari.aa...@cante.net>
-Date: Tue, 20 Sep 2011 12:51:52 +0300
-Subject: [PATCH] st.info: rename from st to stterm
-Organization: Private
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Jari Aalto <jari.aa...@cante.net>
----
- st.info |   14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
---- a/st.info
-+++ b/st.info
-@@ -1,4 +1,4 @@
--st| simpleterm,
-+stterm| Suckless Tools simple terminal,
-       acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
-       am,
-       bce,
-@@ -188,24 +188,24 @@
-       vpa=\E[%i%p1%dd,
- 
- 
--st-256color| simpleterm with 256 colors,
--      use=st,
-+stterm-256color| Suckless Tools simple terminal with 256 colors,
-+      use=stterm,
-       colors#256,
-       pairs#32767,
- #     Nicked from xterm-256color
-       setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
-       setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
- 
--st-meta| simpleterm with meta key,
--      use=st,
-+stterm-meta| Suckless Tools simple terminal with meta key,
-+      use=stterm,
-       km,
-       rmm=\E[?1034l,
-       smm=\E[?1034h,
-       rs2=\E[4l\E>\E[?1034h,
-       is2=\E[4l\E>\E[?1034h,
- 
--st-meta-256color| simpleterm with meta key and 256 colors,
--      use=st-256color,
-+stterm-meta-256color| Suckless Tools simple terminal with meta key and 256 
colors,
-+      use=stterm-256color,
-       km,
-       rmm=\E[?1034l,
-       smm=\E[?1034h,
diff --git a/debian/patches/30-config.def.h.patch 
b/debian/patches/30-config.def.h.patch
deleted file mode 100644
index 07eaab1..0000000
--- a/debian/patches/30-config.def.h.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From: Jari Aalto <jari.aa...@cante.net>
-Subject: Rename from st to stterm
-
----
- config.def.h |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/config.def.h
-+++ b/config.def.h
-@@ -54,7 +54,7 @@ static unsigned int cursorthickness = 2;
- static int bellvolume = 0;
- 
- /* TERM value */
--static char termname[] = "st-256color";
-+static char termname[] = "stterm-256color";
- 
- static unsigned int tabspaces = 8;
- 
diff --git a/debian/patches/35-man-debian.patch 
b/debian/patches/35-man-debian.patch
deleted file mode 100644
index 523a249..0000000
--- a/debian/patches/35-man-debian.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From: Jari Aalto <jari.aa...@cante.net>
-Subject: Sync name with Debian package stterm
-
----
- st.1 |   17 +++++++++++------
- 1 file changed, 11 insertions(+), 6 deletions(-)
-
---- a/st.1
-+++ b/st.1
-@@ -1,8 +1,8 @@
--.TH ST 1 st\-VERSION
-+.TH STTERM 1 stterm\-VERSION
- .SH NAME
--st \- simple terminal
-+stterm \- suckless tools terminal aka simple terminal
- .SH SYNOPSIS
--.B st
-+.B stterm
- .RB [ \-a ]
- .RB [ \-c
- .IR class ]
-@@ -46,8 +46,13 @@ st \- simple terminal
- .IR line ]
- .RI [ stty_args ...]
- .SH DESCRIPTION
--.B st
--is a simple terminal emulator.
-+.B stterm
-+is a simple terminal emulator. The original project released the binary under 
name "st". If you would like to access the program by a short name, add an 
alias or function to the shell startup file:
-+.TP
-+.in 4
-+.DS I 2
-+alias st=stterm  # E.g. in ~/.bashrc for bash; consult your $SHELL
-+.DE
- .SH OPTIONS
- .TP
- .B \-a
-@@ -135,7 +140,7 @@ Copy the selected text to the clipboard
- .B Alt-Shift-v
- Paste from the clipboard selection.
- .SH CUSTOMIZATION
--.B st
-+.B stterm
- can be customized by creating a custom config.h and (re)compiling the source
- code. This keeps it fast, secure and simple.
- .SH AUTHORS
diff --git a/debian/patches/36-man-t-option.patch 
b/debian/patches/36-man-t-option.patch
deleted file mode 100644
index a5a10fa..0000000
--- a/debian/patches/36-man-t-option.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From: Jari Aalto <jari.aa...@cante.net>
-Subject: Change option -t to -T
- x-terminal emulator must provide option -T.
- See 11.8.3 Packages providing a terminal emulator
- http://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.8.3
-
----
- st.1 |   14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
---- a/st.1
-+++ b/st.1
-@@ -13,7 +13,7 @@ stterm \- suckless tools terminal aka si
- .RB [ \-i ]
- .RB [ \-o
- .IR file ]
--.RB [ \-t 
-+.RB [ \-T
- .IR title ]
- .RB [ \-l
- .IR line ]
-@@ -64,7 +64,7 @@ defines the window class (default $TERM)
- .BI \-f " font"
- defines the
- .I font
--to use when st is run.
-+to use.
- .TP
- .BI \-g " geometry"
- defines the X11 geometry string.
-@@ -78,14 +78,14 @@ will fixate the position given with the
- .BI \-o " iofile"
- writes all the I/O to
- .I iofile.
--This feature is useful when recording st sessions. A value of "-" means
-+This feature is useful when recording sessions. A value of "-" means
- standard output.
- .TP
--.BI \-t " title"
-+.BI \-T " title"
- defines the window title (default 'st').
- .TP
- .BI \-w " windowid"
--embeds st within the window identified by 
-+embeds stterm within the window identified by 
- .I windowid
- .TP
- .BI \-l " line"
-@@ -97,7 +97,7 @@ remaining arguments are used as flags fo
- prints version information to stderr, then exits.
- .TP
- .BI \-e " program " [ " arguments " "... ]"
--st executes
-+executes
- .I program
- instead of the shell.  If this is used it
- .B must be the last option
diff --git a/debian/patches/40-t-option.patch b/debian/patches/40-t-option.patch
deleted file mode 100644
index 81a8966..0000000
--- a/debian/patches/40-t-option.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Jari Aalto <jari.aa...@cante.net>
-Subject: Change option -t to -T
- x-terminal emulator must provide option -T.
- See 11.8.3 Packages providing a terminal emulator
- http://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.8.3
-
----
- st.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/st.c
-+++ b/st.c
-@@ -4011,9 +4011,9 @@ void
- usage(void) {
-       die("%s " VERSION " (C) 2010-2015 st engineers\n"
-       "usage: stterm [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
--      "              [-i] [-t title] [-w windowid] [-e command ...] [command 
...]\n"
-+      "              [-i] [-T title] [-w windowid] [-e command ...] [command 
...]\n"
-       "       stterm [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
--      "              [-i] [-t title] [-w windowid] [-l line] [stty_args 
...]\n",
-+      "              [-i] [-T title] [-w windowid] [-l line] [stty_args 
...]\n",
-       argv0);
- }
- 
-@@ -4052,7 +4052,7 @@ main(int argc, char *argv[]) {
-       case 'l':
-               opt_line = EARGF(usage());
-               break;
--      case 't':
-+      case 'T':
-               opt_title = EARGF(usage());
-               break;
-       case 'w':
diff --git a/debian/patches/45-man-hyphen.patch 
b/debian/patches/45-man-hyphen.patch
deleted file mode 100644
index 1b2cf1d..0000000
--- a/debian/patches/45-man-hyphen.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From: Jari Aalto <jari.aa...@cante.net>
-Subject: Fix hyphen in manual page
-
----
- st.1 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/st.1
-+++ b/st.1
-@@ -73,7 +73,7 @@ The form is [=][<cols>{xX}<rows>][{+-}<x
- for further details.
- .TP
- .B \-i
--will fixate the position given with the -g option.
-+will fixate the position given with the \-g option.
- .TP
- .BI \-o " iofile"
- writes all the I/O to
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index d7d93ee..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,8 +0,0 @@
-12-output-version.patch
-13-term-name.patch
-20-st.info.patch
-30-config.def.h.patch
-35-man-debian.patch
-36-man-t-option.patch
-40-t-option.patch
-45-man-hyphen.patch
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100755
index c903422..0000000
--- a/debian/postinst
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-set -e
-
-#DEBHELPER#
-
-action="$1"
-oldversion="$2"
-
-update-alternatives \
-    --install /usr/bin/x-terminal-emulator \
-      x-terminal-emulator /usr/bin/stterm 15 \
-    --slave /usr/share/man/man1/x-terminal-emulator.1.gz \
-      x-terminal-emulator.1.gz \
-      /usr/share/man/man1/stterm.1.gz
-
-# End of file
-
-
diff --git a/debian/repack.sh b/debian/repack.sh
deleted file mode 100644
index 841db1b..0000000
--- a/debian/repack.sh
+++ /dev/null
@@ -1,377 +0,0 @@
-#!/bin/sh
-#
-#   Copyright
-#
-#       Copyright (C) 2008-2010 Jari Aalto <jari.aa...@cante.net>
-#
-#   License
-#
-#       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; either version 2 of the License, or
-#       (at your option) any later version.
-#
-#       This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-
-set -e
-set -u
-
-DIR=""
-
-Initialize ()
-{
-    # Check depends
-
-    [ -x /bin/mktemp ] || Die "[ERROR]: mktemp (pkg: coreutils) not installed."
-    [ -x /bin/bzip2  ] || Die "[ERROR]: bzip2 (pkg: bzip2) not installed."
-    [ -x /bin/gzip   ] || Die "[ERROR]: gzip (pkg: gzip) not installed."
-    [ -x /bin/tar    ] || Die "[ERROR]: tar (pkg: tar) not installed."
-}
-
-InitializeZip ()
-{
-    [ -x /usr/bin/unzip ] || Die "[ERROR]: unzip (pkg: unzip) not installed."
-}
-
-InitializeRar ()
-{
-    [ -x /usr/bin/unrar ] || Die "[ERROR]: unrar (pkg: unrar) not installed."
-}
-
-Help ()
-{
-    echo "
-SYNOPSIS
-  repack.sh [--upstream-source] <VER> <downloaded file> [PACKAGE]
-
-DESCRIPTION
-    Repackage upstream source. The command line arguments are
-    according to to uscan(1) order. The PACKAGE argument is optional.
-
-    Can also repack *.zip and *.rar files.
-
-OPTIONS
-    --upstream-source
-       Option is ignored. It is passed from uscan(1) when debian/watch
-       file is read.
-
-EXAMPLES
-    To manually repack original upstream source foo-1.1.tar.gz to
-    bar-1.10.orig.tar.gz:
-
-        repack.sh 1.10 foo-1.1.tar.gz bar
-
-    Save this file to debian/repack.sh and add following line to debian/watch:
-
-        version=3
-        http://example.com .*package-(.+).tar.gz debian debian/repack.sh
-
-AUTHOR
-    Copyright (C) 2008-2010 Jari Aalto <jari.aa...@cante.net>
-
-    Released under the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version."
-
-    exit 0
-}
-
-Run ()
-{
-    if [ "${test+test_mode}" = "test_mode" ]; then
-       echo "$@"
-    else
-       [ "${verbose+verbose_mode}" = "verbose_mode" ] && echo "$@" >&2
-       "$@"
-    fi
-}
-
-Warn ()
-{
-    echo "$*" >&2
-}
-
-Die ()
-{
-    Warn "$*"
-    exit 1
-}
-
-AtExit ()
-{
-    if [ "$DIR" ]; then
-       [ -d "$DIR" ] && rm -rf "$DIR"
-    fi
-}
-
-DebianVersion ()
-{
-    # No version conversions yet
-    echo $1
-}
-
-DebianTar ()
-{
-    local ver=$1
-    local dver=$2
-    local file=$3
-    local pkg=$4
-
-    # Convert suffixes
-
-    file=$(echo $file | sed -e 's,.orig,,' -e 's,\(tgz\|zip\|rar\)$,tar.gz,' )
-
-    # If version is same, use original file
-
-    if [ "$ver" = "$dver" ]; then
-       if [ "$pkg" ]; then
-           echo $file | sed "s,.*$ver,${pkg}_$ver.orig,"
-       else
-            echo $file
-       fi
-       return 0
-    fi
-
-    if [ "$pkg" ]; then
-       echo $file | sed -e "s,.*$ver,${pkg}_$dver.orig,"
-    else
-        # replace with new version
-       echo $file | sed -e "s,$ver,$dver.orig,"
-    fi
-}
-
-Pkg ()
-{
-    local file=$1
-
-    if [ -f debian/changelog ]; then
-       dpkg-parsechangelog | awk '/^Source:/ {print $2}'
-    else
-
-       # package-1.1.tar.gz => package
-       echo $file | sed "s,[-_][0-9].*,,"
-    fi
-}
-
-Version ()
-{
-    local file=$1
-    local pkg=$(Pkg $file)
-
-    if [ ! "$pkg" ]; then
-       Die "[ERROR] Internal error. 'pkg' variable not set. Run with debug 
(-x)"
-    fi
-
-    echo $file |
-    sed -e "s,\.orig.*,," \
-       -e "s,\.tar.*,," \
-       -e "s,\.tgz,," \
-       -e "s,\.tbz,," \
-       -e "s,\.tbz2,," \
-       -e "s,\.zip,," \
-       -e "s,\.7z,," \
-       -e "s,\.rar,," \
-       -e "s,\.lzma,," \
-       -e "s,\.xz,," \
-        -e "s,$pkg[-_],,"
-}
-
-Cleanup ()
-{
-    [ "$1" ] || return 1
-
-    local dir
-    dir=$1
-
-    find "$dir" \
-       \( \
-       -iname "*.exe" \
-       -o -name "*.swp" \
-       -o -name "DEADJOE" \
-       -o -name "*.[~#]" \
-       -o -name ".gitignore" \
-       -o -name ".bzrignore" \
-       -o -name ".svnignore" \
-       -o -name ".cvsignore" \
-       -o -path "*/debian/*" \
-       -o -path "*/debian" \
-       -o -path "*/CVS*" \
-       -o -path "*/.svn*" \
-       -o -path "*/.darcs*" \
-       -o -path "*/.bzr*" \
-       -o -path "*/.hg*" \
-       -o -path "*/.git*" \
-       \) \
-       -print0 |
-    xargs --null --no-run-if-empty rm -rf --verbose
-
-    #  Remove executables
-
-    find "$dir" -type f -print0 |
-        xargs --null --no-run-if-empty file |
-    awk -F: '$2 ~ /ELF|COFF|LSB exe/ {print $1}' |
-        xargs --no-run-if-empty rm --verbose
-}
-
-Main ()
-{
-    if [ $# -eq 0 ]; then
-        Help
-    fi
-
-    Initialize
-
-    case "$1" in
-       --help|-h)
-           Help
-           ;;
-       --*)
-           shift
-           #  Ignore uscan(1) argument --upstream-version in $1
-           ;;
-    esac
-
-    VER="$1"
-    FILENAME="$2"
-    DIR=
-
-    if [ ! -f "$FILENAME" ]; then
-       Die "[ERROR] Arg 2. File does not exist: $FILENAME"
-    fi
-
-    FILE_DIR=$(dirname $FILENAME)
-    FILE=$(basename $FILENAME)
-
-    PKG=${3:-$(Pkg $FILE)}
-
-    if [ ! "$PKG" ]; then
-       Die "[ERROR] Internal error. PKG not set. Run with debug (-x)"
-    fi
-
-    CURVER=$(Version $FILE)
-
-    if [ ! "$CURVER" ]; then
-       Die "[ERROR] Internal error. CURVER not set. Run with debug (-x)"
-    fi
-
-    DVER=$(DebianVersion "$VER")
-    DFILE=$(DebianTar "$CURVER" "$DVER" "$FILE" $PKG)
-
-    #  Debian Developer's Reference 6.7.8.2 Repackaged upstream source
-
-    REPACK_DIR="$PKG-$DVER.orig"
-
-    DIR=$(mktemp -d ./tmp.repack.XXXXXX)
-
-    if [ ! "$DIR" ]; then
-       Die "[INTERNAL ERROR] mktemp(1) failed. Debug with 'sh -x PROGRAM'"
-    fi
-
-    echo "Repacking $FILENAME as $PKG-$DVER"
-
-    #  Create an extra directory to cope with tarballs that
-    #  do not have root/ directory
-
-    UP_BASE="$DIR/unpack"
-    Run mkdir "$UP_BASE"
-
-    curdir=$(pwd)
-
-    case "$FILENAME" in
-       *.gz | *.bz2 )
-
-           Run tar -C "$UP_BASE" -xf "$FILENAME"
-           ;;
-
-       *.zip)
-           InitializeZip
-
-           adir=$(dirname $FILENAME)
-           name=$(basename $FILENAME)
-
-           Run cd "$UP_BASE"
-           Run unzip "$curdir/$adir/$name" || return 1
-
-           cd $curdir
-           ;;
-
-       *.rar)
-           InitializeRar
-
-           adir=$(dirname $FILENAME)
-           name=$(basename $FILENAME)
-
-           Run cd "$UP_BASE"
-           Run unrar x "$curdir/$adir/$name" || return 1
-
-           cd $curdir
-
-           ;;
-
-       *)  Die "Unknonw file format: $FILENAME"
-           ;;
-    esac
-
-    if [ $(ls -1 "$UP_BASE" | wc -l) -eq 1 ]; then
-       # Tarball does contain a root directory
-       UP_BASE="$UP_BASE/$(ls -1 "$UP_BASE")"
-    fi
-
-    if [ ! "$UP_BASE" ]; then
-       Die "[INTERNAL ERROR] UP_BASE not set"
-    fi
-
-    Cleanup "$UP_BASE"
-
-    #  Repack
-
-    Run mv "$UP_BASE" "$DIR/$REPACK_DIR"
-
-    #  Don't use pipes. Errors are not handled well with them.
-
-    Run tar -C "$DIR" -cf "$DIR/repacked.tar" "$REPACK_DIR"
-
-    #   The .orig file must use gzip compression
-
-    tar="$DIR/repacked.tar"
-
-    case "$DFILE" in
-       *.bz2)
-           DFILE=$(echo $DFILE | sed "s/.bz2/.gz/")
-           ;;
-       *.gz)
-           ;;
-       *.zip)
-           DFILE=$(echo $DFILE | sed "s/.zip/.gz/")
-           ;;
-       *.rar)
-           DFILE=$(echo $DFILE | sed "s/.rar/.gz/")
-           ;;
-        *)
-           Die "Unknown *.suffix in $DFILE"
-           ;;
-    esac
-
-    suffix=".gz"
-
-    Run gzip --best "$tar"
-
-    if [ -f "$DFILE" ]; then
-       echo "Warning, overwriting $DFILE"
-    fi
-
-    Run mv "$tar$suffix" "$DFILE"
-
-    echo "Done $DFILE"
-}
-
-trap AtExit QUIT INT EXIT
-Main "$@"
-
-# End of file
diff --git a/debian/rules b/debian/rules
index 8acf449..0c7e767 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,87 +1,23 @@
 #!/usr/bin/make -f
 
-#export DH_VERBOSE=1
+# Needed for the st.1 VERSION fixup in override_dh_installman.
+include /usr/share/dpkg/pkg-info.mk
 
-
-PACKAGE                = stterm
-# Needed for st.1 fix up
-VERSION         = 0.4.1
-
-ORIGBIN                = st
-CHANGELOG      = debian/upstream.changelog
-UPSTREAM_DIR    = ../upstream.git
-UPSTREAM_VCS    = http://git.suckless.org/st
-
-BIN            = $(PACKAGE)
-PKGDIR         = $(CURDIR)/debian/$(PACKAGE)
-BINDIR         = $(PKGDIR)/usr/bin
-SHAREROOTDIR   = $(PKGDIR)/usr/share
-DOCROOTDIR     = $(SHAREROOTDIR)/doc
-PKGDOCDIR      = $(DOCROOTDIR)/$(PACKAGE)
-TERMINFO       = $(PKGDIR)/usr/share/terminfo
-MANROOTDIR     = $(SHAREROOTDIR)/man
-MAN1DIR                = $(MANROOTDIR)/man1
-
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
-# Needed for gcc:
-# warning: implicit declaration of function 'unsetenv'
-# warning: implicit declaration of function 'setenv'
-# warning: implicit declaration of function 'nanosleep'
-# warning: implicit declaration of function 'kill'
-
-export DEB_CFLAGS_MAINT_APPEND += -D_POSIX_C_SOURCE=200112L
-
-# warning: implicit declaration of function 'strsep'
-
-export DEB_CFLAGS_MAINT_APPEND += \
-    -D_BSD_SOURCE -D_XOPEN_SOURCE=600
-
-# From original sources: config.mk
-
-CFLAGS += -std=c99 --param=ssp-buffer-size=4 \
-         -I/usr/include -I/usr/X11R6/include -DVERSION=\"0.4.1\" \
-         $$(pkg-config --cflags freetype2)
-
-LDFLAGS += -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -lutil -lXext -lXft 
-lfontconfig -lm
-
-get-changelog:
-       [ -d $(UPSTREAM_DIR) ] || git clone $(UPSTREAM_VCS) $(UPSTREAM_DIR)
-
-       pwd=$$(pwd); \
-       cd $(UPSTREAM_DIR) && git log | head -n 100 | \
-       sed 's/ *$$//' > "$$pwd/$(CHANGELOG)"
-
-terminfo:
-       install -m 755 -d $(TERMINFO)/s
-       TERMINFO=$(TERMINFO) tic $(ORIGBIN).info
-
-override_dh_auto_build:
-       # Can't inject build flags to makefile; compile by hand
-       cp config.def.h config.h
-       $(CC) $(CFLAGS) $(CPPFLAGS) $(ORIGBIN).c -o $(BIN) $(LDFLAGS)
-       rm -f config.h
-
-override_dh_installinfo:
-       # Disable; the *.info is not a info(1) but a terminfo file
-
-override_dh_installchangelogs:
-       dh_installchangelogs $(CHANGELOG)
-
-override_dh_auto_install: terminfo
-       # Upstream no good. Calls tic(1) which writes to $HOME
-       install -m 755 -D $(BIN) $(BINDIR)/$(BIN)
-       install -m 644 -D \
-               $(ORIGBIN).info \
-               $(PKGDOCDIR)/examples/$(PACKAGE).terminfo
-       install -D st.1 $(MAN1DIR)/stterm.1
-       sed --in-place "s/-VERSION/-$(VERSION)/" $(MAN1DIR)/stterm.1
-
 %:
        dh $@
 
-.PHONY: man terminfo
+override_dh_auto_build:
+       # The Makefile supports CFLAGS, but not CPPFLAGS, let's append them.
+       CFLAGS="$$CFLAGS $$CPPFLAGS" dh_auto_build
+
+override_dh_auto_install:
+       # The upstream install target runs tic(1), and we don't want to. We 
could patch
+       # the command away, but it is simpler to install the couple of files we 
actually
+       # want using debhelper. Let's disable dh_auto_install.
 
-# End of file
+override_dh_installman:
+       dh_installman
+       sed -i "s/VERSION/$(DEB_VERSION_UPSTREAM)/g" 
$(CURDIR)/debian/stterm/usr/share/man/man1/st.1
diff --git a/debian/stterm.install b/debian/stterm.install
new file mode 100644
index 0000000..74c9c07
--- /dev/null
+++ b/debian/stterm.install
@@ -0,0 +1 @@
+st usr/bin
diff --git a/debian/stterm.links b/debian/stterm.links
new file mode 100644
index 0000000..e767830
--- /dev/null
+++ b/debian/stterm.links
@@ -0,0 +1,2 @@
+usr/bin/st usr/bin/stterm
+usr/share/man/man1/st.1.gz usr/share/man/man1/stterm.1.gz
diff --git a/debian/stterm.manpages b/debian/stterm.manpages
new file mode 100644
index 0000000..c99be70
--- /dev/null
+++ b/debian/stterm.manpages
@@ -0,0 +1 @@
+st.1
diff --git a/debian/stterm.postinst b/debian/stterm.postinst
new file mode 100644
index 0000000..dbf0c70
--- /dev/null
+++ b/debian/stterm.postinst
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+# Get rid of the old 'stterm' alternative.
+# Since version 0.8.1-1 the binary is called 'st'.
+update-alternatives --remove x-terminal-emulator /usr/bin/stterm
+
+# Install the new alternative.
+update-alternatives \
+  --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/st 15 \
+  --slave /usr/share/man/man1/x-terminal-emulator.1.gz 
x-terminal-emulator.1.gz /usr/share/man/man1/st.1.gz
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/prerm b/debian/stterm.prerm
old mode 100755
new mode 100644
similarity index 88%
rename from debian/prerm
rename to debian/stterm.prerm
index b4789cb..c050853
--- a/debian/prerm
+++ b/debian/stterm.prerm
@@ -2,10 +2,10 @@
 
 set -e
 
-#DEBHELPER#
-
 if [ "$1" = remove ] || [ "$1" = deconfigure ]; then
-    update-alternatives --remove x-terminal-emulator /usr/bin/stterm
+    update-alternatives --remove x-terminal-emulator /usr/bin/st
 fi
 
-# End of file
+#DEBHELPER#
+
+exit 0
diff --git a/debian/upstream.changelog b/debian/upstream.changelog
deleted file mode 100644
index b8cd23e..0000000
--- a/debian/upstream.changelog
+++ /dev/null
@@ -1,100 +0,0 @@
-commit 457969381869f9f3ecbb462bf40f053f2a748a02
-Author: Roberto E. Vargas Caballero <k...@shike2.com>
-Date:   Mon Aug 12 15:25:18 2013 +0200
-
-    Add terminfo definitions for terminals with meta key
-
-    Some programs don't check the value of km and use smm and rmm
-    capabilites, and they cause the terminal change to meta enabled
-    mode even in cases where is not desirable.
-
-    Allmost all people is using the terminal waiting that meta sends
-    escape, so rmm and smm are not needed. If someone needs meta
-    sets 8 bit he can use the correct terminfo definition in TERM.
-
-commit 347a45c35299c94e97c976b6e1df383dc2b8fbda
-Author: Eon S. Jeon <esj...@lavabit.com>
-Date:   Mon Aug 5 16:37:59 2013 -0400
-
-    Fix signess of tdefcolor
-
-    tdefcolor() returns -1 on error, while its return type is
-    unsigned long. At the same time, line 1724 and 1731 are checking the
-    positivity of its unsigned return value.
-
-commit 22eeda56b7c1532773343811dee1f76c0999d01c
-Author: Alexander Sedov <alex0pla...@gmail.com>
-Date:   Mon Jul 29 11:50:44 2013 +0400
-
-    Fixed memory leak in xsettitle().
-
-commit 86c03ddc82d2f9f84f22f79741e13ade0e0b8cd1
-Author: Michael Forney <mfor...@mforney.org>
-Date:   Thu Jul 25 16:24:16 2013 -0700
-
-    Fix blink mode check
-
-    ATTR_BLINK is an attribute for a Glyph and will not be set in term.mode.
-
-commit 7e3cff33ffbd69a112fa4071a9f0ed2dc93bfc57
-Author: Eric Pruitt <eric.pru...@gmail.com>
-Date:   Mon Aug 5 11:33:37 2013 +0200
-
-    Use character size scaling factors
-
-    The bounding boxes for characters can be scaled using "cwscale" and 
"chscale"
-    to scale the width and height respectively.
-
-commit aaee0e8b28a353c215b6d1c8fc06d20038d7b426
-Author: Roberto E. Vargas Caballero <k...@shike2.com>
-Date:   Sat Jul 20 21:52:40 2013 +0200
-
-    Reload colors in reset
-
-    Colors definition can be changed using a OSC sequence, so
-    we have to reload them if we want be sure all the colors
-    are the correct.
-
-    Could be desirable free the colors allocated due to rgb
-    colors and inverse colors (XftColorAllocValues in xdraws),
-    but it is impossible due we use the same structure for all
-    of them.
-
-commit 8dde8cde41caa311718d2b990ea3356272ee25ee
-Author: Roberto E. Vargas Caballero <k...@shike2.com>
-Date:   Fri Jul 19 20:34:36 2013 +0200
-
-    Add RGB color definition
-
-    This patch uses the bit 24 in the color descriptor as an indicator
-    of RGB color, so we can take the values and generating the XftColour
-    directly in xdraws.
-
-commit 33ad83d49213749f4fcec850327f57a33ca8b921
-Author: Eon S. Jeon <esj...@lavabit.com>
-Date:   Fri Jul 19 01:07:02 2013 -0400
-
-    Improved font caching
-
-    I made a patch that improves the performance of font caching mechanism.
-    This is based on a funny behaviour of FontConfig: it was handling
-    FcCharSet in a somewhat unexpected way.
-
-    So, we are currently adding "a character" to a new FcCharSet, and then
-    add it to a FcPattern. However, if we toss the FcPattern to FontConfig,
-    it loads the entire language(charset) that contains the character we
-    gave. That is, we don't always have to load a new font for each unknown
-    character. Instead, we can reused cached fonts, and this significantly
-    reduces the number of calls to extremely slow FontConfig matching
-    functions.
-
-    One more thing. I found that, in libXft, there's a function called
-    XftCharExists. XftCharIndex internally calls this function, and
-    does more stuffs if the character does exist. Since the returned index
-    is never used in st, we should call XftCharExists instead of
-    XftCharIndex. Please note that I already made this change in the patch.
-
-commit 40e4d76d227d9c517054036f546acd49431bca42
-Author: Markus Teich <markus.te...@stusta.mhn.de>
-Date:   Sat Jun 22 23:07:00 2013 +0200
-
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..95f7db3
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,6 @@
+Name: st
+Contact: The <d...@suckless.org> mailing list
+Repository: git://git.suckless.org/st
+Repository-Browse: https://git.suckless.org/st/i
+Bug-Submit: Instructions at https://suckless.org/community/
+FAQ: https://git.suckless.org/st/file/FAQ.html
diff --git a/debian/watch b/debian/watch
index 01a2536..7602e6a 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
-version=3
-http://git.suckless.org/st/refs /st/snapshot/st-(.*)\.tar\.gz
\ No newline at end of file
+version=4
+opts="mode=git, pgpmode=none" git://git.suckless.org/st refs/tags/([\d\.]+)

Reply via email to