Gbittorrent make file:
Code: Select all
include $(TOPDIR)/rules.mk
PKG_NAME:=qBittorrent
PKG_VERSION:=4.3.1
PKG_RELEASE=0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/qbittorrent/qBittorrent.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=587688634561b17229a6f5951478cbdd5ae0c128
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Krypton Lee <[email protected]>
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:=+libQt5Core +libQt5Network +libQt5Xml +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=$(STAGING_DIR_HOSTPKG)/bin \
QMAKE_LRELEASE=$(STAGING_DIR_HOSTPKG)/bin/lrelease \
PKG_CONFIG_PATH=$(STAGING_DIR)/usr/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))
Code: Select all
include $(TOPDIR)/rules.mk
PKG_NAME:=rblibtorrent
PKG_VERSION:=1.2.11
PKG_RELEASE=0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/arvidn/libtorrent.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=471e772cb7038f1bf5f44c32a09eb42fbb80ee99
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Krypton Lee <[email protected]>
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
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:=+boost +boost-system +boost-chrono +boost-random +libopenssl +libstdcpp
MAINTAINER:=Arvid Norberg <[email protected]>
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 += \
--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))
But if I want compile libtorrent-rasterbar 2.0 and use thise make file:
Code: Select all
include $(TOPDIR)/rules.mk
PKG_NAME:=libtorrent-rasterbar
PKG_VERSION:=2.0.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/arvidn/libtorrent/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=cf906167e0b332681f6304a9bb740404a53bb0efed39897e1d2bd0f6f0d9e9cd
PKG_MAINTAINER:=David Yang <[email protected]>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libtorrent-rasterbar/Default
TITLE:=Rasterbar BitTorrent library
URL:=https://libtorrent.org/
endef
define Package/libtorrent-rasterbar
$(call Package/libtorrent-rasterbar/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+boost-system +libopenssl
endef
#define Package/python3-libtorrent
# $(call Package/libtorrent-rasterbar/Default)
# SECTION:=lang
# CATEGORY:=Languages
# SUBMENU:=Python
# TITLE+= (Python 3)
# DEPENDS:=+libtorrent-rasterbar +boost-python
#endef
define Package/libtorrent-rasterbar/description
Rasterbar libtorrent is a C++ library that aims to be a good alternative to
all the other bittorrent implementations around.
endef
#define Package/python3-libtorrent/description
# $(call Package/libtorrent-rasterbar/description)
# This package contains Python 3 bindings for the libtorrent-rasterbar library.
#endef
define Download/try_signal
VERSION:=2a99893f92b29a5948569cba1e16fd259dbc2016
SUBDIR:=deps/try_signal
FILE:=$(PKG_NAME)-try_signal-$$(VERSION).tar.xz
URL:=https://github.com/arvidn/try_signal.git
MIRROR_HASH:=4dee408897de3475e6f7eca9c4e4617c3e746351d01cec3cccac38b9b4d38302
PROTO:=git
endef
$(eval $(call Download,try_signal))
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
define Build/Prepare
$(Build/Prepare/Default)
$(eval $(Download/try_signal))
xzcat $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
endef
#CMAKE_OPTIONS += \
# -Dpython-bindings=ON \
# -Dpython-egg-info=ON
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.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/libtorrent-rasterbar/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent-rasterbar.so.* $(1)/usr/lib/
endef
#define Package/python3-libtorrent/install
# $(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages
# $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/*.so* $(1)/usr/lib/python2.7/site-packages/
#endef
$(eval $(call BuildPackage,libtorrent-rasterbar))
Code: Select all
aarch64-openwrt-linux-musl-g++ -c -pipe -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/osboxes/openwrt/build_dir/target-aarch64_cortex-a53_musl/qBittorrent-4.3.1=qBittorrent-4.3.1 -Wformat -Werror=format-security -fstack-protector -Wl,-z,now -Wl,-z,relro -fexceptions -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/osboxes/openwrt/build_dir/target-aarch64_cortex-a53_musl/qBittorrent-4.3.1=qBittorrent-4.3.1 -Wformat -Werror=format-security -fstack-protector -Wl,-z,now -Wl,-z,relro -Wall -Wextra -Wpedantic -Wformat-security -O2 -D_REENTRANT -Wall -Wextra -fPIC -D_FORTIFY_SOURCE=1 -DTORRENT_LINKING_SHARED -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_NO_DEPRECATED -DTORRENT_USE_OPENSSL -DTORRENT_USE_LIBCRYPTO -DTORRENT_SSL_PEERS -DOPENSSL_NO_SSL2 -D_FORTIFY_SOURCE=1 -DDISABLE_GUI -DQT_NO_DEBUG_OUTPUT -DQBT_VERSION_MAJOR=4 -DQBT_VERSION_MINOR=3 -DQBT_VERSION_BUGFIX=1 -DQBT_VERSION_BUILD=0 -DQBT_VERSION=\"v4.3.1\" -DQBT_VERSION_2=\"4.3.1\" -DQT_DEPRECATED_WARNINGS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_USE_QSTRINGBUILDER -DQT_STRICT_ITERATORS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I/usr/include -I. -Iapp -I../../qt-everywhere-src-5.14.2/ipkg-install/usr/include -I../../qt-everywhere-src-5.14.2/ipkg-install/usr/include/QtNetwork -I../../qt-everywhere-src-5.14.2/ipkg-install/usr/include/QtXml -I../../qt-everywhere-src-5.14.2/ipkg-install/usr/include/QtCore -I. -I../../../../staging_dir/hostpkg/mkspecs/linux-openwrt-g++ -o application.o app/application.cpp
In file included from /usr/include/assert.h:35,
from ../../qt-everywhere-src-5.14.2/ipkg-install/usr/include/QtCore/qglobal.h:50,
from ../../qt-everywhere-src-5.14.2/ipkg-install/usr/include/QtCore/qsharedpointer.h:43,
from ../../qt-everywhere-src-5.14.2/ipkg-install/usr/include/QtCore/qpointer.h:43,
from ../../qt-everywhere-src-5.14.2/ipkg-install/usr/include/QtCore/QPointer:1,
from app/application.h:32,
from app/application.cpp:30:
/usr/include/features.h:388:10: fatal error: gnu/stubs.h: No such file or directory
#include <gnu/stubs.h>
^~~~~~~~~~~~~
compilation terminated.
Makefile:6131: recipe for target 'application.o' failed
make[5]: *** [application.o] Error 1
make[5]: Leaving directory '/home/osboxes/openwrt/build_dir/target-aarch64_cortex-a53_musl/qBittorrent-4.3.1/src'
Makefile:46: recipe for target 'sub-src-make_first' failed
make[4]: *** [sub-src-make_first] Error 2
make[4]: Leaving directory '/home/osboxes/openwrt/build_dir/target-aarch64_cortex-a53_musl/qBittorrent-4.3.1'
Makefile:66: recipe for target '/home/osboxes/openwrt/build_dir/target-aarch64_cortex-a53_musl/qBittorrent-4.3.1/.built' failed
make[3]: *** [/home/osboxes/openwrt/build_dir/target-aarch64_cortex-a53_musl/qBittorrent-4.3.1/.built] Error 2
make[3]: Leaving directory '/home/osboxes/openwrt/package/qbittorrent/qBittorrent'
time: package/qbittorrent/qBittorrent/compile#30.91#19.86#396.69
ERROR: package/qbittorrent/qBittorrent failed to build.
package/Makefile:112: recipe for target 'package/qbittorrent/qBittorrent/compile' failed
make[2]: *** [package/qbittorrent/qBittorrent/compile] Error 1
make[2]: Leaving directory '/home/osboxes/openwrt'
package/Makefile:108: recipe for target '/home/osboxes/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile' failed
make[1]: *** [/home/osboxes/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/osboxes/openwrt'
/home/osboxes/openwrt/include/toplevel.mk:240: recipe for target 'world' failed
make: *** [world] Error 2