[UI] Add an appdata.xml file

For Linux software gallery integration.
This commit is contained in:
Matthias Mailänder 2017-02-07 20:18:09 +01:00 committed by Calum Lind
parent f2b77c8635
commit 3529036f55
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>deluge.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<translation type="gettext">deluge</translation>
<name>Deluge BitTorrent Client</name>
<developer_name>Deluge Team</developer_name>
<summary>Deluge is a lightweight, Free Software, cross-platform BitTorrent client.</summary>
<url type="homepage">http://www.deluge-torrent.org/</url>
<url type="bugtracker">http://dev.deluge-torrent.org</url>
<description>
<_p>Deluge contains the common features to BitTorrent clients such as Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent speed limits. As Deluge heavily utilises the libtorrent library it has a comprehensive list of the features provided.</_p>
<_p>Deluge has been designed to run as both a normal standalone desktop application and as a client-server. In Thinclient mode a Deluge daemon handles all the BitTorrent activity and is able to run on headless machines with the user-interfaces connecting remotely from any other platform.</_p>
</description>
<screenshots>
<screenshot type="default">
<image>https://upload.wikimedia.org/wikipedia/commons/5/50/Deluge-torrent.png</image>
</screenshot>
</screenshots>
</component>

View File

@ -43,6 +43,7 @@ def osx_check():
desktop_data = 'deluge/ui/data/share/applications/deluge.desktop'
appdata_data = 'deluge/ui/data/share/appdata/deluge.appdata.xml'
# Variables for setuptools.setup
_packages = find_packages(exclude=['plugins', 'docs', 'tests'])
@ -189,6 +190,13 @@ class BuildTranslations(cmd.Command):
os.system('C_ALL=C ' + '%s ' * 5 % (intltool_merge, intltool_merge_opts,
po_dir, desktop_in, desktop_data))
# creates the translated appdata.xml file
intltool_merge_opts = '--utf8 --quiet --xml-style'
appdata_in = 'deluge/ui/data/share/appdata/deluge.appdata.xml.in'
print('Creating appdata.xml file: %s' % appdata_data)
os.system('C_ALL=C ' + '%s ' * 5 % (intltool_merge, intltool_merge_opts,
po_dir, appdata_in, appdata_data))
print('Compiling po files from %s...' % po_dir)
for path, names, filenames in os.walk(po_dir):
for f in filenames:
@ -234,6 +242,9 @@ class CleanTranslations(cmd.Command):
if os.path.isfile(desktop_data):
print('Deleting %s' % desktop_data)
os.remove(desktop_data)
if os.path.isfile(appdata_data):
print('Deleting %s' % appdata_data)
os.remove(appdata_data)
class BuildPlugins(cmd.Command):
@ -415,6 +426,8 @@ if not windows_check() and not osx_check():
'docs/man/deluge-console.1'])])
if os.path.isfile(desktop_data):
_data_files.append(('share/applications', [desktop_data]))
if os.path.isfile(appdata_data):
_data_files.append(('share/appdata', [appdata_data]))
_entry_points['console_scripts'] = [
'deluge-console = deluge.ui.console:start',