+++ /dev/null
-#
-# e2factory, the emlix embedded build system
-#
-# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
-# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
-# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
-# For more information have a look at http://www.e2factory.org
-#
-# e2factory is a registered trademark by emlix GmbH.
-#
-# This file is part of e2factory, the emlix embedded build system.
-#
-# e2factory is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-TOPLEVEL = ..
-
-include $(TOPLEVEL)/make.vars
-
-CLEAN_FILES = *~ *.so
-
-DOWNLOAD = http://www.e2factory.org/source/example
-E2FACTORY_GIT = http://git.e2factory.org/git/e2factory/e2factory.git
-
-E2_CONFIG = /etc/e2/e2.conf.sample
-export E2_CONFIG
-
-CHROOTDIR = $(LOCALSTATEDIR)/chroot
-RESULTSDIR = $(LOCALSTATEDIR)/results
-RELEASESDIR = $(LOCALSTATEDIR)/releases
-PROJECTSDIR = $(LOCALSTATEDIR)/projects
-UPSTREAMDIR = $(LOCALSTATEDIR)/upstream
-
-ifneq ($(E2_LOCAL_BRANCH),)
- E2_LOCAL_BRANCH_ENV = E2_LOCAL_BRANCH=$(E2_LOCAL_BRANCH)
-endif
-ifneq ($(E2_LOCAL_TAG),)
- E2_LOCAL_TAG_ENV = E2_LOCAL_TAG=$(E2_LOCAL_TAG)
-endif
-ifneq ($(E2_CONFIG),)
- E2_CONFIG_ENV = E2_CONFIG=$(E2_CONFIG)
-endif
-
-default: example
-
-clean:
- rm -fr e2factory-example
- rm -fr e2factory.git
- rm -fr base.tar.gz
- rm -f $(CLEAN_FILES)
-
-base.tar.gz:
- wget $(DOWNLOAD)/base.tar.gz
-
-e2factory.git:
- git clone $(E2FACTORY_GIT) e2factory.git
-
-fetch: base.tar.gz e2factory.git
-
-install_example: fetch
- for d in $(CHROOTDIR) $(RESULTSDIR) $(RELEASESDIR) $(PROJECTSDIR) \
- $(UPSTREAMDIR) ; do \
- install -d -m 2775 -g ebs $$d ;\
- done
- install -m 644 base.tar.gz $(CHROOTDIR)/
- cp -r e2factory.git $(PROJECTSDIR)/
- # need 'env -i' here to avoid environment going from this build
- # process to the local build inside e2-fetch-project.
- env -i \
- PATH=$(PATH) \
- $(E2_CONFIG_ENV) \
- HOME=$(HOME) \
- USER=$(USER) \
- $(E2_LOCAL_BRANCH_ENV) \
- $(E2_LOCAL_TAG_ENV) \
- ./setup_example.sh
-
-uninstall_example:
- rm -fr $(PROJECTSDIR)/e2factory-example
- rm -fr $(PROJECTSDIR)/e2factory.git
- rm -f $(CHROOTDIR)/base.tar.gz
-
-.PHONY: example install_example uninstall_example
+++ /dev/null
-The example/ subdirectory includes an example project configuration.
-
-You can easily set up the example project by running
-
- $ make fetch
-
-to fetch files required to setup the example and
-
- $ make install_example
-
-to install files required for the the example project to your server
-environment and setup the example project.
-If you change the LOCALSTATEDIR setting in your e2factory build make sure
-you use the same setting here.
-
-Finally you can checkout the project
-
- $ e2-fetch-project e2factory-example
- $ cd e2factory-example
-
-and use it...
-
- $ e2-ls-project
- $ e2-fetch-sources
- $ e2-build
+++ /dev/null
--- e2 factory chroot configuration file --
-local cp = "sample/"
-e2chroot {
- default_groups = {
- "base",
- },
- groups = {
- {
- name = "base",
- server = "chroot",
- files = {
- {
- location = cp.."base.tar.gz",
- sha1 = "284e7e9b03cf4e0343d509f564a1b2124933533d",
- },
- },
- },
- },
-}
+++ /dev/null
--- e2 factory project configuration file --
-
-e2project {
- name = "e2factory-example",
- release_id = "e2factory-example",
- default_results = { "final", },
- deploy_results = {
- },
- chroot_arch = "x86_32",
-}
+++ /dev/null
--- e2 factory environment configuration file --
-env {
- -- global variables
- -- key = "val",
-
- -- result specific variables (only available in <result>)
- -- <result> = {
- -- key = "val",
- -- },
-}
+++ /dev/null
--- e2 factory licence configuration file --
-e2licence {
-}
+++ /dev/null
-# e2 factory build script template
-#
-# The build system provides the following variables for use in build scripts:
-# - TMPDIR pointing to a temporary directory with a directory structure
-# - RESULT the name of the result currently building
-# - BUILD_NUMBER the build number, 0 by default
-#
-# Additional variables can be provided in init files.
-# Variables are not exported unless the init files do.
-#
-# The following directory structure is available, relative to TMPDIR
-#
-# ./build/<sourcename> sources are located here
-# ./root shall be used as the destination directory when
-# installing software for packaging
-# ./env files containing environment variables are located here
-# ./init init scripts are located here
-# ./script this directory holds the build driver and the build
-# script
-# ./in This directory is available but unused
-# ./dep/<dependency> These directories hold result files from dependency
-# results
-# ./out Files that are left here are packaged into the result
-# finally.
-#
-
-# simple example: just extract and repackage everything
-find /
-tar -C ${E2_TMPDIR}/root -xzvf ${E2_TMPDIR}/dep/helloworld/helloworld.tar.gz
-tar -C ${E2_TMPDIR}/root -czvf ${E2_TMPDIR}/out/${E2_RESULT}.tar.gz .
+++ /dev/null
--- e2 factory result configuration template --
-
-e2result {
- -- a list of sources
- sources = { },
- -- a list of dependencies
- depends = { "helloworld", },
- -- a list of chroot groups
- chroot = { },
- -- use the collect_project feature for this result?
- collect_project = false,
- -- collect_project_default_result = "<result>",
-}
+++ /dev/null
-# e2 factory build script template
-#
-# The build system provides the following variables for use in build scripts:
-# - TMPDIR pointing to a temporary directory with a directory structure
-# - RESULT the name of the result currently building
-# - BUILD_NUMBER the build number, 0 by default
-#
-# Additional variables can be provided in init files.
-# Variables are not exported unless the init files do.
-#
-# The following directory structure is available, relative to TMPDIR
-#
-# ./build/<sourcename> sources are located here
-# ./root shall be used as the destination directory when
-# installing software for packaging
-# ./env files containing environment variables are located here
-# ./init init scripts are located here
-# ./script this directory holds the build driver and the build
-# script
-# ./in This directory is available but unused
-# ./dep/<dependency> These directories hold result files from dependency
-# results
-# ./out Files that are left here are packaged into the result
-# finally.
-#
-cd helloworld
-make hello
-install -d ${E2_TMPDIR}/root/bin
-install -m 755 hello ${E2_TMPDIR}/root/bin/hello
-tar -C ${E2_TMPDIR}/root -czvf ${E2_TMPDIR}/out/helloworld.tar.gz .
+++ /dev/null
--- e2 factory result configuration template --
-
-e2result {
- -- a list of sources
- sources = { "helloworld", },
- -- a list of dependencies
- depends = { },
- -- a list of chroot groups
- chroot = { },
- -- use the collect_project feature for this result?
- collect_project = false,
- -- collect_project_default_result = "<result>",
-}
+++ /dev/null
--- -*- Lua -*-
-
-e2source {
- -- the source name
- -- (is derived from the config file path if only one source is
- -- specified per file)
- name = "helloworld",
- -- the source type
- type = "git",
- -- a list of licences from proj/licences
- licences = { },
- -- git specific attributes
- -- server name
- server = "proj-storage",
- -- the repository location relative to the server
- location = "git/helloworld.git",
- -- git branch name
- branch = "master",
- -- git tag names, the first one is used for building
- tag = "helloworld-0.1",
-}
+++ /dev/null
-#!/bin/bash
-set -e
-
-E=e2factory-example
-rm -fr $E
-
-e2-create-project $E
-e2-fetch-project $E
-
-# merge the example project into the new project
-tar -C example -cf - . | tar -C $E -xf -
-
-pushd $E
-git add .
-git commit -m 'configure example project'
-git push
-e2-new-source --git helloworld
-
-pushd in/helloworld
-cat >hello.sh <<EOF
-#!/bin/bash
-echo "Hello World!"
-EOF
-git add hello.sh
-git commit -m 'hello world script'
-git push origin master
-git tag helloworld-0.1
-git push --tags
-popd
-popd
-
-rm -fr $E