add qbittorrent and luci

This commit is contained in:
coolsnowwolf 2019-06-11 18:51:44 +08:00
parent 129f56731e
commit 95e7f198a4
11 changed files with 587 additions and 0 deletions

View File

@ -0,0 +1,63 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-qbittorrent
PKG_VERSION=1.0
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/luci-app-qbittorrent/temple
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=qbittorrent-nox for LuCI
PKGARCH:=all
DEPENDS:=+qbittorrent-nox
endef
define Package/luci-app-qbittorrent
$(call Package/luci-app-qbittorrent/temple)
endef
define Package/luci-i18n-qbittorrent-zh-cn
$(call Package/luci-app-qbittorrent/temple)
DEPENDS:=+luci-app-qbittorrent
endef
define Package/luci-app-qbittorrent/description
This package contains LuCI configuration pages for qbittorrent-nox
endef
define Package/luci-i18n-qbittorrent-zh-cn/description
Translation support for luci-app-qbittorrent - 简体中文 (Simplified Chinese)
endef
define Build/Prepare
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/luci-app-qbittorrent/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_CONF) ./src/config/qbittorrent $(1)/etc/config/qbittorrent
$(INSTALL_BIN) ./src/init.d/qbittorrent $(1)/etc/init.d/qbittorrent
$(INSTALL_DATA) ./src/cbi/qbittorrent.lua $(1)/usr/lib/lua/luci/model/cbi/qbittorrent.lua
$(INSTALL_DATA) ./src/controller/qbittorrent.lua $(1)/usr/lib/lua/luci/controller/qbittorrent.lua
endef
define Package/luci-i18n-qbittorrent-zh-cn/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$(INSTALL_DATA) ./src/i18n/*.lmo $(1)/usr/lib/lua/luci/i18n/
endef
$(eval $(call BuildPackage,luci-app-qbittorrent))
$(eval $(call BuildPackage,luci-i18n-qbittorrent-zh-cn))

View File

@ -0,0 +1,44 @@
require("luci.sys")
local e=require"luci.model.uci".cursor()
local o=e:get_first("qbittorrent","Preferences","port")or 8080
local a=(luci.sys.call("pidof qbittorrent-nox > /dev/null")==0)
local t=""
local e=""
if a then
t="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class=\"cbi-button cbi-button-apply\" type=\"submit\" value=\" "..translate("Open Web Interface").." \" onclick=\"window.open('http://'+window.location.hostname+':"..o.."')\"/>"
end
if a then
e="<b><font color=\"green\">"..translate("Running").."</font></b>"
else
e="<b><font color=\"red\">"..translate("Not running").."</font></b>"
end
m = Map("qbittorrent", translate("qbittorrent"), translate("A BT/PT downloader base on Qt")..t
.."<br/><br/>"..translate("qbittorrent Run Status").." : "..e.."<br/>")
s_basic = m:section(TypedSection, "basic", translate("Basic Settings"))
s_basic.anonymous = true
enable = s_basic:option(Flag, "enable", translate("Enable"))
profile_dir = s_basic:option(Value,"profile_dir",translate("profile_dir"),translate("Store configuration files in the Path"))
profile_dir.default = "/tmp"
program_dir = s_basic:option(Value,"program_dir",translate("program_dir"),translate("Store Program files in the Path"))
program_dir.default = "/usr/bin"
library_dir = s_basic:option(Value,"library_dir",translate("library_dir"),translate("Store Library in the Path"))
library_dir.default = "/usr/lib"
s_download = m:section(TypedSection, "Preferences", translate("Download Settings"))
s_download.anonymous = true
download_dir = s_download:option(Value,"download_dir",translate("download_dir"),translate("Store download files in the Path"))
download_dir.default = "/tmp/download"
s_webui = m:section(TypedSection, "Preferences", translate("WEBUI Settings"))
s_webui.anonymous = true
port = s_webui:option(Value,"port",translate("port"),translate("WEBUI listening port"))
port.default = "8080"
local apply = luci.http.formvalue("cbi.apply")
if apply then
io.popen("/etc/init.d/qbittorrent restart")
end
return m

View File

@ -0,0 +1,3 @@
config basic
config Preferences

View File

@ -0,0 +1,4 @@
module("luci.controller.qbittorrent",package.seeall)
function index()
entry({"admin","services","qbittorrent"},cbi("qbittorrent"),_("qbittorrent"))
end

View File

@ -0,0 +1,67 @@
#!/bin/sh /etc/rc.common
START=99
config_qbittorrent()
{
local download_dir
local port
config_get download_dir $1 download_dir
config_get port $1 port
if [ -f $2/qBittorrent/config/qBittorrent.conf ]; then
sed -i 's/WebUI\\Port=[0-9]*/WebUI\\Port='"$port"'/g' $2/qBittorrent/config/qBittorrent.conf
sed -i 's/Downloads\\SavePath=[a-z,/]*//g' $2/qBittorrent/config/qBittorrent.conf
echo "Downloads\SavePath=$down" >> $2/qBittorrent/config/qBittorrent.conf
else
cat>$2/qBittorrent/config/qBittorrent.conf<<EOF
[AutoRun]
enabled=false
program=
[LegalNotice]
Accepted=true
[Network]
Cookies=@Invalid()
[Preferences]
Downloads\SavePath=$download_dir
General\Locale=zh
WebUI\Port=$port
EOF
fi
}
run_qbittorrent()
{
local enable
config_get_bool enable $1 enable
if [ $enable ]; then
local profile_dir
config_get profile_dir $1 profile_dir
config_foreach config_qbittorrent 'Preferences' $profile_dir
if [ "$profile_dir" != "" ]; then
config_get library_dir $1 library_dir
config_get program_dir $1 program_dir
export PATH=$PATH:$program_dir
export LD_LIBRARY_PATH=$library_dir
qbittorrent-nox -d --profile=$profile_dir
else
echo "no profile_dir,stop!"
fi
fi
}
start()
{
local profile_path
config_load 'qbittorrent'
config_foreach run_qbittorrent 'basic'
}
stop()
{
killall qbittorrent-nox
return 0
}

View File

@ -0,0 +1,57 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=qBittorrent
PKG_VERSION:=4.1.3
PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/qbittorrent/qBittorrent.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=a574c4a70a5a3293d2f6135952c301d930d23627
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
define Package/qBittorrent
SUBMENU:=BitTorrent
SECTION:=net
CATEGORY:=Network
TITLE:=bittorrent client programmed in C++ / Qt
URL:=https://www.qbittorrent.org/
DEPENDS:=+qt5-core +qt5-network +qt5-xml +rblibtorrent
endef
define Package/qBittorrent/description
qBittorrent is a bittorrent client programmed in C++ / Qt that uses
libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
It aims to be a good alternative to all other bittorrent clients out
there. qBittorrent is fast, stable and provides unicode support as
well as many features.
endef
CONFIGURE_VARS += \
QT_QMAKE="$(TOOLCHAIN_DIR)/bin" \
PKG_CONFIG_PATH="$(TOOLCHAIN_DIR)/lib/pkgconfig"
CONFIGURE_ARGS += \
--disable-gui \
--with-boost=$(STAGING_DIR)/usr
MAKE_VARS += \
INSTALL_ROOT="$(PKG_INSTALL_DIR)"
define Package/qBittorrent/install
$(INSTALL_DIR) $(1)/usr/man/man1
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/man/man1/qbittorrent-nox.1 $(1)/usr/man/man1/qbittorrent-nox.1
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qbittorrent-nox $(1)/usr/bin
endef
$(eval $(call BuildPackage,qBittorrent))

212
package/lean/qt5/Makefile Normal file
View File

@ -0,0 +1,212 @@
#
# Copyright (C) 2013 Riccardo Ferrazzo <f.riccardo87@gmail.com>
# Copyright (C) 2017 Paweł Knioła <pawel.kn@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qt5
PKG_VERSION:=5.8
PKG_RELEASE:=0
PKG_MD5SUM:=a9f2494f75f966e2f22358ec367d8f41
PKG_SOURCE:=qt-everywhere-opensource-src-$(PKG_VERSION).$(PKG_RELEASE).tar.gz
PKG_SOURCE_URL:=http://download.qt-project.org/archive/qt/$(PKG_VERSION)/$(PKG_VERSION).$(PKG_RELEASE)/single
PKG_BUILD_DIR=$(BUILD_DIR)/qt-everywhere-opensource-src-$(PKG_VERSION).$(PKG_RELEASE)
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
# not using sstrip here as this fucks up the .so's somehow
STRIP:=/bin/true
RSTRIP:= \
NM="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)nm" \
STRIP="$(STRIP)" \
STRIP_KMOD="$(STRIP)" \
$(SCRIPT_DIR)/rstrip.sh
define Package/qt5/Default
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Qt5
TITLE:=qt5
URL:=http://qt-project.org
DEPENDS:=+libatomic +libstdcpp +libopenssl +zlib @!LINUX_2_6
endef
define Package/qt5-core
$(call Package/qt5/Default)
TITLE+=core
endef
define Package/qt5-concurrent
$(call Package/qt5/Default)
TITLE+=concurrent
DEPENDS+=+qt5-core
endef
define Package/qt5-network
$(call Package/qt5/Default)
TITLE+=network
DEPENDS+=+qt5-core
endef
define Package/qt5-widgets
$(call Package/qt5/Default)
TITLE+=widgets
DEPENDS+=+qt5-core +qt5-network
endef
define Package/qt5-sql
$(call Package/qt5/Default)
TITLE+=sql
DEPENDS+=+qt5-core
endef
define Package/qt5-xml
$(call Package/qt5/Default)
TITLE+=xml
DEPENDS+=+qt5-core
endef
define Package/qt5-xmlpatterns
$(call Package/qt5/Default)
TITLE+=xmlpatterns
DEPENDS+=+qt5-core +qt5-network
endef
define Package/qt5-test
$(call Package/qt5/Default)
TITLE+=test
DEPENDS+=+qt5-core
endef
define Build/Configure
$(INSTALL_DIR) $(PKG_BUILD_DIR)/qtbase/mkspecs/linux-openwrt-g++
$(CP) ./files/qplatformdefs.h $(PKG_BUILD_DIR)/qtbase/mkspecs/linux-openwrt-g++/qplatformdefs.h
$(CP) ./files/qmake.conf $(PKG_BUILD_DIR)/qtbase/mkspecs/linux-openwrt-g++/qmake.conf
$(SED) 's@$$$$(TARGET_CROSS)@$(TARGET_CROSS)@g' $(PKG_BUILD_DIR)/qtbase/mkspecs/linux-openwrt-g++/qmake.conf
( cd $(PKG_BUILD_DIR) ; \
./configure \
-prefix $(TOOLCHAIN_DIR) \
-xplatform linux-openwrt-g++ \
-opensource \
-confirm-license \
-no-iconv \
-no-pch \
-no-rpath \
-no-qml-debug \
-no-strip \
-no-cups \
-no-dbus \
-no-eglfs \
-no-kms \
-no-opengl \
-no-directfb \
-no-xcb \
-qt-zlib \
-qt-pcre \
-qt-freetype \
-make libs \
-nomake examples \
-nomake tools \
-nomake tests \
-skip qtdeclarative \
-skip qtmultimedia \
-skip activeqt \
-skip qtdoc \
-skip qtconnectivity \
-skip wayland \
-skip qtscript \
-v \
)
endef
define Build/Compile
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
endef
define Package/qt5-core/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Core.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Core.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Core.la $(1)/usr/lib/
endef
define Package/qt5-concurrent/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Concurrent.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Concurrent.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Concurrent.la $(1)/usr/lib/
endef
define Package/qt5-network/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Network.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Network.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Network.la $(1)/usr/lib/
endef
define Package/qt5-widgets/install
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/Qt/plugins/generic/
$(INSTALL_DIR) $(1)/usr/lib/Qt/plugins/platforms/
$(INSTALL_DIR) $(1)/usr/lib/Qt/plugins/imageformats/
$(INSTALL_DIR) $(1)/usr/lib/fonts/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Gui.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Gui.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Gui.la $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtsvg/lib/libQt5Svg.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtsvg/lib/libQt5Svg.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtsvg/lib/libQt5Svg.la $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Widgets.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Widgets.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Widgets.la $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/plugins/generic/*.so $(1)/usr/lib/Qt/plugins/generic/
$(CP) $(PKG_BUILD_DIR)/qtbase/plugins/platforms/*.so $(1)/usr/lib/Qt/plugins/platforms/
$(CP) $(PKG_BUILD_DIR)/qtbase/plugins/imageformats/*.so $(1)/usr/lib/Qt/plugins/imageformats/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/fonts/* $(1)/usr/lib/fonts/
endef
define Package/qt5-sql/install
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/Qt/plugins/sqldrivers/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Sql.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Sql.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Sql.la $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/plugins/sqldrivers/*.so $(1)/usr/lib/Qt/plugins/sqldrivers/
endef
define Package/qt5-xml/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Xml.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Xml.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Xml.la $(1)/usr/lib/
endef
define Package/qt5-xmlpatterns/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtxmlpatterns/lib/libQt5XmlPatterns.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtxmlpatterns/lib/libQt5XmlPatterns.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtxmlpatterns/lib/libQt5XmlPatterns.la $(1)/usr/lib/
endef
define Package/qt5-test/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Test.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Test.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Test.la $(1)/usr/lib/
endef
$(eval $(call BuildPackage,qt5-core))
$(eval $(call BuildPackage,qt5-concurrent))
$(eval $(call BuildPackage,qt5-network))
$(eval $(call BuildPackage,qt5-widgets))
$(eval $(call BuildPackage,qt5-sql))
$(eval $(call BuildPackage,qt5-xml))
$(eval $(call BuildPackage,qt5-xmlpatterns))
$(eval $(call BuildPackage,qt5-test))

View File

@ -0,0 +1,26 @@
#
# qmake configuration for building with linux-openwrt-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
# modifications to g++.conf
QMAKE_CC = $(TARGET_CROSS)gcc
QMAKE_CXX = $(TARGET_CROSS)g++
QMAKE_CFLAGS += -mips32r2 -mtune=24kc -msoft-float
QMAKE_CXXFLAGS += $${QMAKE_CFLAGS}
QMAKE_LINK = $(TARGET_CROSS)g++
QMAKE_LINK_SHLIB = $(TARGET_CROSS)g++
# modifications to linux.conf
QMAKE_AR = $(TARGET_CROSS)ar cqs
QMAKE_OBJCOPY = $(TARGET_CROSS)objcopy
QMAKE_NM = $(TARGET_CROSS)nm -P
QMAKE_STRIP = $(TARGET_CROSS)strip
load(qt_config)

View File

@ -0,0 +1,40 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../linux-g++/qplatformdefs.h"

View File

@ -0,0 +1,71 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rblibtorrent
PKG_VERSION:=1.1.11
PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/arvidn/libtorrent.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=25a1f12991b4af1e133b966fae963168116306e9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYING
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/rblibtorrent
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Rasterbar BitTorrent library
URL:=https://www.libtorrent.org/
DEPENDS:=+libstdcpp +libopenssl +boost +boost-system +boost-chrono +boost-random
MAINTAINER:=Arvid Norberg <arvid@libtorrent.org>
endef
define Package/rblibtorrent/description
Rasterbar libtorrent is a C++ library that aims to be a good alternative to
all the other bittorrent implementations around. It is a library and not a
full featured client, although it comes with a working example client.
endef
TARGET_CFLAGS += $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
TARGET_LDFLAGS += -lstdc++
CONFIGURE_ARGS += \
--prefix /usr \
--enable-shared \
--enable-static \
--disable-debug \
--enable-encryption \
--with-boost=$(STAGING_DIR)/usr
define Build/Configure
cd $(PKG_BUILD_DIR) ; \
sh autotool.sh
$(call Build/Configure/Default)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libtorrent $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent-rasterbar.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent-rasterbar.pc $(1)/usr/lib/pkgconfig/
endef
define Package/rblibtorrent/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent-rasterbar.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,rblibtorrent))