# -*-mic2-options-*- -f fs --record-pkgs=name --pkgmgr=yum --arch=armv7hl -*-mic2-options-*-
# 
# Do not Edit! Generated by:
# kickstarter.py
# 

lang en_US.UTF-8
keyboard us
timezone --utc UTC


rootpw mer 

user --name mer  --groups audio,video --password mer 

repo --name=mer-core --baseurl=http://releases.merproject.org/releases/0.20130605.1/builds/armv7hl/packages --save --debuginfo --source --debuginfo --debuginfo
#repo --name=plasma-adaptation-nexus7 --baseurl=http://repo.pub.meego.com/Project:/KDE:/Mer_Extras:/Adaptation:/Tegra3:/Nexus7/Project_KDE_Devel_CE_UX_PlasmaActive_armv7hl/ --save --debuginfo --source
repo --name=nemo-hw-nv-tegra3-common --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/nv:/tegra3:/common/next_armv7hl/ --save --debuginfo --source
repo --name=mer-core-debug --baseurl=http://releases.merproject.org/releases/0.20130605.1/builds/armv7hl/debug --save --debuginfo --source
repo --name=mer-updates --baseurl=http://repo.merproject.org/obs/kde:/stable:/mer-updates/latest_armv7hl/ --save --debuginfo --source
repo --name=kde-mw --baseurl=http://repo.merproject.org/obs/kde:/stable:/mw/latest_armv7hl/ --save --debuginfo --source
repo --name=nemo-hw-nv-tegra3-nexus7 --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/nv:/tegra3:/nexus7/next_armv7hl/ --save --debuginfo --source
repo --name=kde-apps --baseurl=http://repo.merproject.org/obs/kde:/stable:/apps/latest_armv7hl/ --save --debuginfo --source
repo --name=nemo-mw --baseurl=http://releases.nemomobile.org/snapshots/repos/platform/0.20130619.0.1/armv7hl/ --save --debuginfo --source
repo --name=kde-ux --baseurl=http://repo.merproject.org/obs/kde:/stable:/ux/latest_armv7hl/ --save --debuginfo --source

%packages
@Mer Core Utils
@Mer Core
@Mer Connectivity
@Mer Minimal Xorg

kernel-adaptation-google-nexus7

nexus7-fw-installer
nemo-mobile-session
contextkit-plugin-upower
configs-nexus7
moslo-nexus7
bangarang
bluedevil
codecs-tegra3
configs-tegra3
graphics-adaptation-tegra3
graphics-adaptation-tegra3-libEGL
graphics-adaptation-tegra3-libGLESv1
graphics-adaptation-tegra3-libGLESv2
graphics-adaptation-tegra3-libOMX
graphics-adaptation-tegra3-xorg

linux-firmware-tegra3
mtdev
-sample-media
sample-media-tegra3
xorg-x11-drv-evdev
xorg-x11-drv-mtev
-connman
-connman-test
-connman-configs-mer
droid-sans-fonts
droid-sans-mono-fonts
droid-serif-fonts
liberation-fonts-common
liberation-mono-fonts
liberation-narrow-fonts
liberation-sans-fonts
liberation-serif-fonts
cpio
gzip
openssh-server
libqtwebkit-qmlwebkitplugin
xorg-x11-drv-fbdev
xorg-x11-drv-vesa
xorg-x11-utils-xhost
xorg-x11-server-Xorg-setuid
dbus-x11
libqtdeclarative4-gestures
libdeclarative-multimedia
alsa-utils
gdb
gst-plugins-good
ca-certificates
pulseaudio-policy-enforcement
iodbc
contour
contour-intro
declarative-plasmoids
kdelibs-data
kdelibs-imageio-plugins
kdelibs-plasma-runtime
kdepim-strigi-plugins
kde-runtime-desktoptheme
kde-runtime-emoticons
kde-runtime-nepomuk
kde-runtime-netattach
kde-runtime-newstuff
kde-runtime-plasma
kde-runtime-solid
kde-runtime-sounds
kde-runtime-wallet
konsole
kmix
plasma-active
plasma-mobile-mouse
startactive
virtuoso
virtuoso-drivers
virtuoso-server
kdialog
simple-tests
sample-media
ConsoleKit
ConsoleKit-libs
ConsoleKit-x11
dhclient
libpcap
ModemManager
NetworkManager
NetworkManager-glib
NetworkManager-kde
NetworkManager-kde-libs
plasmoid-networkmanagement
plasma-active-config-blacklist
bodega-client
ssu-vendor-data-kde
encfs
fuse
rlog
kpat
kwrite
plasma-mediacenter
-okular
%end

%post
# Explicitly set arch to armv7hl for zypper to work correctly.
echo "arch = armv7hl" >> /etc/zypp/zypp.conf

# Quick hack to allow "experienced users" to open the network settings manually.
# This is intended as a ugly workaround as long as the nm-applet is not working properly.
cat > /usr/local/bin/nm-settings << EOF1
#/bin/sh
kcmshell4 --icon networkmanager kcm_networkmanagement kcm_networkmanagement_tray
EOF1
chmod 755 /usr/local/bin/nm-settings

# PA on Nexus7 does not work with opengl right now.
sed -i 's/QT_DEFAULT_RUNTIME_SYSTEM=opengl/QT_DEFAULT_RUNTIME_SYSTEM=raster/' /etc/sysconfig/nemo-mobile-hw

# The 3G model may have problems on suspend, so we explicitly turn the baseband power off and on.
cat > /lib/systemd/system-sleep/wwan-fix.sh << EOF2
#!/bin/sh
if [ -e /sys/devices/platform/baseband_xmm_power/xmm_onoff ] ;
then
    case $1/$2 in
    pre/*)
    echo 0 > /sys/devices/platform/baseband_xmm_power/xmm_onoff
    ;;
    post/*)
    echo 1 > /sys/devices/platform/baseband_xmm_power/xmm_onoff
    ;;
    esac
fi
EOF2
chmod 755 /lib/systemd/system-sleep/wwan-fix.sh


## arch-armv7hl.post from mer-kickstarter-configs package
# Without this line the rpm don't get the architecture right.
echo -n 'armv7hl-meego-linux' > /etc/rpm/platform

# Also libzypp has problems in autodetecting the architecture so we force tha as well.
# https://bugs.meego.com/show_bug.cgi?id=11484
echo 'arch = armv7hl' >> /etc/zypp/zypp.conf
## end arch-armv7hl.post


# save a little bit of space at least...
rm -f /boot/initrd*

# make sure there aren't core files lying around
rm -f /core*



# Prelink can reduce boot time
if [ -x /usr/sbin/prelink ]; then
    /usr/sbin/prelink -aRqm
fi

echo "export KDE_IS_PRELINKED=1">/etc/profile.d/kde.sh


 
cat > /usr/share/xsessions/X-MEEGO-HS.plasmaactive << EOF
[Desktop Entry]
Version=1.0
Name=plasma active session
Exec=/usr/bin/startactive
Type=Application
EOF

# Set symlink pointing to .desktop file 

ln -sf X-MEEGO-HS.plasmaactive /usr/share/xsessions/default.desktop

 
ln -s /lib/systemd/system/getty@.service /lib/systemd/system/getty.target.wants/getty@tty2.service

 
# kde-security: load the fuse module
#echo "/sbin/modprobe fuse" >> /etc/modprobe.d/dist.conf
mkdir -p /etc/modules-load.d/
echo "fuse" > /etc/modules-load.d/fuse.conf



%end

%post --nochroot

if [ -n "$IMG_NAME" ]; then
    echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release
fi



%end
