New Package - mt7601u

This commit is contained in:
Lukas Rusak 2015-04-11 12:29:02 -07:00
parent 6dcc19b32d
commit 549f2649f3
2 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,44 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC 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 of the License, or
# (at your option) any later version.
#
# OpenELEC 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. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="mt7601u"
PKG_VERSION="ba391b3"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
# mediatek: PKG_SITE="http://www.mediatek.com/en/downloads/mt7601u-usb/"
PKG_SITE="https://github.com/kuba-moo/mt7601u"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_PRIORITY="optional"
PKG_SECTION="driver"
PKG_SHORTDESC="mt7601u linux 3.19+ driver"
PKG_LONGDESC="mt7601u linux 3.19+ driver"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
make_target() {
KDIR=$(kernel_path) make
}
makeinstall_target() {
mkdir -p $INSTALL/lib/modules/$(get_module_dir)/$PKG_NAME
cp $ROOT/$PKG_BUILD/mt7601u.ko $INSTALL/lib/modules/$(get_module_dir)/$PKG_NAME
}

43
tools/mkpkg/mkpkg_mt7601u Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# 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, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
echo "getting sources..."
if [ ! -d mt7601u.git ]; then
git clone https://github.com/kuba-moo/mt7601u.git mt7601u.git
fi
cd mt7601u.git
git pull
GIT_REV=`git log -n1 --format=%h`
cd ..
echo "copying sources..."
rm -rf mt7601u-$GIT_REV
cp -R mt7601u.git mt7601u-$GIT_REV
echo "cleaning sources..."
rm -rf mt7601u-$GIT_REV/.git
echo "packing sources..."
tar cvJf mt7601u-$GIT_REV.tar.xz mt7601u-$GIT_REV
echo "remove temporary sourcedir..."
rm -rf mt7601u-$GIT_REV