2016-09-01 19:30:21 +02:00
|
|
|
$NetBSD: patch-setup.py,v 1.2 2016/09/01 17:30:21 wiz Exp $
|
2015-10-03 18:28:55 +02:00
|
|
|
|
|
|
|
Avoid calling git.
|
2016-09-01 19:30:21 +02:00
|
|
|
Install man page in proper directory for pkgsrc.
|
2015-10-03 18:28:55 +02:00
|
|
|
|
2016-09-01 19:30:21 +02:00
|
|
|
--- setup.py.orig 2016-08-29 04:05:55.000000000 +0000
|
2015-10-03 18:28:55 +02:00
|
|
|
+++ setup.py
|
2016-09-01 19:30:21 +02:00
|
|
|
@@ -12,13 +12,6 @@ def get_version():
|
2015-10-03 18:28:55 +02:00
|
|
|
Returns current package version using git-describe or examining
|
|
|
|
path. If both methods fails, returns 'unknown'.
|
|
|
|
"""
|
|
|
|
- try:
|
|
|
|
- p = Popen(['git', 'describe', '--tags', '--match', 'v*'], stdout=PIPE)
|
|
|
|
- version = p.communicate()[0].strip("\n\r \t")
|
|
|
|
- if p.returncode != 0:
|
|
|
|
- raise Exception("git-describe failed")
|
|
|
|
- return version
|
|
|
|
- except: pass
|
|
|
|
# Git-describe method failed, try to guess from working directory name
|
|
|
|
path = os.getcwd().split(os.path.sep)
|
|
|
|
version = 'unknown'
|
2016-09-01 19:30:21 +02:00
|
|
|
@@ -82,7 +75,7 @@ if __name__ == "__main__" :
|
|
|
|
"icons/%s.png" % x for x in (
|
|
|
|
'restart', 'settings', 'shutdown', "st-gtk-logo"
|
|
|
|
)]),
|
|
|
|
- ('share/man/man1', glob.glob("doc/*") ),
|
|
|
|
+ (os.environ['PKGMANDIR'] + '/man1', glob.glob("doc/*") ),
|
|
|
|
('share/icons/hicolor/64x64/emblems', glob.glob("icons/emblem-*.png") ),
|
|
|
|
('share/pixmaps', ["icons/syncthing-gtk.png"]),
|
|
|
|
('share/applications', ['syncthing-gtk.desktop'] ),
|