class BinaryPackageRecipe(PackageRecipe):
name = 'binarypackage'
version = '1.0'
archive = None
def unpack(r):
"""
Hook for unpacking the archive; works by default only if
r.archive has been set in the subclass. Each subclass needs
to either define the r.archive string along with r.name
and r.version, or it needs to implement its own r.unpack()
method.
"""
if not r.archive:
raise BinaryPackageError('Define either the r.archive string'
' or the r.unpack() method')
r.addArchive(r.archive, dir='/')