Skip to content

Commit

Permalink
scripts for creating linux packages added
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Jan 13, 2022
1 parent f8b0747 commit a820e8a
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ app.*.map.json
/aur-struct/src
/aur-struct/pkg

/deb-struct/usr
/deb-struct/usr

/AppDir
/appimage-builder-cache
*.AppImage
47 changes: 47 additions & 0 deletions AppImageBuilder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
script:
- rm -rf AppDir || true
- cp -r build/linux/x64/release/bundle AppDir
- mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
- cp assets/spotube-logo.png AppDir/usr/share/icons/hicolor/64x64/apps/
AppDir:
path: ./AppDir
app_info:
id: oss.krtirtho.spotube
name: Spotube
icon: spotube-logo
version: 1.0.0
exec: spotube
exec_args: $@
apt:
arch: amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute main restricted
- sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted
- sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute universe
- sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates universe
- sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute multiverse
- sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse
- sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-backports main
restricted universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security multiverse
- sourceline: deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg
arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
- sourceline: deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg]
https://packages.microsoft.com/repos/code stable main
include: []
files:
include: []
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
AppImage:
arch: x86_64
update-information: guess
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

USR_SHARE=deb-struct/usr/share
BUNDLE_DIR=build/linux/x64/release/bundle
deb:
mkdir -p spotube\
&& mkdir -p $(USR_SHARE)/applications\
&& mkdir -p $(USR_SHARE)/icons/spotube\
&& cp -r $(BUNDLE_DIR)/* $(USR_SHARE)/spotube\
&& cp linux/spotube.desktop $(USR_SHARE)/applications/\
&& cp assets/spotube-logo.png $(USR_SHARE)/icons/spotube\
&& dpkg-deb -b deb-struct/ build/Spotube-linux-x86_64.deb

TEMP_DIR=/tmp/spotube-tar
tar:
mkdir -p $(TEMP_DIR)\
&& cp -r $(BUNDLE_DIR)/* $(TEMP_DIR)\
&& cp linux/spotube.desktop $(TEMP_DIR)\
&& cp assets/spotube-logo.png $(TEMP_DIR)\
&& tar -cJf build/Spotube-linux-x86_64.tar.xz -C $(TEMP_DIR) .\
&& rm -rf $(TEMP_DIR)

appimage:
appimage-builder --recipe AppImageBuilder.yml\
&& mv Spotube-*-x86_64.AppImage build
8 changes: 8 additions & 0 deletions linux/spotube.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Spotube
Exec=/usr/bin/spotube
Icon=/usr/share/icons/spotube/spotube-logo.png
Comment=A music streaming app combining the power of Spotify & Youtube
Terminal=false
Categories=Music;

0 comments on commit a820e8a

Please sign in to comment.