luci-app-qbittorrent/qBittorrent/Makefile
2022-12-22 05:05:25 +08:00

95 lines
2.4 KiB
Makefile

#
# Copyright (C) 2017-2020
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qbittorrent
PKG_VERSION:=4.5.0
PKG_RELEASE=1
PKG_SOURCE:=qBittorrent-release-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/qbittorrent/qBittorrent/tar.gz/release-$(PKG_VERSION)?
PKG_HASH:=9c44acc3ee28a3c99067e82f57d79e001a54ef8bdf41c63a97dd04c6633ee9dc
PKG_BUILD_DIR:=$(BUILD_DIR)/qBittorrent-release-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:qbittorrent:qbittorrent
PKG_BUILD_DEPENDS:=qt6tools/host
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/qbittorrent
SECTION:=net
CATEGORY:=Network
SUBMENU:=BitTorrent
DEPENDS:=+USE_GLIBC:librt +USE_GLIBC:libpthread +libgcc +libstdcpp \
+rblibtorrent \
+libQt6Core \
+libQt6Network \
+libQt6Sql \
+libQt6Xml \
+qt6-plugin-libqopensslbackend \
+qt6-plugin-libqsqlite
TITLE:=bittorrent client programmed in C++ / Qt
URL:=https://www.qbittorrent.org/
PROVIDES:=qBittorrent
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
CMAKE_OPTIONS += \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DQT6=ON \
-DSTACKTRACE=OFF \
-DWEBUI=ON \
-DGUI=OFF \
-DVERBOSE_CONFIGURE=ON \
-DQT_ADDITIONAL_PACKAGES_PREFIX_PATH=$(STAGING_DIR_HOSTPKG)
ifdef CONFIG_USE_MIPS16
TARGET_CFLAGS += -minterlink-mips16
endif
ifdef CONFIG_USE_GLIBC
TARGET_LDFLAGS += -ldl -lrt -lpthread
endif
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto
ifeq ($(ARCH),i386)
ifneq ($(findstring pentium-mmx,$(CONFIG_CPU_TYPE)),)
TARGET_CFLAGS := $(filter-out -flto,$(TARGET_CFLAGS))
TARGET_LDFLAGS := $(filter-out -flto,$(TARGET_LDFLAGS))
endif
endif
define Package/qbittorrent/conffiles
/etc/config/qbittorrent
endef
define Package/qbittorrent/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qbittorrent-nox $(1)/usr/bin
endef
$(eval $(call BuildPackage,qbittorrent))