From 5e95766ea1984651e85901771fa3c593f22640fe Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 11 Feb 2022 23:48:53 -0500 Subject: system/android-file-transfer: Fix 15.0 build. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- system/android-file-transfer/README | 8 ++++---- .../android-file-transfer.SlackBuild | 24 +++++++++++++--------- .../android-file-transfer.info | 2 +- system/android-file-transfer/doinst.sh | 9 ++++++++ 4 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 system/android-file-transfer/doinst.sh (limited to 'system') diff --git a/system/android-file-transfer/README b/system/android-file-transfer/README index a0b712341aa8..69b8af4cfd92 100644 --- a/system/android-file-transfer/README +++ b/system/android-file-transfer/README @@ -1,10 +1,10 @@ Android File Transfer for Linux - reliable MTP client with minimalistic UI similar to Android File Transfer for Mac. -Android File Transfer by default builds qt5 ui. This version -of Android File Transfer does not support qt4 ui. +Android File Transfer by default builds a Qt5 UI. This version of +Android File Transfer does not support Qt4. -In building only the command-line client (this does not require -qt5), run the script with the following command: +To build only the command-line client (this does not require qt5), run +the script with the following command: QT_GUI=no ./android-file-transfer.SlackBuild diff --git a/system/android-file-transfer/android-file-transfer.SlackBuild b/system/android-file-transfer/android-file-transfer.SlackBuild index d4ea07e5a21c..1f695b23cd05 100644 --- a/system/android-file-transfer/android-file-transfer.SlackBuild +++ b/system/android-file-transfer/android-file-transfer.SlackBuild @@ -22,6 +22,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220211 bkw: Modified by SlackBuilds.org: use the correct github +# download URL, get rid of the useless static lib in the package, add +# a doinst.sh for the desktop/icon stuff. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=android-file-transfer @@ -38,9 +42,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -69,15 +70,15 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +rm -rf $PRGNAM-linux-$VERSION +tar xvf $CWD/$PRGNAM-linux-$VERSION.tar.gz cd $PRGNAM-linux-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ if [ ${QT_GUI:-yes} = no ]; then GUI="OFF" @@ -95,11 +96,13 @@ cd build -DBUILD_QT_UI=$GUI \ -DCMAKE_BUILD_TYPE=Release .. make - make install DESTDIR=$PKG + make install/strip DESTDIR=$PKG cd .. -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +# 20220211 bkw: pretty sure the static lib libmtp-ng-static.a is +# getting installed by mistake. there are no headers, so user code +# couldn't link with it anyway. +rm -rf $PKG/usr/lib* mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a FAQ.md README.md LICENSE $PKG/usr/doc/$PRGNAM-$VERSION @@ -107,6 +110,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/android-file-transfer/android-file-transfer.info b/system/android-file-transfer/android-file-transfer.info index e76f9f79f50c..b0216d52ceb6 100644 --- a/system/android-file-transfer/android-file-transfer.info +++ b/system/android-file-transfer/android-file-transfer.info @@ -1,7 +1,7 @@ PRGNAM="android-file-transfer" VERSION="4.2" HOMEPAGE="https://github.com/whoozle/android-file-transfer-linux" -DOWNLOAD="https://github.com/whoozle/android-file-transfer-linux/archive/v4.2/android-file-transfer-4.2.tar.gz" +DOWNLOAD="https://github.com/whoozle/android-file-transfer-linux/archive/v4.2/android-file-transfer-linux-4.2.tar.gz" MD5SUM="861de28c87f095a32808d0cbf9bb897a" DOWNLOAD_x86_64="" MD5SUM_x86_64="" diff --git a/system/android-file-transfer/doinst.sh b/system/android-file-transfer/doinst.sh new file mode 100644 index 000000000000..3e5691a052b5 --- /dev/null +++ b/system/android-file-transfer/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi -- cgit v1.2.3