Craft/Blueprints

Note
This page is work in progress. Please help to make it more useful!


Adding New Blueprints

Blueprints are stored in separate repositories. At the moment there are these repositories:


To navigate to this repository on your local file system:

cs craft-blueprints-kde

If you want to add a new blueprint first of all you have to choose the right location (e.g. kde apps are located in the kde folder.

Warning
The name of the package folder needs to match the blueprint name. An example would be kdegraphics-mobipocket\kdegraphics-mobipocket.py


Structure

import info

class subinfo(info.infoclass):
    # TODO
    def setDependencies( self ):
        # Defines the blueprints this blueprint depends on
    def setTargets(self):
        # TODO

from Package.CMakePackageBase import * # The package base

class Package(CMakePackageBase):
    # TODO
    def __init__(self):
        # TODO

Dependencies

TODO

Package Base

See https://invent.kde.org/packaging/craft/-/tree/master/bin/Package for available package bases

Howto

Apply Patches

TODO

Check for Compiler/OS

If you want to run a command based on the current environment you can use CraftCore.compiler

if CraftCore.compiler.isWindows:
    # do something only on windows
if not CraftCore.compiler.isGCC:
    # don't do something with GCC

Take a look at https://invent.kde.org/packaging/craft/-/blob/master/bin/CraftCompiler.py to see all available options


This page was last edited on 20 March 2021, at 15:31. Content is available under Creative Commons License SA 4.0 unless otherwise noted.