#!/bin/sh # Build drbd for Syn-3. #NEED:git #DEP:linux #DEP:linux_src #DEP:linux_headers #NEED:libxslt #NEED:udev CWD=`pwd` TMP=/$CWD/tmp PKG=$TMP/package-drbd rm -rf $PKG mkdir -p $PKG VERSION=8.4.11-1 PKGVERSION=`echo $VERSION| sed 's/-/_/'` tar -xzf drbd-$VERSION.tar.gz || exit 1 cd drbd-$VERSION ARCH=${ARCH:-i486} BUILD=1DatuX chown -R root.root . if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi #autoreconf || exit 1 #./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-km --with-utils --without-heartbeat without-pacemaker --without-rgmanager --without-xen || exit 1 #userspace tools #make -j1 || exit 1 #make doc || exit 1 #make -j1 DESTDIR=$PKG install || exit 1 #kernel module #cd drbd make clean all || exit 1 make -j1 || exit 1 make -j1 install DESTDIR=$PKG || exit 1 #mkdir -p $PKG/lib/modules/`uname -r`/kernel/drivers/block #cp drbd.ko $PKG/lib/modules/`uname -r`/kernel/drivers/block || exit 1 # En uiteraard mag de vette postinstall niet ontbreken. mkdir -p $PKG/etc/postinst.d/ cp $CWD/post.drbd $PKG/etc/postinst.d chmod +x $PKG/etc/postinst.d/post.drbd || exit 1 # services voor firewall mkdir -p $PKG/home/system/firewall || exit 1 cp $CWD/services.drbd $PKG/home/system/firewall || exit 1 mkdir -p $PKG/etc/boot.d || exit 1 cp $CWD/boot.drbd $PKG/etc/boot.d || exit 1 chmod +x $PKG/etc/boot.d/* || exit 1 #package maken cd $PKG #makepkg -l y -c n $TMP/samba-$VERSION-$ARCH-$BUILD.tgz #mv $TMP/samba-$VERSION-$ARCH-$BUILD.tgz $CWD NAME=`echo $0|cut -f2 -d'.'` makepkg -l y -c n $CWD/$NAME.pkg > /dev/null && echo $PKGVERSION > $CWD/$NAME.version && arch > $CWD/$NAME.arch