Skip to content

Instantly share code, notes, and snippets.

@kergoth
Created September 5, 2008 20:29
Show Gist options
  • Save kergoth/9019 to your computer and use it in GitHub Desktop.
Save kergoth/9019 to your computer and use it in GitHub Desktop.
Musing on potential alternative bitbake file formats
LICENSE = "GPL"
DESCRIPTION = "procfs tools"
SECTION = "base"
PRIORITY = "required"
DEPENDS = "ncurses virtual/libintl"
SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
file://libintl-link.patch;patch=1"
S = "${WORKDIR}/psmisc-${PV}"
inherit autotools gettext
ALLOW_EMPTY = "1"
PACKAGES = "${PN} \
fuser-dbg fuser fuser-doc \
killall-dbg killall killall-doc \
pstree-dbg pstree pstree-doc"
FILES_${PN} = ""
RDEPENDS_${PN} = "fuser killall pstree"
FILES_fuser = "${bindir}/fuser.${PN}"
FILES_fuser-doc = "${mandir}/man1/fuser*"
FILES_fuser-dbg = "${bindir}/.debug/fuser"
FILES_killall = "${bindir}/killall.${PN}"
FILES_killall-doc = "${mandir}/man1/killall*"
FILES_killall-dbg = "${bindir}/.debug/killall*"
FILES_pstree = "${bindir}/pstree"
FILES_pstree-doc = "${mandir}/man1/pstree*"
FILES_pstree-dbg = "${bindir}/.debug/pstree"
do_install_append() {
mv ${D}${bindir}/killall ${D}${bindir}/killall.${PN}
mv ${D}${bindir}/fuser ${D}${bindir}/fuser.${PN}
}
pkg_postinst_killall() {
update-alternatives --install ${bindir}/killall killall killall.${PN} 90
}
pkg_postrm_killall() {
update-alternatives --remove ${bindir}/killall killall.${PN}
}
pkg_postinst_fuser() {
update-alternatives --install ${bindir}/fuser fuser fuser.${PN} 90
}
pkg_postrm_fuser() {
update-alternatives --remove ${bindir}/fuser fuser.${PN}
}
# Toying around with ideas for alternative syntaxes for a bitbake style tool
# designed just for builds within a source tree.
Depends: virtual/libintl somepackage[if config.get.withsomepackage]
Summary: procfs tools
License: GPL
Mailing List: [email protected]
Project Maintainer: John Doe <[email protected]>
Description:
procfs provides a number of tools which use the linux proc filesystem.
Deploy Artifacts:
src/.libs/pstree [system dep:plugin dep:src/.libs/pshelper]
man/pstree.5 [manpage for:src/.libs/pstree]
src/.libs/pshelper [path:libexec]
# need to mark these so the deployment will know where to put them
# so the main binary will be able to find them
# 'group' = package local collections
plugins/.libs/aplugin.so [group:plugin path:pkglibpath] # /usr/lib/pstree/
plugins/.libs/bplugin.so [group:plugin]
plugins/.libs/cplugin.so [group:plugin]
Configuration Parameters:
# Variable which automatically flows to the autoconf --with- option
config.define withsomepackage, type = bool, flag += autoconf
# Multiple choice field for user config
config.define featureset, type = multi<string>, "huge", "tiny", "normal"
config.define plugins, type = path
# No split of configure/compile
# No staging/install, the build produces artifacts, there are
# fields which can control which artifacts should be deployed,
# otherwise it tries to figure it out.
# Files can have attributes / key/value pairs.
# Attributes for documentation, inter-file relationships,
# sbin vs bin, etc. (Conary's idea)
# Rules defined in a DSL, probably Boo based
# autotools addin knows how to apply user configuration parameters for paths,
# flags, toolchain, etc to the build
Inherit: autotools gettext
Build Rules:
compile.native src/buildtool.c
autotools.configure
autotools.compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment