Files
haikuports/sys-fs/android_file_transfer/android_file_transfer-4.3~git.recipe
PulkoMandy c8deac17ae android_file_transfer: enable FUSE userlandfs add-on
I got this working some time ago but then I never got to enable it in the
recipe. It allows to access a mounted Android phone in Tracker, no Qt
needed.

Split the Qt app into a separate package so that doing this does not
require installing Qt. It allows to access a mounted Android phone in
Tracker, no Qt needed.

Split the Qt app into a separate package so that doing this does not
require installing Qt..
2024-04-18 21:14:12 +02:00

95 lines
2.7 KiB
Bash

SUMMARY="Android File Transfer"
DESCRIPTION="Reliable MTP client with userlandfs integration
Features:
* No file size limits.
* Automatically renames album cover to make it visible from media player.
* No extra dependencies (e.g. libptp/libmtp)."
HOMEPAGE="https://whoozle.github.io/android-file-transfer-linux/"
COPYRIGHT="2015-2019 Vladimir Menshakov"
LICENSE="GNU LGPL v2.1"
REVISION="5"
srcGitRev="a64c8bec89c2795b09d1ba868c179d4d22e562ec"
SOURCE_URI="https://github.com/whoozle/android-file-transfer-linux/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="056bef1821701f863791b85f9e8c92f71bc6b2fe41829b68c61f7632b3f4c1b8"
SOURCE_DIR="android-file-transfer-linux-$srcGitRev"
PATCHES="android_file_transfer-4.3.patchset"
ADDITIONAL_FILES="android-file-transfer.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
android_file_transfer$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
userland_fs$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
"
PROVIDES_qt="
android_file_transfer_qt$secondaryArchSuffix = $portVersion
app:AndroidFileTransfer = $portVersion
"
REQUIRES_qt="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
userland_fs$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
mkdir -p build
cd build
cmake .. \
-DBUILD_FUSE=ON \
-DBUILD_QT_UI=ON \
-DCMAKE_BUILD_TYPE=Release
make $jobArgs
}
INSTALL()
{
mkdir -p $appsDir
mkdir -p $addOnsDir/userlandfs
cp build/qt/android-file-transfer "$appsDir/AndroidFileTransfer"
cp build/fuse/aft-mtp-mount "$addOnsDir/userlandfs/android_file_transfer"
local APP_SIGNATURE="application/x-vnd.android-file-transfer"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2 | cut -d~ -f1`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/android-file-transfer.rdef.in > $sourceDir/android-file-transfer.rdef
addResourcesToBinaries $sourceDir/android-file-transfer.rdef \
"$appsDir/AndroidFileTransfer"
mimeset -f "$appsDir/AndroidFileTransfer"
addAppDeskbarSymlink "$appsDir/AndroidFileTransfer" "Android File Transfer"
packageEntries qt $appsDir $dataDir
}