-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path07-Devel.sh
More file actions
executable file
·130 lines (113 loc) · 3.55 KB
/
Copy path07-Devel.sh
File metadata and controls
executable file
·130 lines (113 loc) · 3.55 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash
#bash +x
set -e
SD=`pwd`
ARCH=""
if [[ `uname -m` = "x86_64" ]]; then ARCH="64" ; fi
NP=`basename $0 | cut -d "." -f 1`${ARCH} # NimbleX Package name
WGET_OPTS="${WGET_OPTS:--q -N}"
if [[ -f .ftp-credentials ]]; then
. .ftp-credentials
slacksrc="ftp://${USERNAME}:${PASSWORD}@${HOSTNAME}/Bogdan/packages/slackware${ARCH}/slackware${ARCH}"
else
slacksrc="ftp://slackware.telecoms.bg/slackware/slackware${ARCH}-current/slackware${ARCH}"
fi
extrasrc="http://packages.nimblex.net/slacky${ARCH}"
whitelist_a="grub-*,floppy-*"
blacklist_d="perl*,llvm-*,gcc-java-*,gcc-gnat-*,gcc-go-*,gcc-gfortran-*"
whitelist_l="glibci-*,mpfr-*,db4-*,boost-*,python-packaging-*,python-pygments-*,python-docutils-*"
whitelist_ap="linuxdoc-tools*,texinfo*"
mkdir -p $NP $NP-work $NP-removed
downloadpkg() {
cd $SD/$NP-work
wget $WGET_OPTS -A "$whitelist_a" "$slacksrc"/a/*.txz
wget $WGET_OPTS -R "$blacklist_d" "$slacksrc"/d/*.txz
wget $WGET_OPTS -A "$whitelist_l" "$slacksrc"/l/*.txz
wget $WGET_OPTS -A "$whitelist_ap" "$slacksrc"/ap/*.txz
wget $WGET_OPTS http://packages.nimblex.net/nimblex/device-tree-compiler-1.7.2-x86_64-1.txz # 164K
wget $WGET_OPTS http://packages.nimblex.net/nimblex/intel-npu-1.32.1-x86_64.txz # 39M
wget $WGET_OPTS -N http://packages.nimblex.net/nimblex/pefile-2024.8.26-x86_64-1.txz # 148K
}
instpkg() {
for pkg in $SD/$NP-work/* ; do
nice -n10 installpkg --root $SD/$NP $pkg
done
}
copy-removed() {
cd $SD/$NP
# 1st we need to fix this
rm etc/passwd etc/group
echo "Adding stuff removed from the other packages"
cp -a ../01-Core${ARCH}-removed/devel/* .
cp -a ../02-Xorg${ARCH}-removed/devel/* .
#cp -a ../03-Libs${ARCH}-removed/devel/* .
cp -a ../04-Apps${ARCH}-removed/devel/* .
cp -a ../05-KDE${ARCH}-removed/devel/* .
}
fix_grub_font() {
cd $SD/$NP
ln -s /boot/grub/fonts/hack.pf2 usr/share/grub/unicode.pf2
}
run-caches() {
cd $SD && AUFS="aufs-temp"
echo "Rebuilding caches chrooted inside $AUFS"
mount | grep aufs-temp && umount aufs-temp
mkdir -p $AUFS
mount -t aufs -o xino=/mnt/live/memory/aufs.xino,br:$NP none $AUFS
mount -t aufs -o remount,append:05-KDE${ARCH}=ro none $AUFS
mount -t aufs -o remount,append:04-Apps${ARCH}=ro none $AUFS
#mount -t aufs -o remount,append:03-Libs${ARCH}=ro none $AUFS
mount -t aufs -o remount,append:02-Xorg${ARCH}=ro none $AUFS
mount -t aufs -o remount,append:01-Core${ARCH}=ro none $AUFS
chroot $AUFS ldconfig
chroot $AUFS fc-cache
chroot $AUFS update-mime-database /usr/share/mime
chroot $AUFS update-desktop-database -q /usr/share/applications
chroot $AUFS gio-querymodules /usr/lib${ARCH}/gio/modules
#chroot $AUFS update-gtk-immodules
chroot $AUFS update-gdk-pixbuf-loaders
chroot $AUFS glib-compile-schemas /usr/share/glib-2.0/schemas/
umount $AUFS
rm -rf $NP/.wh..wh.*
}
SQUASH_OPT="-comp xz -noappend -b 256K -Xbcj x86 -no-xattrs"
if [[ -z $1 ]]; then
echo "Tell me what to do"
echo "You options are: clean download install lzmfy"
else
case $1 in
"clean" )
echo "...CLEANING"
rm -r $NP && echo $NP deleted
rm -r $NP-work && echo $NP-work deleted
rm -r $NP-removed && echo $NP-removed deleted
;;
"download" )
echo "...DOWNLOADING"
downloadpkg
;;
"install" )
echo "...INSTALLING"
instpkg
fix_grub_font
copy-removed
run-caches
;;
"lzmfy" )
echo "...LZMFY"
nice -n10 mksquashfs $NP $NP.lzm $SQUASH_OPT
;;
"world" )
echo "...DOWNLOADING"
downloadpkg
echo "...INSTALLING"
instpkg
fix_grub_font
copy-removed
run-caches
echo "...LZMFY"
nice -n10 mksquashfs $NP $NP.lzm $SQUASH_OPT
;;
esac
echo -e "\n $0 \033[7m DONE \033[0m \n"
fi