Merge branch 'debian-develop' into dev-1.4.0

This commit is contained in:
Ben Wiederhake 2017-04-10 23:17:00 +02:00
commit d93c601446
12 changed files with 351 additions and 0 deletions

3
debian/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/files
/telegram-purple/
/telegram-purple.*

121
debian/README.source vendored Normal file
View file

@ -0,0 +1,121 @@
Packing, unpacking, and modifying (as per §4.14)
================================================
1. Generate the fully patched source, in a form ready for editing, that
would be built to create Debian packages.
This step does not need any special attention. The standard invocation
of "dpkg-source -x" does exactly what is needed.
2. Modify the source and save those modifications so that they will be
applied when building the package.
== AND ==
3. Remove source modifications that are currently being applied when
building the package.
There is no standard procedure for this package. Please note that:
- quilt seems to be the default tool for this kind of work.
- git-buildpackage (gbp) might not work as expected, so I refrained
from trying it for this task. See below.
So far, issues reported against the project have been resolved quickly
enough to avoid scenarios that usually need the d/patches/ directory.
4. Generate a *.orig.tar.gz from the git repository, e.g., upgrade the
Debian source package to a new upstream version.
Easy way:
use the provided orig-tars, e.g., 'telegram-purple_1.2.6.orig.tar.gz'
Hard way (the procedure used to create these files):
$ git clone --recursive --branch debian-master \
https://github.com/majn/telegram-purple.git
$ cd telegram-purple
...$ make dist
The output should look like this:
Refresh commit.h
./gen-origtar
mv -f bin/result.tar.gz telegram-purple_deb-v1.2.4-2-161-gb5272d4.orig.tar.gz
The following approaches do NOT work:
- Github's "download source tar", as this leaves out submodules.
- git-buildpackage (gpb). No support for submodules-within-submodules.
The file README.md of the project contains some hints about how to
build packages, so here's a cheat sheet:
- Just build a *.deb, ideal for local use:
fakeroot ./debian/rules binary
- Build the package for analysis, e.g. lintian:
dpkg-buildpackage
- Only produce a *.dsc and *.debian.tar.xz file:
( cd .. && dpkg-source -b telegram-purple )
- Run pbuilder (needs the previous step):
( cd .. && sudo pbuilder --build telegram-purple_*.dsc )
Package name
============
At the time of writing (2016-01-03), the Debian repository contained
the following libpurple-backends:
- pidgin-encryption
- pidgin-latex
- pidgin-otr
- pidgin-plugin-pack
- pidgin-privacy-please
So following that tradition, this package would be called "pidgin-telegram".
However, this would have a lot of disadvantages:
- This is a frontend-agnostic backend that works with Adium, pidgin,
and Finch. We hope that it works nicely with all other frontends, too.
Calling it "pidgin-something" would be highly misleading.
- All error messages and their translations would need to be adapted
- paths would need to change that aren't configurable
- some users are expecting the name to be "telegram-purple"
(at least initially)
Overall, we consider this a needlessly confusing convention, and
intentionally break with it.
Packaging libtgl separately (as per §4.13)
==========================================
No.
So far, ABI-compatibility was broken between virtually every other
commit to libtgl, and the library is still under development. The
latest "stable" release is heavily outdated and can no longer be used
productively (missing features, known breaking bugs, etc.), so if we were to
package tgl we would need to repackage it constantly, with no defined
concept of version, soname, or anything reliable. No other program
(*including* tg-cli) can be expected to use the same version of libtgl
as telegram-purple does. (This might happen every now and then, but
that would be random chance. Finally, it's highly unlikely that someone
installs and uses both telegram-purple and tg-cli.)
Packaging "tl-parser" or the intermediate "generate" program is also a
bad idea: One *could* do that, but it's only useful for libtgl. So
there is a significant lack of users.
Note that tl-parser is a relatively (in comparison to the rest of
libtgl) stable, portable application (not library). The output format
hasn't changed in a over a year. If you believe that these six files
will be used by a lot of people, I'll be happy to package tl-parser for
you. However, please note that this would require at least two
packages: tl-parser (binary), tl-parser-dev (headers), and possibly
libtl-parser (common object files).
In short: there's no set of component that could be packaged in a more
clever way.
About this document
===================
This is not written in Markdown. All formatting is in the hope of
making it easy to read.

19
debian/changelog vendored Normal file
View file

@ -0,0 +1,19 @@
telegram-purple (1.3.0-1) unstable; urgency=medium
[ Hugues Morisset ]
* Initial Release (Closes: #833793)
[ Ben Wiederhake ]
* Please note that due to the format-switch in 1.2.6, the file
/etc/telegram-purple/server.pub is obsolete for all version after it.
It is ignored to allow for smooth transition from old, manual
installations, and may be removed in future versions.
* New upstream release
- Add translations and plural support
- Fix lots of bugs around secret chats (still not perfect, though)
- Fix behavior around hibernation
- Fix display errors and false warnings
- Fix crash on 'unsupported' media
- Support supergroups and channels
-- Ben Wiederhake <Ben.Wiederhake@gmail.com> Mon, 22 Aug 2016 20:59:47 +0200

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
9

42
debian/control vendored Normal file
View file

@ -0,0 +1,42 @@
Source: telegram-purple
Section: net
Priority: optional
Maintainer: Ben Wiederhake <Ben.Wiederhake@gmail.com>
Uploaders:
Hugues Morisset <morisset.hugues@gmail.com>
Build-Depends:
autotools-dev,
debhelper (>= 9),
dh-autoreconf,
libgcrypt20-dev,
libglib2.0-dev,
libpurple-dev,
libwebp-dev,
pkg-config,
zlib1g-dev
Standards-Version: 3.9.8
Homepage: https://github.com/majn/telegram-purple
Vcs-Git: https://github.com/BenWiederhake/telegram-purple
Vcs-Browser: https://github.com/BenWiederhake/telegram-purple/tree/debian-develop
Package: telegram-purple
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends}
Suggests:
pidgin | finch
Description: Purple plugin to support Telegram
Plugin for purple which lets you use and manage your Telegram account
like any other account in purple. Some features like self-destruct
messages are currently in development.
X-Comment: Traditionally, this plugin should be named "telegram-pidgin".
However, this plugin is also designed to work with at least Adium,
Finch, and hopefully all other libpurple-frontends, so this name would
be highly misleading. Furthermore, the plugin refers to itself as
"telegram-purple", and changing this (e.g. via a patch) would be highly
non-trivial and fragile. Finally, several users know this plugin under
the name telegram-purple only, so naming the Debian package differently
would be another source of confusion. Thus we intentionally break with
this tradition, and re-used the name telegram-purple from the original
project.

102
debian/copyright vendored Normal file
View file

@ -0,0 +1,102 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pidgin-telegram
Source: https://github.com/majn/telegram-purple
Files: *
Copyright: 2014-2015 Matthias Jentsch <mtthsjntsch@gmail.com>
2014 Vitaly Valtman <mail@vysheng.ru>
2014 Christopher Althaus <althaus.christopher@gmail.com>
2014 Markus Endres <endresma45241@th-nuernberg.de>
License: GPL-2+
Files: AppStream/telegram-purple.metainfo.untranslated.xml
Copyright: 2015 Jiri Eischmann <eischmann@redhat.com>
License: GFDL-NIV
License-Grant:
<metadata_license>GFDL-1.3</metadata_license>
Files: debian/*
Copyright: 2015 Hugues Morisset <morisset.hugues@gmail.com>
2015 Ben Wiederhake <BenWiederhake.GitHub@gmail.com>
License: GPL-2+
Files: tgl/*
Copyright: 2013-2015 Vitaly Valtman <mail@vysheng.ru>
2015 Matthias Jentsch <mtthsjntsch@gmail.com>
2015 Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
License: LGPL-2.1+
Files: tgl/tl-parser/*
Copyright: 2015 Matthias Jentsch <mtthsjntsch@gmail.com>
2015 Vitaly Valtman <mail@vysheng.ru>
2015 Christopher Althaus <althaus.christopher@gmail.com>
2015 Markus Endres <endresma45241@th-nuernberg.de>
License: GPL-2+
Files: tgl/tl-parser/portable_endian.h
Copyright: 2013-2014 Mathias Panzenböck <grosser.meister.morti@gmx.net>
2015 PkmX <pkmx.tw@gmail.com>
License: BSD-3-clause or Expat or Apache-2
License-Grant:
I, Mathias Panzenböck, place this file hereby into the public domain.
Use it at your own risk for whatever you like. In case there are
jurisdictions that don't support putting things in the public domain
you can also consider it to be "dual licensed" under the BSD, MIT and
Apache licenses, if you want to. This code is trivial anyway. Consider
it an example on how to get the endian conversion functions on
different platforms.
FIXME:
This is a tag for the sole purpose and hope that one day, someone
searches for "Fixme" (possibly case-sensitive). Thus, the issue in the
following "Comment" field can be found in both the Debian archive and
the original project.
Comment:
This is a comment from the person who wrote this debian/copyright file.
.
The licensing was obviously meant to be "use whatever". However, we
have to mirror it precisely, and verbatim. I took the freedom to
interprete the terms "the MIT licenses" as "Expat"; "the BSD licenses"
as BSD 3-clause; and "the Apache licenses" as Apache 2.0. I do this
in order to keep the list reasonably small and close enough. However,
someone who understands the legal implications should take a close
look at this.
License: LGPL-2.1+
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-2.1".
License: GPL-2+
On Debian systems, the complete text of the GNU General Public License
version 2 can be found in "/usr/share/common-licenses/GPL-2".
License: BSD-3-clause
On Debian systems, the complete text of the Revised BSD License
(3-clause) can be found in "/usr/share/common-licenses/GPL-3".
License: Apache-2
On Debian systems, the complete text of version 2.0 of the Apache License
can be found in /usr/share/common-licenses/Apache-2.0.
License: GFDL-NIV
On Debian systems, the complete text of version 1.3 of the GNU Free
Document License /usr/share/common-licenses/GFDL-1.3.
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 the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1
debian/docs vendored Normal file
View file

@ -0,0 +1 @@
AUTHORS

22
debian/rules vendored Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/make -f
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
%:
dh $@ --parallel --with autoreconf
# dh_auto_clean tries to "make distclean", but we don't have that target.
override_dh_auto_clean:
test ! -e Makefile || $(MAKE) clean
## http://wiki.debian.org/onlyjob/get-orig-source
PKD := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
PKG := $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Source)
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Version | cut -d- -f1)
.PHONY: get-orig-source
get-orig-source: $(info I: $(PKG)_$(VER))
@echo "# Downloading for ${PKD}"
uscan --noconf --verbose --rename --destdir=$(CURDIR) \
--check-dirname-level=0 --force-download --download-version "$(VER)" $(PKD)

1
debian/source/format vendored Normal file
View file

@ -0,0 +1 @@
3.0 (quilt)

1
debian/source/options vendored Normal file
View file

@ -0,0 +1 @@
extend-diff-ignore = "(^|/)(config\.(h|log|status)|Makefile)$"

21
debian/upstream/metadata vendored Normal file
View file

@ -0,0 +1,21 @@
Bug-Database: https://github.com/majn/telegram-purple/issues/
Bug-Submit: https://github.com/majn/telegram-purple/issues/new
#Cite-As: <a href="https://github.com/majn/telegram-purple">telegram-purple</ a>
## Intentionally left out, to make sure that we don't accidentally break someone's
## workflow. We err on the side of not prescribing anyone how to cite this work.
#Changelog: https://github.com/majn/telegram-purple/blob/master/CHANGELOG.md
## Intentionally left out as it's already outdated at the time of writing.
Contact: https://goo.gl/QHttTR
## The development chat group.
#Donation: See 'Contact'
#FAQ: https://github.com/majn/telegram-purple/#faq
## Intentionally left out: no real content yet.
Name: telegram-purple
## Might be superfluous, but I want to confirm that the upstream name is
## indeed telegram-purple, hence the package name in Debian.
Repository: https://github.com/majn/telegram-purple/
Repository-Browse: https://github.com/majn/telegram-purple/
Security-Contact:
Main developer: Matthias Jentch <mtthsjntsch AT gmail DOT com>
Debian packager: Ben Wiederhake <Ben DOT Wiederhake AT gmail DOT com>
Development channel (public): https://goo.gl/QHttTR

17
debian/watch vendored Normal file
View file

@ -0,0 +1,17 @@
version=4
opts="\
downloadurlmangle=s/tag\/v(.*)$/download\/v$1\/telegram-purple_$1.orig.tar.gz/,\
filenamemangle=s/.*tag\/v(.*)$/telegram-purple_$1.orig.tar.gz/,\
uversionmangle=s/-(beta\d*)$/~$1/,\
" \
https://github.com/majn/telegram-purple/releases \
/tag/v([\d\.]*(?:-beta\d*)?) \
debian \
uupdate
# Rationales (from bottom up):
# - There will always be tags of the style "v1.2.5", so search for that
# - The "beta" group must be non-capturing, otherwise uscan tries to concatenate them (e.g. "1.2.3-beta.-beta")
# - Github tars are unusable; use the (hopefully attached) origtar
# - Beta-releases should be ordered before the "main" release (was never relevant so far)
# - Spacing in order to have exactly one rule per line