blob: 585a4b6d79e031bb68cdca96b0ff122bffadb441 (
plain)
1 # Description: Tool to detect other OSes.
2 # URL: http://joey.kitenet.net/code/os-prober
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: grub2
5
6 name=os-prober
7 version=1.81
8 release=1
9 source=(http://ftp.de.debian.org/debian/pool/main/o/$name/${name}_$version.tar.xz
10 # grabbed from gentoo
11 os-prober-1.79-btrfs-subvolume-detection.patch
12 os-prober-1.79-use-fstab-name.patch
13 os-prober-1.79-mounted-boot-partition-fix.patch
14 os-prober-1.79-fix-busy-umount-message.patch
15 os-prober-1.79-efi-chroot-blkid-fallback.patch
16 add-CRUX-detection.patch)
17
18 build() {
19 cd $name-$version
20
21 patch -Np1 -i $SRC/add-CRUX-detection.patch
22 patch -Np1 -i $SRC/os-prober-1.79-btrfs-subvolume-detection.patch
23 patch -Np1 -i $SRC/os-prober-1.79-use-fstab-name.patch
24 patch -Np1 -i $SRC/os-prober-1.79-mounted-boot-partition-fix.patch
25 patch -Np1 -i $SRC/os-prober-1.79-fix-busy-umount-message.patch
26 patch -Np1 -i $SRC/os-prober-1.79-efi-chroot-blkid-fallback.patch
27
28 # Adjust lib dir to allow detection of 64-bit distros
29 sed -i -e "s:/lib/ld\*\.so\*:/lib*/ld*.so*:g" os-probes/mounted/common/90linux-distro
30 rm -f Makefile
31 make newns
32
33 find . -iname "*.orig" -delete
34
35 install -Dm755 linux-boot-prober $PKG/usr/bin/linux-boot-prober
36 install -Dm755 $name $PKG/usr/bin/$name
37 install -Dm755 newns $PKG/usr/lib/$name/newns
38 install -Dm755 common.sh $PKG/usr/share/$name/common.sh
39 for i in os-probes os-probes/mounted os-probes/init linux-boot-probes linux-boot-probes/mounted; do
40 install -dm755 $PKG/usr/lib/$i
41 install -m755 -t $PKG/usr/lib/$i $i/common/*
42 [[ -d $i/x86 ]] && cp -r $i/x86/* $PKG/usr/lib/$i
43 done
44 install -Dm755 os-probes/mounted/powerpc/20macosx $PKG/usr/lib/os-probes/mounted/20macosx
45 install -dm755 $PKG/var/lib/$name
46 }
|