Install Fedora 22 (TwentyTwo) on a MacBook 4.1 (Late 2007)

#!/bin/sh
# mirror.de.leaseweb.net/fedora/linux/releases/22/Workstation/x86_64/iso/Fedora-Workstation-netinst-x86_64-22.iso
# Fedora 22 for Apple MacBook13
#Update 20.08.2o15
hostnamectl set-hostname --static "ptichka"
dnf -y update
dnf groupinstall "Development Tools" 
### Wallpaper ###
echo "get the Wallpaper"
wget http://boofeaction.de/server/linux/Locked.jpg
mv Locked.jpg /usr/share/backgrounds/
### RPM Fusion ### 
echo "set RPM Fusion"
wget download1.rpmfusion.org/free/fedora/rpmfusion-free-release-22.noarch.rpm
wget download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-22.noarch.rpm
rpm -iv rpmfusion-free-release-22.noarch.rpm rpmfusion-nonfree-release-22.noarch.rpm
rm -rf rpmfusion-free-release-22.noarch.rpm rpmfusion-nonfree-release-22.noarch.rpm
dnf -y update
dnf -y install faad2 gstreamer1 gstreamer-plugins-bad gstreamer-plugins-bad-free gstreamer-plugins-base gstreamer-plugins-espeak gstreamer-plugins-fc gstreamer-plugins-good gstreamer-plugins-good-extras gstreamer-plugins-ugly libdca libmad libmatroska xvidcore htop mc banshee gnome-tweak-tool.noarch gimp darktable glib2-devel.x86_64 vala-compat.x86_64 dconf-editor liferea.x86_64 lm_sensors.x86_64 evolution-bogofilter.x86_64 icedtea-web viking nano kernel-tools-libs filezilla
### WiFi ##
dnf -y install b43-fwcutter.x86_64
wget http://downloads.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2
tar xjf broadcom-wl-4.150.10.5.tar.bz2
cd broadcom-wl-4.150.10.5/driver
b43-fwcutter -w /lib/firmware/ wl_apsta_mimo.o
rm -rf broadcom-wl-4.150.10.5.tar.bz2 broadcom-wl-4.150.10.5
### DVD ###
echo "... DVD playback"
wget http://download.videolan.org/pub/libdvdcss/1.2.13/libdvdcss-1.2.13.tar.bz2
tar xvfj libdvdcss-1.2.13.tar.bz2
cd libdvdcss-1.2.13/
./configure --prefix=/usr --sysconfdir=/etc --sbindir=/sbin --libdir=/usr/lib64
make liferea
make install
/sbin/ldconfig
cd ..
rm -rf libdvdcss-1.2.13
rm -rf libdvdcss-1.2.13.tar.bz2
### Skype ###
echo "Installing Skype"
wget http://download.skype.com/linux/skype-4.3.0.37-fedora.i586.rpm
dnf -y install libXv.i686 libXScrnSaver.i686 qt.i686 qt-x11.i686 pulseaudio-libs.i686 pulseaudio-libs-glib2.i686 alsa-plugins-pulseaudio.i686 qtwebkit.i686
rpm -i skype-4.3.0.37-fedora.i586.rpm
rm -rf skype-4.3.0.37-fedora.i586.rpm 
### Adobe Flash ###
echo "get Adobe Flash"
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
dnf check-update
dnf -y install flash-plugin
### rc.local 
touch /etc/rc.d/rc.local
chmod 755 /etc/rc.d/rc.local
#edit by hand
#echo "#!/usr/bin/bash" >> /etc/rc.d/rc.local
#echo "echo 1 > /proc/sys/vm/swappiness" >> /etc/rc.d/rc.local
systemctl start rc-local.service
### GIMP scripts ###
echo "scripts for The GIMP"
wget http://boofeaction.de/server/linux/scripts_gimp.tar.bz2
tar xvfj scripts_gimp.tar.bz2
cd scripts/
cp *.* /usr/share/gimp/2.0/scripts/
cd ..
rm -rf scripts scripts_gimp.tar.bz2
### SSD settings
echo "SSD settings"
dnf -y install hdparm.x86_64
echo "none              /var/log/              tmpfs   size=10%                 0       0" #>> /etc/fstab
echo "none             /tmp/                   tmpfs   size=10%                 0       0" #>> /etc/fstab
/sbin/restorecon -v /var/log
hdparm -I /dev/sda | grep TRIM
wget http://boofeaction.de/server/linux/trim.sh
#Replace jonas with your username. Save the script, say ... trim.sh . Now give the #executable bit and move it to /etc/cron.weekly. 
chmod +x trim.sh
mv trim.sh /etc/cron.weekly/
### preInstall ###
echo "preinstall..."
efibootmgr -o 0,80
cpupower frequency-set -rg powersave
dnf -y install bluez-hid2hci isight-firmware-tools.x86_64 automake glib-devel dbus-glib-devel libxml2-devel gcc-c++ plymouth-theme-spinner.x86_64
wget http://boofeaction.de/server/linux/AppleUSBVideoSupport
ift-extract --apple-driver AppleUSBVideoSupport
rm -rf AppleUSBVideoSupport
git clone https://github.com/01org/thermal_daemon.git
cd thermal_daemon/
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --sbindir=/sbin --libdir=/usr/lib64
make
make install
/sbin/ldconfig
cd ..
rm -rf thermal_daemon/
systemctl start thermald.service
dnf -y copr enable rommon/telegram
dnf -y install telegram-desktop
plymouth-set-default-theme spinner
/usr/libexec/plymouth/plymouth-update-initrd
### GoogleChrome ####
echo "GoogleChrome"
wget http://boofeaction.de/server/linux/google-chrome.repo
mv google-chrome.repo /etc/yum.repos.d/
dnf -y update
dnf install -y google-chrome-stable
### Firefox from Source ###
echo "Firefox from Source"
dnf -y install mercurial mach python-setuptools python-devel.i686 python3-devel.x86_64 python-devel.x86_64
wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
hg clone https://hg.mozilla.org/mozilla-central/ firefox
wget http://boofeaction.de/server/linux/mozconfig
mv mozconfig firefox
cd firefox
./mach mercurial-setup
./mach mercurial-setup
./mach build
### Kernel Build ###
echo "Kernel"
dnf -y install fedpkg fedora-packager rpmdevtools ncurses-devel qt3-devel
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.6.tar.xz
tar xvf linux-4.1.6.tar.xz
cd linux-4.1.6
wget http://boofeaction.de/server/linux/MacBook.config
mv MacBook.config .config
make bzImage
make modules
make modules_install
make install

© 2o11-15 by jonas | last update: 2o-o8-2o15