Example #1
0
    def __init__(self, build_py = 'build.py', verbose = False, debug = False):
        ScopedFileBase.__init__(self, self.rules_file)
        self.verbose = verbose
        self.debug = debug
        self.python_executable = sys.executable
        self.__targets = {}
        self.dh_options = []
        self.build_py = build_py
        self.build_args = '--called-by-packager --noconfig'
        if verbose:
            self.build_args += ' -v'
        if debug:
            self.build_args += ' -d'

        self.target_set('override_dh_auto_configure', '@$(PYTHON) {build_py} configure {build_args} --prefix=/usr --install-destdir=$(TMP)')
        self.target_set('override_dh_auto_build', '@$(PYTHON) {build_py} {build_args} build')
        self.target_set('override_dh_auto_clean', '@$(PYTHON) {build_py} {build_args} distclean')
        self.target_set('override_dh_auto_install', '@$(PYTHON) {build_py} {build_args} install')
        self.target_set('override_dh_auto_test', '@if $(PYTHON) {build_py} {build_args} has command test; then $(PYTHON) {build_py} {build_args} test; fi')

        try:
            self.__debug_packages = DebianControl().debug_packages
        except (IOError, KeyError):
            self.__debug_packages = []

        if self.__debug_packages:
            for pkg in self.__debug_packages:
                self.target_append('override_dh_strip', 'dh_strip -p{0} --dbg-package={1}\n'.format(re.sub('-dbg$', '', pkg), pkg))
        else:
            self.target_set('override_dh_strip', '@echo "NOT stripping binaries"')
Example #2
0
 def __init__(self, package, uid=None, gid=None, dir=None, svc=None):
     ScopedFileBase.__init__(self, 'debian/{0}.postrm'.format(package))
     self.__pkg = package
     self.__uid = uid or []
     self.__gid = gid or []
     self.__dir = dir or []
     self.__svc = svc or []
Example #3
0
 def __init__(self, package, uid = None, gid = None, dir = None, svc = None):
     ScopedFileBase.__init__(self, 'debian/{0}.postrm'.format(package))
     self.__pkg = package
     self.__uid = uid or []
     self.__gid = gid or []
     self.__dir = dir or []
     self.__svc = svc or []
Example #4
0
    def __init__(self, build_py='build.py', verbose=False, debug=False):
        ScopedFileBase.__init__(self, self.rules_file)
        self.verbose = verbose
        self.debug = debug
        self.python_executable = sys.executable
        self.__targets = {}
        self.dh_options = []
        self.build_py = build_py
        self.build_args = '--called-by-packager --noconfig'
        if verbose:
            self.build_args += ' -v'
        if debug:
            self.build_args += ' -d'

        self.target_set(
            'override_dh_auto_configure',
            '@$(PYTHON) {build_py} configure {build_args} --prefix=/usr --install-destdir=$(TMP)'
        )
        self.target_set('override_dh_auto_build',
                        '@$(PYTHON) {build_py} {build_args} build')
        self.target_set('override_dh_auto_clean',
                        '@$(PYTHON) {build_py} {build_args} distclean')
        self.target_set('override_dh_auto_install',
                        '@$(PYTHON) {build_py} {build_args} install')
        self.target_set(
            'override_dh_auto_test',
            '@if $(PYTHON) {build_py} {build_args} has command test; then $(PYTHON) {build_py} {build_args} test; fi'
        )

        try:
            self.__debug_packages = DebianControl().debug_packages
        except (IOError, KeyError):
            self.__debug_packages = []

        if self.__debug_packages:
            for pkg in self.__debug_packages:
                self.target_append(
                    'override_dh_strip',
                    'dh_strip -p{0} --dbg-package={1}\n'.format(
                        re.sub('-dbg$', '', pkg), pkg))
        else:
            self.target_set('override_dh_strip',
                            '@echo "NOT stripping binaries"')
Example #5
0
 def __init__(self):
     ScopedFileBase.__init__(self, self.options_file)
Example #6
0
 def __init__(self, compat='7'):
     ScopedFileBase.__init__(self, self.compat_file)
     self.__compat = compat
Example #7
0
 def __init__(self):
     ScopedFileBase.__init__(self, self.options_file)
Example #8
0
 def __init__(self, compat = '7'):
     ScopedFileBase.__init__(self, self.compat_file)
     self.__compat = compat