Last edition : 4 years ago
Configuration of a package
Only the name of the package is mandatory. But all this attributes are available :
All this attributes can be available via the instance 'p', or can be passed as named arguments in the constructor.
Associate files in a package
Once the instance is created, you must associate files in the package, like that :
'p' acts like a dict, where the keys are the destination folder, and the values : a list of existing files (files! and not folders) in the execution path. Files can be defined as relative or absolute path, but it's not possible to define relative path which contains some ".." tricks. Each file can be renamed with the 'pipe trick', like that :
See more examples
Generation of a package
Simply call the generate() method which is defined like that :
Only the version is mandatory. But you can pass the changelog to be included in the package here. Put rpm at True if you want a rpm package too (which will simply use 'alien' to convert the deb to rpm). Put src at True if you want a "source package" (source package is a tar.gz "debian source package" which contains a 'debian folder', and can be used to recreate a deb from scratch)
Note that you can't generate a package if you hadn't files in !
Test of a package
At anytime you can see informations about your configuration by simply printing p like that :
Which will display all configuration informations and all included files.
Note it's not a real test, it just try to display what it will try to generate. The generation process can fail if you miss config your files or your informations.