| @@ -1,49 +1,49 @@ | | | @@ -1,49 +1,49 @@ |
1 | #!/bin/sh | | 1 | #!/bin/sh |
2 | # | | 2 | # |
3 | # $NetBSD: gencompat.sh,v 1.4 2021/12/18 10:17:48 he Exp $ | | 3 | # $NetBSD: gencompat.sh,v 1.5 2022/01/02 16:33:13 he Exp $ |
4 | # | | 4 | # |
5 | # This script generates the distfiles and PLISTs for the NetBSD compat* | | 5 | # This script generates the distfiles and PLISTs for the NetBSD compat* |
6 | # packages. | | 6 | # packages. |
7 | # | | 7 | # |
8 | # XXX Improve the documentation and promote tweakable variables to script | | 8 | # XXX Improve the documentation and promote tweakable variables to script |
9 | # XXX options. | | 9 | # XXX options. |
10 | # | | 10 | # |
11 | | | 11 | |
12 | compat_version=9.0 | | 12 | compat_version=9.0 |
13 | compat_version_name=90 | | 13 | compat_version_name=90 |
14 | | | 14 | |
15 | compat_base=/x/NetBSD/$compat_version | | 15 | compat_base=/x/NetBSD/$compat_version |
16 | cur_base=/x/NetBSD/10.0_preALPHA | | 16 | cur_base=/x/NetBSD/10.0_preALPHA |
17 | setdir=binary/sets | | 17 | setdir=binary/sets |
18 | | | 18 | |
19 | BASESET="base.tgz" | | 19 | BASESET="base.tgz" |
20 | XBASESET="xbase.tgz" | | 20 | XBASESET="xbase.tgz" |
21 | BASESET_X="base.tar.xz" | | 21 | BASESET_X="base.tar.xz" |
22 | XBASESET_X="xbase.tar.xz" | | 22 | XBASESET_X="xbase.tar.xz" |
23 | | | 23 | |
24 | archlist="aarch64 alpha arm armeb armv6hf armv7hf earmv7hfeb earm earmv7hfeb hppa i386 m68010 m68k mips64el mips64eb mipseb mipsel powerpc sh3eb sh3el sparc sparc64 vax x86_64" | | 24 | archlist="aarch64 alpha arm earmeb earmv6hf earmv7hf earmv7hfeb earm earmv7hfeb hppa i386 m68000 m68k mips64el mips64eb mipseb mipsel powerpc sh3eb sh3el sparc sparc64 vax x86_64" |
25 | | | 25 | |
26 | machlist_aarch64="evbarm-aarch64" | | 26 | machlist_aarch64="evbarm-aarch64" |
27 | machlist_alpha="alpha" | | 27 | machlist_alpha="alpha" |
28 | machlist_arm="acorn32 cats evbarm hpcarm iyonix netwinder shark zaurus" | | 28 | machlist_arm="acorn32 cats evbarm hpcarm iyonix netwinder shark zaurus" |
29 | machlist_earm="evbarm-earm" | | 29 | machlist_earm="evbarm-earm" |
30 | machlist_armeb="evbarm-earmeb" | | 30 | machlist_earmeb="evbarm-earmeb" |
31 | machlist_armv6hf="evbarm-earmv6hf" | | 31 | machlist_earmv6hf="evbarm-earmv6hf" |
32 | machlist_armv7hf="evbarm-earmv7hf" | | 32 | machlist_earmv7hf="evbarm-earmv7hf" |
33 | machlist_earmv7hfeb="evbarm-earmv7hfeb" | | 33 | machlist_earmv7hfeb="evbarm-earmv7hfeb" |
34 | machlist_hppa="hp700" | | 34 | machlist_hppa="hp700" |
35 | machlist_i386="i386" | | 35 | machlist_i386="i386" |
36 | machlist_m68010="sun2" | | 36 | machlist_m68000="sun2" |
37 | machlist_m68k="amiga atari cesfic hp300 luna68k mac68k mvme68k news68k next68k sun3 x68k" | | 37 | machlist_m68k="amiga atari cesfic hp300 luna68k mac68k mvme68k news68k next68k sun3 x68k" |
38 | machlist_mipseb="ews4800mips mipsco newsmips sgimips evbmips-mipseb" | | 38 | machlist_mipseb="ews4800mips mipsco newsmips sgimips evbmips-mipseb" |
39 | machlist_mipsel="algor arc cobalt hpcmips pmax evbmips-mipsel" | | 39 | machlist_mipsel="algor arc cobalt hpcmips pmax evbmips-mipsel" |
40 | machlist_mips64el="evbmips-mips64el" | | 40 | machlist_mips64el="evbmips-mips64el" |
41 | machlist_mips64eb="evbmips-mips64eb" | | 41 | machlist_mips64eb="evbmips-mips64eb" |
42 | machlist_powerpc="amigappc bebox evbppc ibmnws macppc mvmeppc ofppc prep rs6000 sandpoint" | | 42 | machlist_powerpc="amigappc bebox evbppc ibmnws macppc mvmeppc ofppc prep rs6000 sandpoint" |
43 | machlist_sh3eb="evbsh3-sh3eb" | | 43 | machlist_sh3eb="evbsh3-sh3eb" |
44 | machlist_sh3el="evbsh3-sh3el dreamcast landisk hpcsh" | | 44 | machlist_sh3el="evbsh3-sh3el dreamcast landisk hpcsh" |
45 | machlist_sparc="sparc" | | 45 | machlist_sparc="sparc" |
46 | machlist_sparc64="sparc64" | | 46 | machlist_sparc64="sparc64" |
47 | machlist_vax="vax" | | 47 | machlist_vax="vax" |
48 | machlist_x86_64="amd64" | | 48 | machlist_x86_64="amd64" |
49 | | | 49 | |
| @@ -129,33 +129,33 @@ for arch in $archlist; do | | | @@ -129,33 +129,33 @@ for arch in $archlist; do |
129 | # Remove any empty directories. | | 129 | # Remove any empty directories. |
130 | find $compat_dir $compat_extras_dir -type d -print | sort -r | | | 130 | find $compat_dir $compat_extras_dir -type d -print | sort -r | |
131 | while read d; do | | 131 | while read d; do |
132 | rmdir -p $d 2>/dev/null || true | | 132 | rmdir -p $d 2>/dev/null || true |
133 | done | | 133 | done |
134 | | | 134 | |
135 | # What is left in $compat_dir is (mostly) libs | | 135 | # What is left in $compat_dir is (mostly) libs |
136 | # with differnt majors than what's in the new version | | 136 | # with differnt majors than what's in the new version |
137 | | | 137 | |
138 | [ -d $compat_pkgdir ] || mkdir -p $compat_pkgdir | | 138 | [ -d $compat_pkgdir ] || mkdir -p $compat_pkgdir |
139 | [ -d $compat_extras_pkgdir ] || mkdir -p $compat_extras_pkgdir | | 139 | [ -d $compat_extras_pkgdir ] || mkdir -p $compat_extras_pkgdir |
140 | | | 140 | |
141 | # Generate PLISTs and distfiles. | | 141 | # Generate PLISTs and distfiles. |
142 | ( echo '@comment $NetBSD: gencompat.sh,v 1.4 2021/12/18 10:17:48 he Exp $' | | 142 | ( echo '@comment $NetBSD: gencompat.sh,v 1.5 2022/01/02 16:33:13 he Exp $' |
143 | find $compat_dir \! -type d | sort | | | 143 | find $compat_dir \! -type d | sort | |
144 | sed 's,'$compat_dir'/,${EMULSUBDIRSLASH},' | | 144 | sed 's,'$compat_dir'/,${EMULSUBDIRSLASH},' |
145 | ) > $compat_pkgdir/PLIST.$arch | | 145 | ) > $compat_pkgdir/PLIST.$arch |
146 | tar cf $compat_pkgdir/$compat_dir.tar $compat_dir | | 146 | tar cf $compat_pkgdir/$compat_dir.tar $compat_dir |
147 | bzip2 -f -9 $compat_pkgdir/$compat_dir.tar | | 147 | bzip2 -f -9 $compat_pkgdir/$compat_dir.tar |
148 | | | 148 | |
149 | ( echo '@comment $NetBSD: gencompat.sh,v 1.4 2021/12/18 10:17:48 he Exp $' | | 149 | ( echo '@comment $NetBSD: gencompat.sh,v 1.5 2022/01/02 16:33:13 he Exp $' |
150 | find $compat_extras_dir \! -type d | sort | | | 150 | find $compat_extras_dir \! -type d | sort | |
151 | sed 's,'$compat_extras_dir'/,${EMULSUBDIRSLASH},' | | 151 | sed 's,'$compat_extras_dir'/,${EMULSUBDIRSLASH},' |
152 | ) > $compat_extras_pkgdir/PLIST.$arch | | 152 | ) > $compat_extras_pkgdir/PLIST.$arch |
153 | tar cf $compat_extras_pkgdir/$compat_extras_dir.tar $compat_extras_dir | | 153 | tar cf $compat_extras_pkgdir/$compat_extras_dir.tar $compat_extras_dir |
154 | bzip2 -f -9 $compat_extras_pkgdir/$compat_extras_dir.tar | | 154 | bzip2 -f -9 $compat_extras_pkgdir/$compat_extras_dir.tar |
155 | | | 155 | |
156 | # Cleanup. | | 156 | # Cleanup. |
157 | rm -rf $cur_dir $compat_dir $compat_extras_dir | | 157 | rm -rf $cur_dir $compat_dir $compat_extras_dir |
158 | # This arch done, skip to the next | | 158 | # This arch done, skip to the next |
159 | break | | 159 | break |
160 | done | | 160 | done |
161 | done | | 161 | done |