summaryrefslogtreecommitdiffstats
path: root/setup.py
blob: b3bfe9b6728f4d73e2d512c409b42de450ebbeb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from distutils.core import setup
from distutils.command.build import build
import os, glob

class BuildQm(build):    
  for po in glob.glob('po/*.po'):
    os.system('lconvert {} -o i18n/mageiawelcome_{}.ts'.format(po, os.path.splitext(os.path.basename(po))[0]))
  for ts in glob.glob('i18n/*.ts'):
    os.system('lrelease {0} -qm {1}'.format(ts, (ts[:-2]+'qm')))
  os.system("rm -f i18n/*.ts")
  os.system('msgfmt --desktop --template=usr/share/applications/template_mageiawelcome.desktop -d po -o usr/share/applications/mageiawelcome.desktop')


data_files = [("bin",["usr/bin/mageiawelcome","usr/bin/mageiawelcome-launcher"]),
              ("share/applications/", ["usr/share/applications/mageiawelcome.desktop"]),
              ("share/icons/hicolor/scalable/apps/", ["qml/icons/scalable/apps/mageiawelcome.svg"]),
              ("share/mageiawelcome/",glob.glob('qml/*.py')),
              ("share/mageiawelcome/",glob.glob('qml/*.qml')),
              ("share/mageiawelcome/img",glob.glob('qml/img/*.png')),
	      ("share/mageiawelcome/translations/",glob.glob('i18n/*.qm')),
              ("/etc/xdg/autostart/",["etc/xdg/autostart/mageiawelcome.desktop"]),
              ]

setup(
        name = 'mageiawelcome',
        version = '1.92',
        license = 'GNU General Public License v3 (GPLv3)',
        url = 'http://gitweb.mageia.org/software/mageiawelcome',
        description = 'Welcome Screen shows important information of the Mageia distribution.',
        platforms = ['Linux'],
        author = 'Daniel Napora',
        author_email = 'napcok@gmail.com',
        data_files = data_files,
        cmdclass = {'build_qm': BuildQm,},
        )