Skip to content

Instantly share code, notes, and snippets.

@legnaleurc
Created November 8, 2011 16:54
Show Gist options
  • Save legnaleurc/1348347 to your computer and use it in GitHub Desktop.
Save legnaleurc/1348347 to your computer and use it in GitHub Desktop.
kdesrc-curses

kdesrc-curses

Idea for homebrew-like kdesrc-build, I'll call it kdesrc-curses

Concepts

  • Scriptable: new program or module should be easily add. Simply add a new file and inherit some classes.
  • Dependencies: handling dependencies and remember it.
    • Build-Depends: build-time dependency, could remove after installed
    • Depends: won't run without this
    • Recommends: could run without this, but very useless
    • Suggests: will enhances with this
    • Provides: a common name, to let other package abstract them. e.g. kate and kwrite provides text-editor, so other package need not to hard-code kate or kwrite, just use text-editor
  • Source: dependencies could come from a source tree or package repository
  • Interface: Like aptitude, ncurses-based, tree view, so you can tune configure options and select them

:
class Formula:
repo : Repository def patches()[pure] def build()[pure] def install()[pure]
class Repository:
def fetch( local_path )[pure]
class GitRepository( Repository ):
def __init__( repo, branch ):
self.repo = repo self.branch = branch
def fetch( local_path ):
os.pushd( local_path ) # clone or merge or rebase. os.popd()
class SubVersionRepository( Repository ):
pass
class PreBuiltRepository( Repository ):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment