[General PAC Discussion] MetaIIica:
Things you need for building:

A computer

An internet connection

An open mind

Time

Patience

You MUST be running a 64 bit version of Ubuntu, 32 bit is not supported.

IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!

I have made a sample Bash-Scripts for all usable Ubuntu Versions (12.04 -14.04) to setup for building for PAC

This is the first Startup for all...*

How to use:*

Download and decompress to your Useraccount in Ubuntu.*

Pick your needed Bashscript for your Ubuntu and give the files

chmod +x *.sh

now start it with (eg. when you use Ubuntu 12.04)

./ 12.04.sh

*

This download and install all needed packages and last init PAC (current 4.3.1) and sync

If you would compile 4.4.2 open your needed Script, search line repo init -u git://github.com/PAC-man/pacman.git -b cm-10.2

and replace it with

repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4

then run the Script

*

Download: http://pac-man-rom.de/pac_setup.rar

Tweaks:

Android SDK:

Download the SDK here: http://developer.android.com/sdk/index.html

Extract the SDK and place it in your home directory.

I renamed my SDK to android-sdk to make it easier to navigate to.

Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.

Add these lines at the bottom of the file:

export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin

Find your .profile file and add this at the bottom of the file:

PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"

*

Configure your USB.

gksudo gedit /etc/udev/rules.d/51-android.rules

Inside of this blank text file insert:

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"

#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"

#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"

#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"

#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"

#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"

#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"

#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"

#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"

#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"

#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"

#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"

#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"

#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"

#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"

#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"

#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"

#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"

#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"

#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"

#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"

#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"

#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"

#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"

#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"

#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"

#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"

#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

Save the file and close it and then issue this command:

sudo chmod a+r /etc/udev/rules.d/51-android.rules

How To Add A Device To The List

Find the github for your device you wish to add.

Now navigate to the location you are going clone the device tree to:

cd WORKING_DIRECTORY/device
mkdir samsung

Clone the github device tree from remote to local: (The name after the branch would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [passion], Nexus S [crespo], Motorola Droid [sholes], HTC Incredible [inc], etc.)

git clone git://github.com/CyanogenMod/android_device_samsung_d710.git -b cm-10.1 d710

Now navigate into the folder:

cd d710

Connect phone to computer and make sure USB debugging is enabled and you have adb set up. Extract Device Proprietary Files:

./extract-files.sh

Or:

./proprietary-files.sh

Or: See if other repos have your device's proprietary blobs already (like d710):

~/WORKING_DIRECTORY
git clone https://github.com/TheMuppets/proprietary_vendor_samsung -b cm-10.2 samsung

Some devices have other dependencies like a common device repo. The d710 utilizes a galaxys2-common repo for the galaxys2 family of devices. Clone that repo. From inside the d710 folder:

cd ..
git clone git://github.com/CyanogenMod/android_device_samsung_galaxys2-common.git -b cm-10.1 galaxys2-common

Credits: dastin1015 http://xdaforums.com/member.php?u=3257303