Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

update linux packaging

+185
+28
dist/debian/amd64/DEBIAN/postinst
··· 1 + #!/bin/bash 2 + set -e 3 + 4 + # Update desktop database 5 + if [ -x /usr/bin/update-desktop-database ]; then 6 + update-desktop-database /usr/share/applications || true 7 + fi 8 + 9 + # Enable systemd user service for the user who invoked the installation 10 + if [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ]; then 11 + # Get the user's home directory 12 + USER_HOME=$(getent passwd "$SUDO_USER" | cut -d: -f6) 13 + USER_UID=$(id -u "$SUDO_USER") 14 + 15 + # Enable the service for the user 16 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user daemon-reload || true 17 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user enable rockbox.service || true 18 + 19 + echo "Rockbox systemd service has been enabled for user $SUDO_USER" 20 + echo "To start the service now, run: systemctl --user start rockbox.service" 21 + else 22 + # If installed without sudo or by root, enable globally for all users 23 + systemctl --global enable rockbox.service || true 24 + echo "Rockbox systemd service has been enabled globally" 25 + echo "Users can start the service with: systemctl --user start rockbox.service" 26 + fi 27 + 28 + exit 0
+28
dist/debian/arm64/DEBIAN/postinst
··· 1 + #!/bin/bash 2 + set -e 3 + 4 + # Update desktop database 5 + if [ -x /usr/bin/update-desktop-database ]; then 6 + update-desktop-database /usr/share/applications || true 7 + fi 8 + 9 + # Enable systemd user service for the user who invoked the installation 10 + if [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ]; then 11 + # Get the user's home directory 12 + USER_HOME=$(getent passwd "$SUDO_USER" | cut -d: -f6) 13 + USER_UID=$(id -u "$SUDO_USER") 14 + 15 + # Enable the service for the user 16 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user daemon-reload || true 17 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user enable rockbox.service || true 18 + 19 + echo "Rockbox systemd service has been enabled for user $SUDO_USER" 20 + echo "To start the service now, run: systemctl --user start rockbox.service" 21 + else 22 + # If installed without sudo or by root, enable globally for all users 23 + systemctl --global enable rockbox.service || true 24 + echo "Rockbox systemd service has been enabled globally" 25 + echo "Users can start the service with: systemctl --user start rockbox.service" 26 + fi 27 + 28 + exit 0
+58
dist/rpm/amd64/rockbox.spec
··· 32 32 /usr/bin/rockbox-gpui 33 33 /usr/share/applications/rockbox-gpui.desktop 34 34 /usr/share/pixmaps/rockbox-gpui.png 35 + /usr/lib/systemd/user/rockbox.service 36 + 37 + %post 38 + # Update desktop database 39 + if [ -x /usr/bin/update-desktop-database ]; then 40 + /usr/bin/update-desktop-database /usr/share/applications &> /dev/null || : 41 + fi 42 + 43 + # Enable systemd user service 44 + if [ "$1" -eq 1 ]; then 45 + # Fresh install 46 + if [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ]; then 47 + # Get the user's UID 48 + USER_UID=$(id -u "$SUDO_USER" 2>/dev/null) 49 + if [ -n "$USER_UID" ]; then 50 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user daemon-reload &> /dev/null || : 51 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user enable rockbox.service &> /dev/null || : 52 + echo "Rockbox systemd service has been enabled for user $SUDO_USER" 53 + echo "To start the service now, run: systemctl --user start rockbox.service" 54 + fi 55 + else 56 + # Enable globally for all users 57 + systemctl --global enable rockbox.service &> /dev/null || : 58 + echo "Rockbox systemd service has been enabled globally" 59 + echo "Users can start the service with: systemctl --user start rockbox.service" 60 + fi 61 + fi 62 + 63 + %preun 64 + # Stop and disable service on uninstall 65 + if [ "$1" -eq 0 ]; then 66 + # Uninstall (not upgrade) 67 + if [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ]; then 68 + USER_UID=$(id -u "$SUDO_USER" 2>/dev/null) 69 + if [ -n "$USER_UID" ]; then 70 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user stop rockbox.service &> /dev/null || : 71 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user disable rockbox.service &> /dev/null || : 72 + fi 73 + else 74 + systemctl --global disable rockbox.service &> /dev/null || : 75 + fi 76 + fi 77 + 78 + %postun 79 + # Update desktop database after uninstall 80 + if [ "$1" -eq 0 ]; then 81 + # Uninstall (not upgrade) 82 + if [ -x /usr/bin/update-desktop-database ]; then 83 + /usr/bin/update-desktop-database /usr/share/applications &> /dev/null || : 84 + fi 85 + 86 + if [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ]; then 87 + USER_UID=$(id -u "$SUDO_USER" 2>/dev/null) 88 + if [ -n "$USER_UID" ]; then 89 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user daemon-reload &> /dev/null || : 90 + fi 91 + fi 92 + fi
+11
dist/rpm/amd64/usr/lib/systemd/user/rockbox.service
··· 1 + [Unit] 2 + Description=Rockbox Music Server 3 + After=network.target 4 + 5 + [Service] 6 + ExecStart=/usr/local/bin/rockboxd 7 + Restart=always 8 + Environment="SDL_VIDEODRIVER=dummy" 9 + 10 + [Install] 11 + WantedBy=default.target
+49
dist/rpm/arm64/rockbox.spec
··· 29 29 /usr/local/bin/rockboxd 30 30 /usr/local/lib/rockbox/* 31 31 /usr/local/share/rockbox/* 32 + /usr/lib/systemd/user/rockbox.service 33 + 34 + %post 35 + # Enable systemd user service 36 + if [ "$1" -eq 1 ]; then 37 + # Fresh install 38 + if [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ]; then 39 + # Get the user's UID 40 + USER_UID=$(id -u "$SUDO_USER" 2>/dev/null) 41 + if [ -n "$USER_UID" ]; then 42 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user daemon-reload &> /dev/null || : 43 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user enable rockbox.service &> /dev/null || : 44 + echo "Rockbox systemd service has been enabled for user $SUDO_USER" 45 + echo "To start the service now, run: systemctl --user start rockbox.service" 46 + fi 47 + else 48 + # Enable globally for all users 49 + systemctl --global enable rockbox.service &> /dev/null || : 50 + echo "Rockbox systemd service has been enabled globally" 51 + echo "Users can start the service with: systemctl --user start rockbox.service" 52 + fi 53 + fi 54 + 55 + %preun 56 + # Stop and disable service on uninstall 57 + if [ "$1" -eq 0 ]; then 58 + # Uninstall (not upgrade) 59 + if [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ]; then 60 + USER_UID=$(id -u "$SUDO_USER" 2>/dev/null) 61 + if [ -n "$USER_UID" ]; then 62 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user stop rockbox.service &> /dev/null || : 63 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user disable rockbox.service &> /dev/null || : 64 + fi 65 + else 66 + systemctl --global disable rockbox.service &> /dev/null || : 67 + fi 68 + fi 69 + 70 + %postun 71 + # Reload systemd after uninstall 72 + if [ "$1" -eq 0 ]; then 73 + # Uninstall (not upgrade) 74 + if [ -n "$SUDO_USER" ] && [ "$SUDO_USER" != "root" ]; then 75 + USER_UID=$(id -u "$SUDO_USER" 2>/dev/null) 76 + if [ -n "$USER_UID" ]; then 77 + sudo -u "$SUDO_USER" XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user daemon-reload &> /dev/null || : 78 + fi 79 + fi 80 + fi
+11
dist/rpm/arm64/usr/lib/systemd/user/rockbox.service
··· 1 + [Unit] 2 + Description=Rockbox Music Server 3 + After=network.target 4 + 5 + [Service] 6 + ExecStart=/usr/local/bin/rockboxd 7 + Restart=always 8 + Environment="SDL_VIDEODRIVER=dummy" 9 + 10 + [Install] 11 + WantedBy=default.target