[Nexus 5 Android Development] SpasilliumNexus:
I've created a personal gapps zip just for Cataclysm that removes every Google app, along with their libraries, and replaces the apps I only want installed with updated versions.

Hopefully [MENTION=3913401]atl4ntis[/MENTION] or anyone else looking to update the apps in the ROM will find this useful as a reference or something.

Detailed parts of the script are highlighted in red.

ui_print("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
ui_print("Cataclysm Lollipop 5.1.1 GApps");
ui_print(" Last update: 07/18/2015 ");
ui_print("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");

show_progress(0.2, 0);
ui_print(" ");
ui_print("Mounting system partition");
run_program("/sbin/busybox", "mount", "/system");

show_progress(0.3, 0);
ui_print(" ");
ui_print("Removing stock Google apps and their libraries");
[COLOR="Red"]# Apps to be replaced with updated versions[/COLOR]
delete_recursive("/system/app/Books");
delete_recursive("/system/app/CalendarGooglePrebuilt");
delete_recursive("/system/app/Chrome");
delete_recursive("/system/app/CloudPrint2");
delete_recursive("/system/app/DeskClockGoogle");
delete_recursive("/system/app/DMAgent");
delete_recursive("/system/app/Drive");
delete_recursive("/system/app/EditorsDocs");
delete_recursive("/system/app/EditorsSheets");
delete_recursive("/system/app/EditorsSlides");
delete_recursive("/system/app/GoogleCamera");
delete_recursive("/system/app/GoogleHome");
delete_recursive("/system/app/GoogleTTS");
delete_recursive("/system/app/iWnnIME");
delete_recursive("/system/app/LatinImeGoogle");
delete_recursive("/system/app/Maps");
delete_recursive("/system/app/Music2");
delete_recursive("/system/app/Newsstand");
delete_recursive("/system/app/Photos");
delete_recursive("/system/app/PlayGames");
delete_recursive("/system/app/PlusOne");
delete_recursive("/system/app/PrebuiltExchange3Google");
delete_recursive("/system/app/PrebuiltGmail");
delete_recursive("/system/app/PrebuiltKeep");
delete_recursive("/system/app/Street");
delete_recursive("/system/app/talkback");
delete_recursive("/system/app/Videos");
delete_recursive("/system/app/WebViewGoogle");
delete_recursive("/system/app/YouTube");

show_progress(0.4, 0);
[COLOR="red"]# Apps I personally consider unnecessary will be removed from the Cataclysm ROM[/COLOR]
[COLOR="red"]# and will not be installed from the zip since nearly every app update has gotten bigger in size[/COLOR]
[COLOR="red"]# and causes every app to not fit on the system partition of the Nexus 5[/COLOR]
delete_recursive("/system/app/FitnessPrebuilt");
delete_recursive("/system/app/GoogleEars");
delete_recursive("/system/app/GoogleEarth");
delete_recursive("/system/app/GoogleHindiIME");
delete_recursive("/system/app/GooglePinyinIME");
delete_recursive("/system/app/KoreanIME");
delete_recursive("/system/app/PrebuiltEmailGoogle");
delete_recursive("/system/app/PrebuiltNewsWeather");

show_progress(0.5, 0);
[COLOR="red"]# Privileged apps to be replaced with updated versions[/COLOR]
delete_recursive("/system/priv-app/GCS");
delete_recursive("/system/priv-app/Hangouts");
delete_recursive("/system/priv-app/Phonesky");
delete_recursive("/system/priv-app/PrebuiltGmsCore");
delete_recursive("/system/priv-app/Velvet");
delete_recursive("/system/priv-app/Wallet");

show_progress(0.6, 0);
[COLOR="red"]# Here we remove every library associated with a Google app from[/COLOR]
[COLOR="red"]# the /system/lib directory as they are now placed next to their APKs.[/COLOR]
[COLOR="red"]# Example:[/COLOR]
[COLOR="red"]# /system/app/Chrome/Chrome.apk[/COLOR]
[COLOR="red"]# /system/app/Chrome/lib/arm/libchrome.so[/COLOR]
[COLOR="red"]# /system/app/Chrome/lib/arm/libchromium_android_linker.so[/COLOR]
[COLOR="Red"]#[/COLOR]
[COLOR="red"]# Chrome (Chrome) libraries[/COLOR]
delete("/system/lib/libchrome.2214.89.so");
delete("/system/lib/libchromium_android_linker.so");
[COLOR="red"]# GoogleCamera (Google Camera) libraries[/COLOR]
delete("/system/lib/libgcam.so");
delete("/system/lib/libgcam_swig_jni.so");
delete("/system/lib/libjni_jpegutil.so");
delete("/system/lib/libjni_tinyplanet.so");
[COLOR="red"]# Essential Google Camera library. DO NOT DELETE[/COLOR]
[COLOR="red"]# delete("/system/lib/libjpeg.so");[/COLOR]
[COLOR="red"]# without this, Android will not boot past the bootloader[/COLOR]
delete("/system/lib/liblightcycle.so");
delete("/system/lib/libnativehelper_compat_libc++.so");
delete("/system/lib/librefocus.so");
[COLOR="red"]# GoogleEars (Sound Search for Google Play) libraries[/COLOR]
delete("/system/lib/libvorbisencoder.so");
[COLOR="red"]# GoogleTTS (Google Text-to-Speech) libraries[/COLOR]
delete("/system/lib/libpatts_engine_jni_api.so");
delete("/system/lib/libspeexwrapper.so");
[COLOR="red"]# iWnnIME (Emoji Keyboard) libraries[/COLOR]
delete("/system/lib/libEnjemailuri.so");
delete("/system/lib/libennjcon.so");
delete("/system/lib/libennjubase1.so");
delete("/system/lib/libennjubase1gb.so");
delete("/system/lib/libennjubase1us.so");
delete("/system/lib/libennjubase2.so");
delete("/system/lib/libennjubase3.so");
delete("/system/lib/libennjyomi.so");
delete("/system/lib/libiwnn.so");
delete("/system/lib/libnjaddress.so");
delete("/system/lib/libnjcon.so");
delete("/system/lib/libnjemoji.so");
delete("/system/lib/libnjexyomi.so");
delete("/system/lib/libnjexyomi_plus.so");
delete("/system/lib/libnjfzk.so");
delete("/system/lib/libnjkaomoji.so");
delete("/system/lib/libnjname.so");
delete("/system/lib/libnjtan.so");
delete("/system/lib/libnjubase1.so");
delete("/system/lib/libnjubase2.so");
delete("/system/lib/lib_dic_en_tablet_USUK.conf.so");
delete("/system/lib/lib_dic_en_USUK.conf.so");
delete("/system/lib/lib_dic_ja_JP.conf.so");
delete("/system/lib/lib_dic_morphem_ja_JP.conf.so");
[COLOR="red"]# LatinImeGoogle (Google Keyboard) libraries[/COLOR]
delete("/system/lib/libjni_latinimegoogle.so");
[COLOR="red"]# WebViewGoogle (Android System WebView) libraries[/COLOR]
delete("/system/lib/libwebviewchromium.so");
[COLOR="red"]# Velvet (Google App) libraries[/COLOR]
delete("/system/lib/libgoogle_hotword_jni.so");
delete("/system/lib/libgoogle_recognizer_jni_l.so");

show_progress(0.7, 0);
ui_print(" ");
ui_print("Installing Google Apps");
package_extract_dir("system", "/system");

show_progress(0.8, 0);
ui_print(" ");
ui_print("Applying metadata and contexts...");
set_metadata_recursive("/system/app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
[COLOR="Red"]# Leaving this here just in case of use later[/COLOR]
[COLOR="red"]# set_metadata_recursive("/system/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");[/COLOR]
set_metadata_recursive("/system/priv-app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

show_progress(0.9, 0);
ui_print(" ");
ui_print("Un-mounting system partition");
run_program("/sbin/busybox", "umount", "/system");

show_progress(1.0, 0);
ui_print(" ");
ui_print("Installation complete");
sleep(1.5);