~ubuntu-branches/ubuntu/wily/scribus/wily-proposed

« back to all changes in this revision

Viewing changes to OSX-package/linktools/ingest.py

  • Committer: Package Import Robot
  • Author(s): Oleksandr Moskalenko
  • Date: 2012-02-09 21:50:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120209215056-2wrx1ara0jbm7fi5
Tags: 1.4.0.dfsg+r17287-1
* New upstream stable release upload into Debian (Closes: #654703).
* Applied the Ubuntu armel patch.
* Removed non-free color swatches from resources.
* debian/control:
  - Moved icc-profiles from Recommends to Suggests (Closes: #655885).
  - Updated Standards-Version to 3.9.2.
  - Updated extended description per lintian warning.
* debian/rules:
  - Update mailcap (Closes: #630751). A request for mime.types update has
    been sent to the mime-support maintainer.
  - Added build-arch and build-indep targets per lintian warning.
* debian/patches:
  - top_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't install the non-free "doc" dir.
  - profiles_cmakelists.patch - don't install non-free sRGB profile.
* debian/copyright: 
  - Converted to the DEP5 machine readable foramt.
  - Added licenses for free color swatches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
import os
 
4
import sys
 
5
import osxtools
 
6
 
 
7
def usage():
 
8
        print """
 
9
 Usage: ingest.py bundle [-x lib] [-s fw]
 
10
 
 
11
        Copies all dependent libraries and frameworks into the app bundle.
 
12
        System libraries (/usr/lib*, /System/Library) are not copied.
 
13
        Fixes the dependencies in all executabels contained in bundle.
 
14
        
 
15
        bundle: the path to the *.app bundle
 
16
        -x lib: dont move lib into the bundle. 
 
17
        -s fw:  only move the referenced libarry file from framework fw 
 
18
                        into the bundle, not the complete framework
 
19
        """
 
20
 
 
21
 
 
22
if len(sys.argv) <= 1 or sys.argv[1] == "-?" :
 
23
        usage()
 
24
        sys.exit(0)
 
25
 
 
26
 
 
27
 
 
28
exceptions = []
 
29
strippedfws = []
 
30
bundle = None
 
31
 
 
32
argp = 1
 
33
 
 
34
while argp < len(sys.argv) :
 
35
        if sys.argv[argp] == '-x' :
 
36
                exceptions.append(sys.argv[argp + 1])
 
37
                argp = argp + 2
 
38
        elif sys.argv[argp][0:2] == '-x' :
 
39
                exceptions.append(sys.argv[argp][2:])
 
40
                argp = argp + 1
 
41
        elif sys.argv[argp] == '-s' :
 
42
                strippedfws.append(sys.argv[argp + 1])
 
43
                argp = argp + 2
 
44
        elif  sys.argv[argp][0:2] == '-s' :
 
45
                strippedfws.append(sys.argv[argp][2:])
 
46
                argp = argp + 1
 
47
        elif  sys.argv[argp][0:1] == '-' :
 
48
                print "Error: unknown option: " + sys.argv[argp]
 
49
                usage()
 
50
                sys.exit(1)
 
51
        elif bundle == None:
 
52
                bundle = sys.argv[argp]
 
53
                argp = argp + 1
 
54
        else:
 
55
                print "Error: more than one bundle path specified!"
 
56
                usage()
 
57
                sys.exit(1)
 
58
 
 
59
if bundle == None:      
 
60
        print "Error: no bundle path specified!"
 
61
        usage()
 
62
        sys.exit(1)
 
63
 
 
64
if not os.path.isabs(bundle):
 
65
        bundle = os.path.join(os.getenv("PWD"), bundle)
 
66
        
 
67
if not os.path.isdir(bundle):
 
68
        print "Error: '" + bundle + "' is no bundle path!"
 
69
        usage()
 
70
        sys.exit(1)
 
71
 
 
72
osxtools.ingest(bundle, exceptions, strippedfws)