-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from casualsnek/development
Merge Development
- Loading branch information
Showing
42 changed files
with
2,020 additions
and
1,164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
pkgname=onthespot-git | ||
pkgver=0.5 | ||
_branch="main" | ||
pkgrel=1 | ||
pkgdesc="Qt based music downloader written in python" | ||
arch=('any') | ||
url="https://github.com/casualsnek/onthespot" | ||
license=('GPLv2') | ||
depends=('ffmpeg' 'python-requests' 'python-pyqt5' 'python-pillow' 'python-show-in-file-manager' 'python-certifi' 'python-pyxdg' 'python-librespot' 'python-music-tag') | ||
conflicts=('onthespot') | ||
provides=('onthespot') | ||
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') | ||
optdepends=() | ||
source=("https://github.com/casualsnek/onthespot/archive/refs/heads/$_branch.zip") | ||
sha256sums=(SKIP) | ||
|
||
build() { | ||
cd "onthespot-$_branch" | ||
python -m build --wheel --no-isolation | ||
} | ||
|
||
pkgver() { | ||
grep "self.version = *" "$PWD/onthespot-$_branch/src/onthespot/otsconfig.py" | sed 's/self.version = //g;s/ //g' | ||
} | ||
|
||
package() { | ||
cd "onthespot-$_branch" | ||
python -m installer --destdir="$pkgdir" dist/*.whl | ||
install -dm 755 "$pkgdir/usr/share/applications" | ||
install -dm 755 "$pkgdir/usr/share/icons/hicolor/"{256x256,scalable}"/apps/" | ||
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" | ||
install -Dm 644 "src/onthespot/resources/org.eu.casualsnek.onthespot.desktop" "$pkgdir/usr/share/applications/" | ||
install -Dm 644 "src/onthespot/resources/icon.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/casual_onthespot.svg" | ||
install -Dm 644 "src/onthespot/resources/icon.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/casual_onthespot.png" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,57 @@ | ||
#!/bin/bash | ||
|
||
clean_build_dirs () { | ||
[ -d ./__pycache__ ] && rm -rf __pycache__ | ||
[ -d ./build ] && rm -rf ./build | ||
[ -d ./venv ] && rm -rf ./venv | ||
[ -f ./onthespot_linux.spec ] && rm ./onthespot_linux.spec | ||
[ -f ./onthespot_linux_ffm.spec ] && rm ./onthespot_linux_ffm.spec | ||
} | ||
|
||
|
||
echo "========= OnTheSpot Linux Build Script ===========" | ||
echo " => Cleaning up !" | ||
rm -rf __pycache__ | ||
if [ -f "./dist/onthespot_linux" ]; then | ||
rm ./dist/onthespot_linux | ||
fi | ||
rm -rf ./build | ||
rm -rf ./venv | ||
[ -f ./dist/onthespot_linux ] && rm ./dist/onthespot_linux | ||
[ -f ./dist/onthespot_linux_ffm ] && rm ./dist/onthespot_linux_ffm | ||
clean_build_dirs | ||
|
||
echo " => Creating virtual env." | ||
python3 -m venv venv | ||
|
||
echo " => Switching to virtual env." | ||
source ./venv/bin/activate | ||
|
||
echo " => Installing 'pyinstaller' via pip..." | ||
pip install pyinstaller | ||
echo " => Installing dependencies pip..." | ||
|
||
echo " => Installing dependencies to venv with pip..." | ||
pip install -r requirements.txt | ||
|
||
if [ -f "ffbin_nix/ffmpeg" ]; then | ||
echo " => Found 'ffbin_win' directory and ffmpeg binary.. Using ffmpeg binary append mode " | ||
pyinstaller --onefile \ | ||
--add-data="gui/qtui/*.ui:qui/qtui" \ | ||
--add-binary="ffbin_nix/*:bin/ffmpeg" \ | ||
--paths="." \ | ||
--name="onthespot_linux" \ | ||
__init__.py | ||
--add-data="src/onthespot/gui/qtui/*.ui:onthespot/gui/qtui" \ | ||
--add-data="src/onthespot/resources/*.png:onthespot/resources" \ | ||
--add-binary="ffbin_nix/*:onthespot/bin/ffmpeg" \ | ||
--paths="src/onthespot" \ | ||
--name="onthespot_linux_ffm" \ | ||
--icon="src/onthespot/resources/icon.png" \ | ||
src/portable.py | ||
else | ||
echo " => Building to use ffmpeg binary from system... " | ||
pyinstaller --onefile \ | ||
--add-data="gui/qtui/*.ui:gui/qtui" \ | ||
--paths="." \ | ||
--add-data="src/onthespot/gui/qtui/*.ui:onthespot/gui/qtui" \ | ||
--add-data="src/onthespot/resources/*.png:onthespot/resources" \ | ||
--paths="src/onthespot" \ | ||
--name="onthespot_linux" \ | ||
__init__.py | ||
--icon="src/onthespot/resources/icon.png" \ | ||
src/portable.py | ||
fi | ||
echo " => Setting permissions.. " | ||
chmod +x ./dist/onthespot_linux | ||
echo " => Cleaning.. " | ||
rm onthespot_linux.spec | ||
rm -rf ./build | ||
rm -rf __pycache__ | ||
echo " => Setting executable permissions.. " | ||
[ -f ./dist/onthespot_linux ] && chmod +x ./dist/onthespot_linux &>./build_nix.log | ||
[ -f ./dist/onthespot_linux_ffm ] && chmod +x ./dist/onthespot_linux_ffm &>./build_nix.log | ||
|
||
echo " => Cleaning .. " | ||
clean_build_dirs | ||
|
||
echo " => Done " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.