#!/bin/sh -e set -e D=${PWD} D_PREFIX="/raid0/data/module/LADVD/system" rm -rf tmp mkdir tmp mkdir tmp/build mkdir tmp/install mkdir tmp/install/sbin mkdir tmp/install/var mkdir tmp/install/var/run mkdir tmp/install/var/run/ladvd pushd tmp/build export CFLAGS="-O2 -g -march=i686 -mcpu=i686" # ladvd tar xvfz ${D}/sources/ladvd-0.9.2.tar.gz pushd ladvd-0.9.2 ./configure --prefix=${D_PREFIX} sed -i ' s/#define HAVE_DECL_GET_VLAN_REALDEV_NAME_CMD 0/#undef HAVE_DECL_GET_VLAN_REALDEV_NAME_CMD/; s/#define HAVE_LINUX_ETHTOOL_H 1/#undef HAVE_LINUX_ETHTOOL_H/; s/#define PACKAGE_USER "ladvd"/#define PACKAGE_USER "root"/; s@#define PACKAGE_CHROOT_DIR "/var/run/" PACKAGE_NAME@#define PACKAGE_CHROOT_DIR "'${D_PREFIX}'/var/run/" PACKAGE_NAME@; s@#define PACKAGE_PID_DIR "/var/run"@#define PACKAGE_PID_DIR "'${D_PREFIX}'/var/run"@' \ src/config.h sed -i '872d' \ src/netif.c make install -D -p -m 755 src/ladvd ${D}/tmp/install/sbin/ladvd ln -sf ${D}/tmp/install/sbin/ladvdc ladvd popd