commit a382799b216c0a27d96b022b17f402f3502757b7 Author: EnumDev Date: Sat Oct 11 16:46:03 2025 +0300 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e58e5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Exclude bpm archives +*.bpm \ No newline at end of file diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..e8eb167 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Sourceforge project +REPO="libmtp" + +# Get version using best_release.json +VERSION=$(curl -s -L https://sourceforge.net/projects/"$REPO"/best_release.json | jq '.platform_releases.linux.filename' | cut -d'/' -f3) + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..1c69c99 --- /dev/null +++ b/pkg.info @@ -0,0 +1,19 @@ +name: libmtp +description: Implementation of the Media Transfer Protocol +version: 1.1.22 +revision: 1 +url: https://libmtp.sourceforge.net/ +license: LGPL2.1-or-later +architecture: any +type: source +depends: + - glibc + - libgcrypt + - libusb +make_depends: + - doxygen +downloads: + - url: https://downloads.sourceforge.net/project/libmtp/libmtp/${BPM_PKG_VERSION}/libmtp-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: c3fcf411aea9cb9643590cbc9df99fa5fe30adcac695024442973d76fa5f87bc diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..1d254a0 --- /dev/null +++ b/source.sh @@ -0,0 +1,25 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + ./configure --prefix=/usr --with-udev=/usr/lib/udev + make +} + +# The check function is executed in the source directory +# This function is used to run tests to verify the package has been compiled correctly +check() { + make check +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + make DESTDIR="$BPM_OUTPUT" install + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libmtp/COPYING +}