-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path20-pacman.sh
More file actions
66 lines (56 loc) · 1.76 KB
/
20-pacman.sh
File metadata and controls
66 lines (56 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
AddPackage aurutils # helper tools for the arch user repository
AddPackage pacman-contrib # Contributed scripts and tools for pacman systems
AddPackage pacutils # Helper tools for libalpm
AddPackage vifm # A file manager with curses interface, which provides Vi[m]-like environment
cat >"$(CreateFile /etc/pacman.d/hooks/paccache-remove.hook)" <<EOF
[Trigger]
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -ruk0
EOF
cat >"$(CreateFile /etc/pacman.d/hooks/paccache-upgrade.hook)" <<EOF
[Trigger]
Operation = Upgrade
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -rk2
EOF
cat >"$(CreateFile /etc/pacman.d/hooks/check-deps.hook)" <<EOF
[Trigger]
Operation = Upgrade
Type = Package
Target = *
[Action]
Description = Checking broken dependencies...
When = PostTransaction
Exec = /usr/local/bin/pacman-check-local-deps.sh
EOF
CopyFile /usr/local/bin/pacman-check-local-deps.sh 755
sed -i -f - "$(GetPackageOriginalFile pacman-mirrorlist /etc/pacman.d/mirrorlist)" <<'EOF'
/mirror.mirohost.net/ s/^#//
/mirrors.nix.org.ua/ s/^#//
EOF
sed -i -f - "$(GetPackageOriginalFile pacman /etc/pacman.conf)" <<EOF
/^#CacheDir/ s/^#//
/CacheDir/ a CacheDir = /var/cache/pacman/custom/
/CleanMethod/ s/.*/CleanMethod = KeepCurrent/
/^#Color/ s/^#//
/^#CheckSpace/ s/^#//
/^#VerbosePkgLists/ s/^#//
/^#ParallelDownloads/ s/.*/ParallelDownloads = 3/
/ParallelDownloads/ a ILoveCandy
/#\[custom\]/,/^$/ s/^#//
EOF
sed -i -f - "$(GetPackageOriginalFile pacman /etc/makepkg.conf)" <<EOF
s/^#MAKEFLAGS=.*/MAKEFLAGS="-j5"/
s/^COMPRESSXZ=.*/COMPRESSXZ=(xz -c -z - --threads=0)/
s/-march=[^ ]*/-march=native/
s/-mtune=[^ ]*/-mtune=native/
EOF