Files
BMLFS/build-scripts/libmtp.build
2021-09-28 15:22:15 -05:00

51 lines
1.9 KiB
Bash

#! /bin/bash
# libmtp
# Source: https://downloads.sourceforge.net/libmtp/libmtp-1.1.19.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: libgcrypt, libusb
# Recommended: NONE
# Optional: NONE
# If coptimizing with GCC:
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
export CXXFLAGS=$CFLAGS
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
./configure --prefix=/usr -sysconfdir=/etc --localstatedir=/var $BUILDTRUPLE &&
read -p "Compile?" && make -j2 &&
sudo -S make DESTDIR=$BUILD install &&
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
libmtp: libmtp (A library for MTP media devices)
libmtp:
libmtp: libmtp is a library that attempts to support Microsoft's Media
libmtp: Transfer Protocol (MTP). It was initially based on the great libptp2
libmtp: library by Mariusz Woloszyn now maintained by Marcus Meissners, and
libmtp: Hubert Figuere's libgphoto2 work based on libptp2 (or is libptp2
libmtp: based on libgphoto?). It is like a master DJ has remixed all of
libmtp: these tracks and then added a new API adapted for portable media
libmtp: players. :-)
libmtp:
libmtp: Homepage: http://libmtp.sourceforge.net
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libmtp-1.1.19-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*