#Packager: Dimitris Tzemos pkgname=smtube pkgver=21.10.0 pkgrel=1dj source=("http://sourceforge.net/projects/smtube/files/SMTube/$pkgver/smtube-$pkgver.tar.bz2" "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp") docs=("*.txt" "changelog") url=http://smplayer.sourceforge.net slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "smtube (search and download videos from YouTube)" "SMTube is an application that searches and downloads videos from" "YouTube. It can use a variety of video players for playing back" "content." ) build() { cd $startdir/src/$pkgname-$pkgver if [ ${USE_QT5:-no} = yes ]; then QMAKE=qmake-qt5 LRELEASE=lrelease-qt5 else QMAKE=qmake LRELEASE=lrelease fi sed -i "s/youtube-dl/yt-dlp/g" $startdir/src/$pkgname-$pkgver/src/*.cpp || return 1 make \ QMAKE=$QMAKE \ LRELEASE=$LRELEASE \ PREFIX=/usr \ DOC_PATH="\\\"/usr/doc/$pkgname-$pkgver/\\\"" \ QMAKE_OPTS="QMAKE_CXXFLAGS=\"$SLKCFLAGS\"" || return 1 make install \ PREFIX=/usr \ DOC_PATH=/usr/doc/$pkgname-$pkgver \ DESTDIR=$startdir/pkg || return 1 mkdir -p $startdir/pkg/usr/bin/ || return 1 cp $startdir/src/yt-dlp $startdir/pkg/usr/bin/ || return 1 chmod +x $startdir/pkg/usr/bin/yt-dlp # fix ownerships and permissions chown -R root:root $startdir/pkg }