#Maintainer: Dimitris Tzemos pkgname=os-prober pkgver=1.77 pkgrel=1dj source=("http://ftp.de.debian.org/debian/pool/main/o/os-prober/os-prober_$pkgver.tar.xz" "http://slackware.uk/slackware/slackware64-current/source/a/os-prober/os-prober.reiserfs.diff.gz" "http://slackware.uk/slackware/slackware64-current/source/a/os-prober/os-prober.lvm2.diff.gz") sourcetemplate="http://people.salixos.org/djemos/salix/$pkgname/" docs=("readme" "todo") url='http://packages.debian.org/unstable/utils/os-prober' slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "os-prober (an OS detector)" "os-prober detects OSes on other partitions than the current system" "partition, and outputs the results in a generic machine-readable" "format. This information can be used to add other OSes to the boot" "loader." "" "Homepage: http://packages.debian.org/unstable/utils/os-prober" ) build() { cd $startdir/src/$pkgname-$pkgver # Edit the scripts to use $LIBDIRSUFFIX=64 if needed: if [ "$LIBDIRSUFFIX" = "64" ]; then find -type f -exec sed -i -e 's|usr/lib|usr/lib64|g' {} \; fi rm -f Makefile # Don't drop support for reiserfs. It's still in the kernel (for # now): zcat $startdir/src/os-prober.reiserfs.diff.gz | patch -p1 --verbose || return 1 # Fix detecting LVM2 volumes: zcat $startdir/src/os-prober.lvm2.diff.gz | patch -p1 --verbose || return 1 make newns || return 1 install -Dm 755 os-prober linux-boot-prober -t "${PKG}/usr/bin" install -Dm 755 newns -t "${PKG}/usr/lib${LIBDIRSUFFIX}/os-prober" install -Dm 755 common.sh -t "${PKG}/usr/share/os-prober" for dir in os-probes os-probes/mounted os-probes/init linux-boot-probes linux-boot-probes/mounted; do install -dm 755 "$PKG/usr/lib${LIBDIRSUFFIX}/${dir}" install -m 755 -t "$PKG/usr/lib${LIBDIRSUFFIX}/${dir}" "${dir}"/common/* [[ -d "$dir"/x86 ]] && cp -r "$dir"/x86/* "$PKG/usr/lib/$dir" done install -Dm 755 os-probes/mounted/powerpc/20macosx "$PKG"/usr/lib${LIBDIRSUFFIX}/os-probes/mounted/20macosx install -dm 755 "$PKG"/var/lib/os-prober }