-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmake-deb.py
85 lines (70 loc) · 2.81 KB
/
make-deb.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
#
# ZopeEdit, client for ExternalEditor
#
# zopeedit.deb package creator
#
# Install collective.zopeedit as a python lib
# and create a launcher that calls zopeedit.main()
#
##############################################################################
from glob import glob
from py2deb import *
import os
opj = os.path.join
# Open the VERSION file for reading.
f = open("docs/VERSION.txt", "r")
# Below, "[:-1]" means we omit the last character, which is "\n".
version = f.readline()[:-1]
f.close
os.system("gzip collective/zopeedit/man/zopeedit.1")
changelog = open("docs/HISTORY.txt", "r").read()
p = Py2deb("collective.zopeedit")
p.author = "Thierry Benita - atReal"
p.mail = "[email protected]"
p.description = """ZopeEdit is a Zope ExternalEditor client."""
p.url = "http://svn.plone.org/svn/collective/collective.zopeedit/"
p.depends = "bash, psmisc, python2.6, python-tk"
p.license = "gpl"
p.section = "utils"
p.arch = "all"
p.preremove = "collective/zopeedit/posix/preremove.sh"
p["/usr/share/app-install/desktop"] = [
"collective/zopeedit/posix/zopeedit.desktop|zopeedit.desktop"
]
p["/usr/share/applications"] = [
"collective/zopeedit/posix/zopeedit.desktop|zopeedit.desktop"
]
p["/usr/share/app-install/icons"] = [
"collective/zopeedit/posix/zopeedit.svg|zopeedit.svg"
]
p["/usr/share/pixmaps"] = ["collective/zopeedit/posix/zopeedit.svg|zopeedit.svg"]
p["/usr/share/man/man1"] = ["collective/zopeedit/man/zopeedit.1.gz|zopeedit.1.gz"]
p["/usr/share/mime/application"] = [
"collective/zopeedit/posix/x-zope-edit-zem.xml|x-zope-edit-zem.xml"
]
p["/usr/lib/python2.6/dist-packages"] = [
"collective/zopeedit/posix/collective.zopeedit.pth|collective.zopeedit.pth"
]
p["/usr/lib/python2.6/dist-packages/collective.zopeedit/collective"] = [
"collective/__init__.py|__init__.py"
]
p["/usr/lib/python2.6/dist-packages/collective.zopeedit/collective/zopeedit"] = [
"collective/zopeedit/zopeedit.py|zopeedit.py",
"collective/zopeedit/__init__.py|__init__.py",
]
p[
"/usr/lib/python2.6/dist-packages/collective.zopeedit/collective/zopeedit/locales"
] = [i + "|" + i[28:] for i in glob("collective/zopeedit/locales/*/*/zopeedit.mo")]
p[
"/usr/lib/python2.6/dist-packages/collective.zopeedit/collective/zopeedit/Plugins"
] = [i + "|" + i[28:] for i in glob("collective/zopeedit/Plugins/*.py")]
p["/usr/lib/python2.6/dist-packages/collective.zopeedit/collective/zopeedit/docs"] = [
i + "|" + i[5:] for i in glob("docs/*.txt")
]
p["/usr/bin"] = ["collective/zopeedit/posix/zopeedit_launcher.py|zopeedit"]
p["/usr/share/doc/zopeedit"] = [i + "|" + i[5:] for i in glob("docs/*")]
p.generate(version, changelog, rpm=True, src=True)
os.system("gunzip collective/zopeedit/man/zopeedit.1.gz")