summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <nashif@download.meego.com>2011-01-26 09:37:47 -0800
committerAnas Nashif <nashif@download.meego.com>2011-01-26 09:37:47 -0800
commitc33fbfe22f4fdcaba7ef5c5b1158e5e5eee90ad1 (patch)
treec655f0a06566bb2c8bb82ea6dd10daa64481e1f5
parentc61fe3db1b59e3bf92a0d9b3515b0cbac5c970ac (diff)
downloadkickstarter-c33fbfe22f4fdcaba7ef5c5b1158e5e5eee90ad1.tar.gz
kickstarter-c33fbfe22f4fdcaba7ef5c5b1158e5e5eee90ad1.tar.bz2
kickstarter-c33fbfe22f4fdcaba7ef5c5b1158e5e5eee90ad1.zip
reorg files
-rw-r--r--Makefile6
-rw-r--r--kickstarter.spec5
-rw-r--r--kickstarter/Makefile20
-rw-r--r--kickstarter/kickstart.tmpl69
-rw-r--r--setup.py20
-rw-r--r--tools/kickstarter (renamed from kickstarter.py)0
6 files changed, 119 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a307cc4..1254299 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,11 @@ TEMPLATE_MODS=$(patsubst %.tmpl,%.py,$(TEMPLATES))
.SECONDARY: $(TEMPLATE_MODS)
KS=$(wildcard *.ks)
-all: $(TEMPLATE_MODS)
+all: tmpls
+ python setup.py build
+
+tmpls:
+ cd kickstarter; make
%.py: %.tmpl
$(CHEETAH) compile --settings='useStackFrames=False' $<
diff --git a/kickstarter.spec b/kickstarter.spec
index 02f539e..6c6c074 100644
--- a/kickstarter.spec
+++ b/kickstarter.spec
@@ -8,6 +8,11 @@ URL: http://www.meego.com
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
+Requires: PyYAML
+Requires: python-urlgrabber
+Requires: python-cheetah
+BuildRequires: python-devel
+BuildRequires: python-cheetah
%description
Create Configuration files to build meego images
diff --git a/kickstarter/Makefile b/kickstarter/Makefile
new file mode 100644
index 0000000..ce2f89e
--- /dev/null
+++ b/kickstarter/Makefile
@@ -0,0 +1,20 @@
+# ex: set tabstop=4 noexpandtab:
+PYTHON=python
+CHEETAH=cheetah
+TEMPLATES=$(wildcard *.tmpl)
+TEMPLATE_MODS=$(patsubst %.tmpl,%.py,$(TEMPLATES))
+.SECONDARY: $(TEMPLATE_MODS)
+
+all: $(TEMPLATE_MODS)
+
+%.py: %.tmpl
+ $(CHEETAH) compile --settings='useStackFrames=False' $<
+ cp $@ __init__.py
+
+clean:
+ rm -f $(TEMPLATE_MODS)
+ rm -f $(addsuffix .bak,$(TEMPLATE_MODS))
+ rm -f *.xsd *.wsdl
+ rm -f *.pyc *.pyo
+ rm -f *.py
+ rm -f *.bak
diff --git a/kickstarter/kickstart.tmpl b/kickstarter/kickstart.tmpl
new file mode 100644
index 0000000..8ee3534
--- /dev/null
+++ b/kickstarter/kickstart.tmpl
@@ -0,0 +1,69 @@
+# ##############################################
+# Do not Edit! Generated by:
+# kickstarter.py
+# ###############################################
+
+lang ${metadata.Language}
+keyboard ${metadata.Keyboard}
+timezone --utc ${metadata.Timezone}
+#if $metadata.Part == ""
+part / --size ${metadata.PartSize} --ondisk sda --fstype=ext3
+#else
+${metadata.Part}
+#end if
+rootpw ${metadata.RootPass}
+xconfig --startxonboot
+#if $metadata.has_key("Bootloader")
+bootloader --timeout=${metadata.BootloaderTimeout} --append="${metadata.BootloaderAppend}"
+#end if
+#if $metadata.has_key("Desktop")
+desktop --autologinuser=${metadata.DefaultUser} --defaultdesktop=${metadata.Desktop} #slurp
+#end if
+#if $metadata.has_key("Session")
+--session="${metadata.Session}"
+#else
+
+#end if
+user --name ${metadata.DefaultUser} --groups audio,video --password ${metadata.DefaultUserPass}
+
+#set $save = ""
+#if $metadata.SaveRepos
+#set $save = "--save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego"
+#end if
+#for $r in $metadata.Repos
+#for $rr in $repos
+#if $rr.Name == $r
+repo --name=${r} --baseurl=${rr.Url} ${save}
+#end if
+#end for
+#end for
+
+
+#if $metadata.PackageArgs != ""
+%packages ${metadata.PackageArgs}
+#else
+%packages
+#end if
+
+#for $g in $metadata.Groups
+@${g}
+#end for
+
+
+$metadata.Kernel
+
+#for $e in $metadata.ExtraPackages
+${e}
+#end for
+#for $e in $metadata.RemovePackages
+-${e}
+#end for
+%end
+
+%post
+${metadata.Post}
+%end
+
+%post --nochroot
+${metadata.NoChroot}
+%end
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..e98afd4
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+import os, sys
+from distutils.core import setup
+try:
+ import setuptools
+ # enable "setup.py develop", optional
+except ImportError:
+ pass
+
+setup(name='kickstarter',
+ version = "0.1",
+ description='Kickstarter',
+ author='Anas Nashif',
+ author_email='anas.nashif@intel.com',
+ url='http://meego.com/',
+ scripts=['tools/kickstarter'],
+ packages=['kickstarter']
+ )
+
diff --git a/kickstarter.py b/tools/kickstarter
index 6cd4baf..6cd4baf 100644
--- a/kickstarter.py
+++ b/tools/kickstarter