open-iscsi: convert to new package format

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-12-17 13:20:36 +01:00
parent bc459cf9cb
commit 72c017fe1e
8 changed files with 26 additions and 68 deletions

View File

@ -36,10 +36,12 @@ PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
if [ "$ISCSI_SUPPORT" = yes ]; then
PKG_DEPENDS="$PKG_DEPENDS open-iscsi"
PKG_DEPENDS="$PKG_DEPENDS open-iscsi:init"
fi
makeinstall_target() {
cd $INSTALL_INIT
post_install() {
cd $ROOT/$BUILD/initramfs
mkdir -p $ROOT/$BUILD/image/
find . | cpio -H newc -ov -R 0:0 > $ROOT/$BUILD/image/initramfs.cpio
cd -
}

View File

@ -1,34 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2012 Yann Cézard (eesprit@free.fr)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
export OPTFLAGS="$CFLAGS $LDFLAGS"
cd $PKG_BUILD/utils/open-isns
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--with-security=no \
cd ../..
make user

View File

@ -1,29 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2012 Yann Cézard (eesprit@free.fr)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
OPEN_ISCSI_DIR="$BUILD/open-iscsi-$PKG_VERSION"
mkdir -p $INSTALL/sbin
cp -P $OPEN_ISCSI_DIR/usr/iscsistart $INSTALL/sbin

View File

@ -27,11 +27,30 @@ PKG_LICENSE="GPL"
PKG_SITE="https://github.com/mikechristie/open-iscsi"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain util-linux"
PKG_BUILD_DEPENDS_INIT="toolchain util-linux"
PKG_PRIORITY="optional"
PKG_SECTION="initramfs/system"
PKG_SHORTDESC="open-iscsi: system utilities for Linux to access iSCSI targets"
PKG_LONGDESC="The open-iscsi package allows you to mount iSCSI targets. This package add support for using iscsi target as root device."
PKG_IS_ADDON="no"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
PKG_MAKE_OPTS_INIT="user"
pre_configure_init() {
export OPTFLAGS="$CFLAGS $LDFLAGS"
}
configure_init() {
cd utils/open-isns
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--with-security=no
cd ../..
}
makeinstall_init() {
mkdir -p $INSTALL/sbin
cp -P $ROOT/$PKG_BUILD/usr/iscsistart $INSTALL/sbin
}